Specific KEGG.db pathways not found in KEGG.db package
1
0
Entering edit mode
@tobias-messmer-23132
Last seen 4.0 years ago

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])) )
KEGG.db KEGG KEGGPATHNAME2ID KEGGPATHID2EXTIT • 1.1k views
ADD COMMENT
2
Entering edit mode
@james-w-macdonald-5106
Last seen 15 hours ago
United States

KeGG stopped allowing downloads of their data in 2011, IIRC, so what we have for KeGG is old. You can still make queries using their API, for which you can use the KEGGREST package. As an example:

> library(KEGGREST)
> z <- keggGet("hsa04390")
## a function to parse the data
> parseIt <- function(x) {
    nr <- length(x$GENE)
    GeneID <- x$GENE[seq(1, nr, 2)]
    d.f <- do.call(rbind, strsplit(x$GENE[seq(2, nr, 2)], "; "))
    colnames(d.f) <- c("SYMBOL","DESCRIPTION")
    data.frame(GeneID, d.f)
}
> zz <- parseIt(z[[1]])
> head(zz)
  GeneID SYMBOL                                            DESCRIPTION
1 286204   CRB2   crumbs cell polarity complex component 2 [KO:K16681]
2  23418   CRB1   crumbs cell polarity complex component 1 [KO:K16681]
3  56288  PARD3       par-3 family cell polarity regulator [KO:K04237]
4  50855 PARD6A par-6 family cell polarity regulator alpha [KO:K06093]
5  84552 PARD6G par-6 family cell polarity regulator gamma [KO:K06093]
6  84612 PARD6B  par-6 family cell polarity regulator beta [KO:K06093]
> dim(zz)
[1] 157   3
ADD COMMENT
0
Entering edit mode

Works like a charm, legend! Thanks a lot for the clarification.

ADD REPLY

Login before adding your answer.

Traffic: 702 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6