This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How To Get The Kegg Pathway Name After Enrichment Analysis Using Kegg.Db From Bioconductor.

Hello,

I'm trying to retrieve KEGG pathway names after Enrichment Analysis using KEGG.db from Bioconductor.

library(KEGG.db)

# a key value pair: pathways to entrez id
pathway2entrez <- as.list(KEGGPATHID2EXTID)
head(pathway2entrez)

Now let's say I found the pathway hsa00232 significantly enriched. I would like to get a name for this pathway. But I didn't find a map in the variables of KEGG* from the pathway ID (in the form hsa*) to pathway name. Can someone give me a hint how I can do this?

kegg r mapping bioconductor

2 answers

I don't know how/if this is implemented in KEGG.db or other Bioconductor packages, but retrieval of pathway name from ID is easy using the TogoWS REST service. The URL for your example is:

http://togows.dbcls.jp/entry/pathway/hsa00232/name

In R you could use e.g. RCurl:

library(RCurl)
getURL("http://togows.dbcls.jp/entry/pathway/hsa00232/name")
# [1] "Caffeine metabolism - Homo sapiens (human)\n"

That ist a good alternative! Tanks a lot!

There is this object: KEGGPATHID2NAME in KEGG.db, which does what you want, but it takes KEGG id in number form only, so you have to remove the leading "hsa" first:

> library(KEGG.db)
> keggid <- "hsa00232"
> keggid2keggname <- as.list(KEGGPATHID2NAME)
> keggid2keggname[substring(keggid, 4)]
$`00232`
[1] "Caffeine metabolism"

I just found that "KEGG.db" is not complete, for example it does not include pathway "hsa04261"?!

Log in to answer this question.