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
Is this simply because
md:stm_M00841
is not in the KEGG database? If I try and debug thisand 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.