Question: How To Batch Grab All Ko (Kegg Ontology) Terms Associated With Each Kegg Pathway?
7
gravatar for JacobS
6.0 years ago by
JacobS900
Cleveland, Ohio
JacobS900 wrote:

Hello,

I often use KEGG and enjoy their annotated pathways, of which there seem to be several hundred, or perhaps several thousand. For each pathway, I can follow it's hyperlink and arrive at a list of all of the KO terms associated with the pathway.

I have a bunch of KO annotated data, and I would like to study pathway enrichment by looking at the frequency these terms appear in each of the pathways, and compare these values between treatments. So, is there any convenient resource from KEGG for grabbing all of these KO terms per pathway, without actually clicking on every pathway??

Thanks!

pathway kegg • 10k views
ADD COMMENTlink modified 3.0 years ago by Dchoy40 • written 6.0 years ago by JacobS900
8
gravatar for JacobS
6.0 years ago by
JacobS900
Cleveland, Ohio
JacobS900 wrote:

Found it! Go to http://www.genome.jp/kegg-bin/get_htext?ko00001.keg and use the "download htext" link for a complete listing of all pathways/KO numbers!

ADD COMMENTlink written 6.0 years ago by JacobS900
6
gravatar for 5heikki
3.5 years ago by
5heikki8.4k
Finland
5heikki8.4k wrote:

There's an API, why not use it?

#!/bin/bash
echo "Downloading pathway list"
(curl -# http://rest.kegg.jp/list/pathway > ./pathway.list)
if [ $? -eq 0 ]; then
    for next in $(cut -f1 pathway.list); do
    (curl -# http://rest.kegg.jp/link/ko/$next > ./$next.ko)
    if [ $? -eq 0 ]; then
        echo "Retrieved $next ko map"   
    else
        echo "There was a problem in data retrieval"
        exit 1
    fi
    done
    exit 0
else 
    echo "There was a problem in data retrieval"
    exit 1
fi
ADD COMMENTlink written 3.5 years ago by 5heikki8.4k

I ran the API and worked out pretty well. I did not check yet if I have some K number without a path assigned but apparently this is what I was looking for a while! Thank you very much 5heikki

ADD REPLYlink modified 3.3 years ago • written 3.3 years ago by panconchoclo10
1
gravatar for Dchoy
3.0 years ago by
Dchoy40
Dchoy40 wrote:

The KEGG API page has a few ways to extract most formats of KEGG annotations. In your case, grabbing all the KO entries in a pathway would look like this:

/link/ko/map00010 or /link/ko/ko00010 will give you a list of all KO entries in pathway map00010 or ko00010

For r users, Dan Tenenbaum has a great r package for such a purpose. The method "keggLink" should be suitable for your purpose.

keggLink("ko","ko00010")

KEGG API link: http://www.genome.jp/kegg/rest/keggapi.html KEGGREST r package: https://www.bioconductor.org/packages/devel/bioc/manuals/KEGGREST/man/KEGGREST.pdf

ADD COMMENTlink written 3.0 years ago by Dchoy40
0
gravatar for panconchoclo
3.5 years ago by
panconchoclo10
Sweden
panconchoclo10 wrote:

In my case using the ko00001.keg file does not solve the problem at all because I have some "K numbers" which does not exist in this file.

Any idea where a suitable file with all the mappings is available?

Thanks!!

 

ADD COMMENTlink written 3.5 years ago by panconchoclo10
1

What about KEGG.db in R bioconductor?

Be aware though that: "KEGG.db contains mappings based on older data because the original resource was removed from the the public domain before the most recent update was produced"

ADD REPLYlink written 3.5 years ago by Benn7.4k

I ll try use KEGG.db. Thanks!

ADD REPLYlink written 3.5 years ago by panconchoclo10

I could not find many K numbers months before but I could find at least some of them later. There are updates in the .keg file frequently. 

If the KEGG itself is not providing the updated K numbers to public, I don't think you will find anything elsewhere.

ADD REPLYlink modified 3.5 years ago • written 3.5 years ago by Nari870
0
gravatar for panconchoclo
3.5 years ago by
panconchoclo10
Sweden
panconchoclo10 wrote:

I see. Thanks a lot b.nota and Vari for your comments.

ADD COMMENTlink written 3.5 years ago by panconchoclo10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 743 users visited in the last hour