From 1f186a4c52040a9e594fdcdb65fdeee27c30b832 Mon Sep 17 00:00:00 2001 From: jianzuoyi <543355797@qq.com> Date: Mon, 24 Feb 2025 17:57:54 +0800 Subject: [PATCH] trim KEGG pathway name tail like "- Mus musculus (house mouse)" --- R/enrichKEGG.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/enrichKEGG.R b/R/enrichKEGG.R index cb4bacc..24c0f99 100644 --- a/R/enrichKEGG.R +++ b/R/enrichKEGG.R @@ -186,7 +186,7 @@ download.KEGG.Path <- function(species) { keggpathid2name.df <- kegg_list("pathway", species) - keggpathid2name.df[,2] <- sub("\\s-\\s[a-zA-Z ]+\\(\\w+\\)$", "", keggpathid2name.df[,2]) + keggpathid2name.df[,2] <- sub("\\s-\\s[a-zA-Z ]+\\([a-zA-Z ]+\\)$", "", keggpathid2name.df[,2]) # keggpathid2name.df[,1] %<>% gsub("path:map", species, .) ## if 'species="ko"', ko and map path are duplicated, only keep ko path.