Skip to content

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

New issue

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

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

Already on GitHub? Sign in to your account

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

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