@galactus8403: That was helpful. Thank you so much!
Hello,
I am a newbie in bioinfo. I would like to know how to download all the pathways of an organism from KEGG database using the KEGG API. Initially I had done it using the FTP but now its no more freely available. Please help me with this!
Thanks
4 answers
Hi,
I don't know your informatic skills, but you could start by taking a look at the rather new KEGG rest API. If your organism is already inside the KEGG database retrieving all its pathways is relatively easy. Assume your organism is Homo sapiens (Kegg code "hsa"), you just need to open your browser and go to this page (notice the URL). This example gives you all the pathways AND the human genes associated to them.
To get info about a gene (for instance hsa:10) just go to this page (again, notice how the URL is built).
To get info about a pathway (for instance hsa:10) just go to this page.
You can also retrieve this data using a script, below a simple example in python
import urllib2
url = 'http://rest.kegg.jp/link/hsa/pathway'
data = urllib2.urlopen(url, timeout=20).read()
# Parse it!
If your organism is not inside the KEGG database, you first need to annotate it through KAAS, obtain the KO IDs and then do a search like this (note that there is a limit in the number of KO IDs that you can put in a single URL, so maybe you need to perform more than one search).
Hope this helps...
Take a look to that biostar post as well A new REST based API for KEGG: Kyoto Encyclopedia of Genes and Genomes
The ipython notebook you provide there is really cool, congrats!
@Manu: Thanks a ton for the link. :)
Thanks, I'm glad some people find it useful at last. That encourages me to really start feeding my blog :-)
That is awesome to have it for the purpose. I love it! That is so useful to understand step by step all of the information related to what I need. Thanks again!
you can use clusterProfiler in R:
devtools::install_github("guangchuangyu/clusterProfiler")
library(clusterProfiler)
hsa_kegg = download_KEGG('hsa')
I have installed the package from Bioconductor and library it, but the function "download_KEGG" is not contained in the package. I wonder why?
You can use GeneSCF to download with simple command (Only retrieves the updated data- real-time),
./prepare_database -db=[GO_all|GO_BP|GO_MF|GO_CC|KEGG|REACTOME|NCG] -org=[see,org_codes_help]
Gene Set Clustering based on Functional annotation (GeneSCF)
Log in to answer this question.
Thanks, it is pretty helpful, I have another question about how to download a older version KEGG database (Homo sapiens Pathway) like Sep, 2015, really appreciate if anyone knows the answer!
I think would be better to write a new post, if you have additional/different questions. Not many people will read this post since is more than 3 years old.