Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

trim KEGG pathway name tail like "- Mus musculus (house mouse)" #760

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant