Fixing download.kegg, from pathview(), which returns empty xml
4
0
Entering edit mode
@lucmoitinho-8710
Last seen 8.7 years ago
Australia

Hi all,

I found that the download.kegg() function, that is called by pathview(), returns empty empty xml for some kegg pathways. Thus, I couldn't get my data integrated in this cases. Does this happens just with my machine? Is there a way to fix it?

Please find below my session information as well as commands to reproduce the error.

 I appreciate any feedback on this.

Cheers,

Lucas

###############
 

library(pathview)

download.kegg(pathway.id="00230", species="ko") #Returns normal xml

download.kegg(pathway.id="01200", species="ko") #Returns empty xml

#Other ko returning empty xml files:
#01200,01210,01212,01220,01230

###########

Session info:

R version 3.2.2 (2015-08-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.3 LTS

locale:
 [1] LC_CTYPE=en_AU.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_AU.UTF-8        LC_COLLATE=en_AU.UTF-8    
 [5] LC_MONETARY=en_AU.UTF-8    LC_MESSAGES=en_AU.UTF-8   
 [7] LC_PAPER=en_AU.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets
[8] methods   base     

other attached packages:
 [1] pathview_1.8.0       org.Hs.eg.db_3.1.2   RSQLite_1.0.0       
 [4] DBI_0.3.1            AnnotationDbi_1.30.1 GenomeInfoDb_1.4.1  
 [7] IRanges_2.2.5        S4Vectors_0.6.1      Biobase_2.28.0      
[10] BiocGenerics_0.14.0  KEGGgraph_1.26.0     graph_1.46.0        
[13] XML_3.98-1.3        

loaded via a namespace (and not attached):
 [1] XVector_0.8.0     magrittr_1.5      zlibbioc_1.14.0   R6_2.1.0         
 [5] stringr_1.0.0     httr_1.0.0        tools_3.2.2       grid_3.2.2       
 [9] png_0.1-7         Rgraphviz_2.12.0  KEGGREST_1.8.0    stringi_0.5-5    
[13] Biostrings_2.36.1

 

pathview download.kegg() xml • 3.3k views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 40 minutes ago
United States

The download.kegg() function just downloads what is available from KeGG. If the XML file is unavailable, you get an empty file. You can test this yourself. Try the link for ko00230 versus that for ko01200.
 

ADD COMMENT
0
Entering edit mode
@lucmoitinho-8710
Last seen 8.7 years ago
Australia

Hi James,

 

Thanks for the answer. Much appreciated! I guess there is no way to pathview function work properly for those kos with empty xml :(.

Cheers,

Lucas

ADD COMMENT
0
Entering edit mode
@lucmoitinho-8710
Last seen 8.7 years ago
Australia

Hi James,

An update.

Apparently, The KGML files for the global and overview maps (map number 01100s and 01200s) cannot be downloaded from the pathway map pages. However, they can be accessed via API, with another address,e.g. http://rest.kegg.jp/get/ko01100/kgml

I failed miserably to integrate this into the pathview code. I will get in contact with the developer of the package to see if it can be fixed for the next release.

Cheers,

Lucas

 

ADD COMMENT
1
Entering edit mode
Hi Lucas, Thanks for reporting this issue. We actually noticed this too, KEGG actually put these xml file in different places than the regular ones. We will get this corrected anyway. However, these are global maps, there are 5-6 of them. Just want you be aware that these global pathways are different from regular ones. Genes/proteins/enzymes are not rectangular nodes anymore, instead they become edges on these few graphs. For example, http://www.genome.jp/kegg-bin/show_pathway?ko01200. Gene data cannot be mapped onto these graphs, but compound data still can be. You may try to download the xml+image files for some of these pathways manually (remember you may also download pathway data files manually into your working directory and do pathview), and then try your gene and compound data with pathview. You will see that. HTHs. Weijun
ADD REPLY
0
Entering edit mode

Hi Weijun,

Thanks for the reply. I tried to download them manually and placing them on the folder, but when I run pathview(), it rewrites the xml file to the empty version. If you have any idea on how to overcome this, please let me know.

Cheers,

Lucas

ADD REPLY
0
Entering edit mode
Luo Weijun ★ 1.6k
@luo-weijun-1783
Last seen 10 months ago
United States
Lucas, You would need to manually download both xml file and png (image) files for each pathway. Otherwise, pathview assume the data is incomplete and try to download it instead, hence overwrite the original files. HTHs.
ADD COMMENT

Login before adding your answer.

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