KEGGREST keggGet fails to retrieve modules, but not pathways
0
0
Entering edit mode
predeus • 0
@predeus-9207
Last seen 3.9 years ago
United States

Hello all,

about a year ago I wrote a simple wrapper for KEGGREST to generate a collection of modules and pathways for a particular organism in the form of .gmt file, which is very useful for gene set enrichment tools like fgsea. Coming back to use the code a year later, I discovered that keggGet command started to fail when trying to retrieve modules (but not pathways).

For example, for Salmonella Typhimurium LT2 (KEGG organism code stm), modules are named something like md:stm_M00841, and pathways have a format like path:stm03440. Running the two commands produces very different outputs though:

keggGet("path:stm00550")`

> [[1]] [[1]]$ENTRY    Pathway  "stm00550" 
> 
> [[1]]$NAME [1] "Peptidoglycan biosynthesis - Salmonella enterica
> subsp. enterica serovar Typhimurium LT2"
> ..................................

keggGet("md:stm_M00841")`
>Error in .getUrl(url, .flatFileParser) : Not Found (HTTP 404).

Any ideas why this would happen? Thank you in advance. Below is the output of sessionInfo().

> sessionInfo() R version 3.6.1 (2019-07-05) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 8.1 x64 (build 9600)
> Matrix products: default
> 
> locale: [1] LC_COLLATE=Russian_Russia.1251 
> LC_CTYPE=Russian_Russia.1251    LC_MONETARY=Russian_Russia.1251
> LC_NUMERIC=C                    LC_TIME=Russian_Russia.1251    
> 
> attached base packages: [1] stats     graphics  grDevices utils    
> datasets  methods   base     
> 
> other attached packages: [1] KEGGREST_1.24.1
> 
> loaded via a namespace (and not attached):  [1] zlibbioc_1.30.0    
> httr_1.4.1          compiler_3.6.1      R6_2.4.1           
> IRanges_2.18.3      XVector_0.24.0      parallel_3.6.1     
> tools_3.6.1          [9] curl_4.2            Biostrings_2.52.0  
> S4Vectors_0.22.1    BiocGenerics_0.30.0 stats4_3.6.1        png_0.1-7
keggrest software error pathways modules kegg • 1.6k views
ADD COMMENT
0
Entering edit mode

Is this simply because md:stm_M00841 is not in the KEGG database? If I try and debug this

> debug(KEGGREST:::.getUrl)
> keggGet("md:stm_M00841")
debugging in: .getUrl(url, .flatFileParser)
...
Browse[2]> url
[1] "http://rest.kegg.jp/get/md:stm_M00841"

and then go to the URL in the browser, I'm told that the page does not exist. Yet the general format of the URL is correct, as in the examples at https://www.kegg.jp/kegg/rest/keggapi.html#get.

ADD REPLY

Login before adding your answer.

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