saezlab / decoupleR

R package to infer biological activities from omics data using a collection of methods.
https://saezlab.github.io/decoupleR/
GNU General Public License v3.0
183 stars 24 forks source link

Issue with Omnipath retrieving data #65

Closed jsangalang closed 1 year ago

jsangalang commented 1 year ago

Hello,

I'm not sure what happened, but there seems to be an issue when I try retrieving PROGENy data using decoupleR.

> TF_net <- decoupleR::get_progeny(organism = "human", top = 100)
Error in open.connection(con, "rb") : TCP connection reset by peer
deeenes commented 1 year ago

Hello, I can't reproduce this issue:

library(OmnipathR)
pr <- import_omnipath_annotations(resources = 'PROGENy', wide = TRUE)
# [2022-12-15 16:27:57] [SUCCESS] [OmnipathR] Downloaded 700257 annotation records.

The OmniPath server drops HTTP connections if it encounters 10 or more incoming connections from the same address in one second. Or if the client address is part of a handful blacklisted addresses (218.161.75.200, 3.18.62.154 and 203.195.218.37).

Have you tried it many times, and on different networks?

jsangalang commented 1 year ago

I tried it maybe 5 times, but not all in one second. Now trying it again, it gives this error:

> TF_net <- import_omnipath_annotations(resources = 'PROGENy', wide = TRUE)
Error in open.connection(con, "rb") : Encountered end of file
deeenes commented 1 year ago

This is a different error, suggesting that the reason is something generic, such as slow network connection, or firewall.

To find out why a download fails, we have to see curl debug log. I would suggest to do it both in R and bash:

library(curl)
h <- new_handle(verbose = TRUE)                                                                                                                                                                                                                                                                                                                                                                                                
con <- curl('https://omnipathdb.org/annotations?resources=PROGENy', handle = h)                                                                                                                                                                                                                                                                                                                                                
lns <- readLines(con)
curl -vvv 'https://omnipathdb.org/annotations?resources=PROGENy' > progeny.tsv