Hi guys,
I'm currently trying to extract Entrez Gene IDs from specific pathways of interest and use the KEGG.db data set for it. The idea is to first extract the KEGG pathway identifier from the pathway name of interest and then use the pathway identifier to get the single genes.
However, it seems there are some pathways that are present in KEGGPATHNAME2ID, but can then not be found in KEGGPATHID2EXTID. Is the KEGGPATHID2EXTID somehow incomplete or am I missing something?
I would really appreciate your advice a lot! Cheers, Tobias
Code for a pathway that works:
# Get the KEGG ID of interest
library('KEGG.db')
keggIDs <- as.list(KEGGPATHNAME2ID)
keggIDs[grep('Wnt', names(keggIDs))]
# Get the corresponding entrez genes
keggGenes <- as.list(KEGGPATHID2EXTID)
speific_ID <- 'hsa04310'
head( as.numeric(unlist(keggGenes[speific_ID])) )
Code for a pathway that doesn't work:
# Get the KEGG ID of interest
keggIDs[grep('Hippo', names(keggIDs))] #Hippo instead of Wnt
# Get the corresponding entrez genes
speific_ID <- 'hsa04390' # 04390 instead of 04310
head( as.numeric(unlist(keggGenes[speific_ID])) )
Works like a charm, legend! Thanks a lot for the clarification.