Quick way to download KEGG pathway images
1
0
Entering edit mode
6.6 years ago

I have obtained the following ids for Vitis vinifera from UniprotKB retrieval utility by mapping Ensembl IDS.

vvi:100250200;
vvi:100254312;
vvi:100261308;
vvi:104880199;
vvi:100263187;
vvi:100260420;
vvi:100245574;
vvi:100244092;
vvi:100252790;
vvi:100262316;
vvi:100232889;
vvi:100253968;
vvi:100263079;

From this link, it seems obvious that these are indeed KEGG ids. However, I am having hard time identifying them via KEGG web portal.

This is indeed a trivial task and I found many discussions already on similar issues on Biostar. However, I am a little stuck here.

Can somebody please help?

kegg pathway • 2.8k views
ADD COMMENT
0
Entering edit mode

It appears that these are KEGG gene entries. How can then I obtain the pahtway IDS and then download the images?

ADD REPLY
1
Entering edit mode

Yes, they appear to be genes for this species (grape).

I have been able to look them up here and to view their sequence, amongst other information: http://www.genome.jp/dbget-bin/www_bfind_sub?mode=bfind&max_hit=1000&locale=en&serv=gn&dbkey=all&keywords=100250200&page=1

Here is the entry for vvi:100250200: http://www.genome.jp/dbget-bin/www_bget?vvi:100250200

If there is no link on the right-hand-side to 'KEGG Pathway', then I don't believe that a curated pathway exists that contains the gene.

ADD REPLY
0
Entering edit mode

in R:

library(KEGGREST)
library(png)
library(stringr)

with loop:

kegg_ids=read.csv("kegg_ids", header = F, stringsAsFactors = F)
kegg_pw=keggLink("pathway", kegg_ids[,1])
kegg_pw_ids=unique(str_split_fixed(kegg_pw,":", 2)[,2])

for (i in kegg_pw_ids) {
         #   print (paste(i))
              j=keggGet(i, "image")
              writePNG (j,target=paste(i,".png", sep=""))
            }

without loop:

kegg_ids=read.csv("kegg_ids", header = F, stringsAsFactors = F)
kegg_pw=keggLink("pathway", kegg_ids[,1])
kegg_pw_ids=unique(str_split_fixed(kegg_pw,":", 2)[,2])

sapply(kegg_pw_ids, function (x) writePNG(keggGet(x,"image"), target=paste(x,".png",sep="")))

output: (images are not posted)

    > kegg_ids
                  V1
    1  vvi:100250200
    2  vvi:100254312
    3  vvi:100261308
    4  vvi:104880199
    5  vvi:100263187
    6  vvi:100260420
    7  vvi:100245574
    8  vvi:100244092
    9  vvi:100252790
    10 vvi:100262316
    11 vvi:100232889
    12 vvi:100253968
    13 vvi:100263079

   > kegg_pw_ids
        [1] "vvi00710" "vvi01100" "vvi01200" "vvi04075" "vvi00500" "vvi00520" "vvi01110"
ADD REPLY

Login before adding your answer.

Traffic: 2467 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