Timeout error in kegga() using edgeR
3
0
Entering edit mode
Likai Mao ▴ 40
@likai-mao-9454
Last seen 8.0 years ago
QIMR, Brisbane, Australia

I was using edgeR for an exact test (output to a variable "et"), done by exactTest() function. Then I used goana(et, species='Hs') function to do GO enrichment analysis and kegga(et, species='Hs') to do KEGG analysis. GO analysis was OK but KEGG analysis went wrong (see the code and output below). I googled but couldn't find useful hints. Anyone have any idea of it? Thanks in advance.

> et <- exactTest(y)
> keg <- kegga(et,species='Hs')
Error in curl::curl_fetch_memory(url, handle = handle) : 
  Timeout was reached
> traceback()
12: .Call(R_curl_fetch_memory, url, handle)
11: curl::curl_fetch_memory(url, handle = handle)
10: request_fetch.write_memory(req$output, req$url, handle)
9: request_fetch(req$output, req$url, handle)
8: request_perform(req, hu$handle$handle)
7: GET(url)
6: .getUrl(url, .listParser, nameColumn = 1, valueColumn = 2)
5: KEGGREST::keggLink("pathway", organism)
4: kegga.default(de = DEGenes, universe = universe, ...)
3: kegga(de = DEGenes, universe = universe, ...)
2: kegga.DGEExact(et, species = "Hs")
1: kegga(et, species = "Hs")
> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252   
[3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C                      
[5] LC_TIME=English_Australia.1252    

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

other attached packages:
[1] edgeR_3.12.0 limma_3.26.3

loaded via a namespace (and not attached):
 [1] locfit_1.5-9.1      IRanges_2.4.6       lattice_0.20-33    
 [4] png_0.1-7           Biostrings_2.38.3   grid_3.2.0         
 [7] R6_2.1.1            stats4_3.2.0        magrittr_1.5       
[10] httr_1.0.0          zlibbioc_1.16.0     stringi_1.0-1      
[13] curl_0.9.4          XVector_0.10.0      S4Vectors_0.8.5    
[16] splines_3.2.0       tools_3.2.0         stringr_1.0.0      
[19] parallel_3.2.0      BiocGenerics_0.16.1 KEGGREST_1.10.0

EDIT: From the traceback output, it should be a problem of KEGGREST package. I added it into tag.

edger kegga keggrest • 3.8k views
ADD COMMENT
0
Entering edit mode

I restarted R and did it again. The error was same but it had 2 additional warning messages. I put them here just in case. Function traceback() returned same output.

> keg <- kegga(et,species='Hs')
Error in curl::curl_fetch_memory(url, handle = handle) : 
  Timeout was reached
In addition: Warning messages:
1: In .recacheSubclasses(def@className, def, doSubclasses, env) :
  undefined subclass "externalRefMethod" of class "expressionORfunction"; definition not updated
2: In .recacheSubclasses(def@className, def, doSubclasses, env) :
  undefined subclass "externalRefMethod" of class "functionORNULL"; definition not updated
ADD REPLY
1
Entering edit mode

Start a new session and try this:

requireNamespace("KEGGREST")
KEGGREST::keggLink("pathway", "hsa")

Does it give an error?

ADD REPLY
0
Entering edit mode

Yes. Same error.

ADD REPLY
0
Entering edit mode

Can you open the following URL in your browser?

http://rest.kegg.jp/link/pathway/hsa

ADD REPLY
0
Entering edit mode

I saw your reply just now. Yes, I can. I have fixed the problem as stated in my another reply. Thanks anyway.

ADD REPLY
1
Entering edit mode
@gordon-smyth
Last seen 3 hours ago
WEHI, Melbourne, Australia

The problem seems to be either with curl or with your internet connection, so it is not something that the edgeR or limma developers can solve.

Also, we can't reproduce your problem -- it all works fine for us. Perhaps there is a problem with your internet connection that might be timing out.

ADD COMMENT
0
Entering edit mode

Yes. It's not problem of edgeR. Same code worked at my home using Mac. It should be the problem of connection. I will contact IT. Thanks anyway.

ADD REPLY
0
Entering edit mode
Dan Tenenbaum ★ 8.2k
@dan-tenenbaum-4256
Last seen 3.1 years ago
United States

Actually it looks like an issue with KEGGREST, thanks to Martin Morgan for bringing it to my attention.

I've just committed a fix to release (KEGGREST 1.10.1) and devel (1.11.1). This should be available via biocLite() tomorrow early afternoon Seattle time or right away via svn (release url is  https://hedgehog.fhcrc.org/bioconductor/branches/RELEASE_3_2/madman/Rpacks/KEGGREST, username/password is readonly).

Dan

 

ADD COMMENT
0
Entering edit mode

Thanks for that. I wonder though why I don't see the same error with KEGGREST 1.10.0 or 1.11.0? The following code works fine for me:

library(limma)
library(org.Hs.eg.db)
EG <- keys(org.Hs.eg.db)
DE <- sample(500,EG)
ke <- kegga(de=DE, universe=EG, species="Hs")
topKEGG(ke)

> sessionInfo()
R Under development (unstable) (2015-12-26 r69814)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252   
[3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C                      
[5] LC_TIME=English_Australia.1252    

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

other attached packages:
[1] org.Hs.eg.db_3.2.3   RSQLite_1.0.0        DBI_0.3.1            AnnotationDbi_1.33.4
[5] IRanges_2.5.18       S4Vectors_0.9.16     Biobase_2.31.3       BiocGenerics_0.17.2 
[9] limma_3.27.7        

loaded via a namespace (and not attached):
 [1] Biostrings_2.39.6 png_0.1-7         R6_2.1.1          magrittr_1.5     
 [5] httr_1.0.0        zlibbioc_1.17.0   stringi_1.0-1     curl_0.9.4       
 [9] XVector_0.11.1    tools_3.3.0       stringr_1.0.0     KEGGREST_1.11.0 
ADD REPLY
0
Entering edit mode

I'll have to look into it a little deeper. Martin's report may have been unrelated to the original issue (though the discovery was prompted by it), but he definitely noticed a bug which was that my code was depending on a textual value in the response to determine whether there was an error, but it should have been depending on the http status in the response. Sorry if I muddied the waters.

ADD REPLY
0
Entering edit mode

If it helps, here is the minimal code that reproduces kegga's call to KEGGREST. It works fine for me in a clean session in either R 3.2.3 or R-devel. I have run with it with both KEGGREST 1.11.0 and 1.11.1. 

requireNamespace("KEGGREST")
KEGGREST::keggLink("pathway", "hsa")
ADD REPLY
0
Entering edit mode

Thank you Dan and Gordon. My problem may not be the bug you fixed as same code worked when I was using another network. I will also try the new version. It seem it is not available to me yet, or because I'm using older environment? I'm using Bioconductor 3.2 (BiocInstaller 1.20.1), R 3.2.0 (2015-04-16).

ADD REPLY
0
Entering edit mode

Turns out I just missed the deadline yesterday, so it will not be available (via biocLite() ) until this morning.

Sounds like your issue is not related though.

 

ADD REPLY
0
Entering edit mode

Yes. I have updated to KEGGREST_1.10.1 and confirmed the error persists.

ADD REPLY
0
Entering edit mode
Likai Mao ▴ 40
@likai-mao-9454
Last seen 8.0 years ago
QIMR, Brisbane, Australia

I finally fixed the problem by setting proxy as stated in this link. But the "http_proxy_user=user:passwd" style didn't suit me. I put user name and password before URL, as stated in wiki.

ADD COMMENT

Login before adding your answer.

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