Skip to content

Conversation

jianzuoyi
Copy link

How about the changes?

git diff enrichKEGG.R

-    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])

The old regular pattern can only match the tail like:

hsa00630 Glyoxylate and dicarboxylate metabolism - Homo sapiens (human)

NOTE:only one word in the ()

The new regular pattern can also match the tail like:

mmu00630 Glyoxylate and dicarboxylate metabolism - Mus musculus (house mouse)

NOTE:multiple words in the ()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant