neurogenomics / MAGMA_Celltyping

Find causal cell-types underlying complex trait genetics
https://neurogenomics.github.io/MAGMA_Celltyping
71 stars 31 forks source link

time out 300s #99

Closed Thinknoon closed 2 years ago

Thinknoon commented 2 years ago

It is not convenient when the internet is not so well if set the timeout=60*5 and when I want to change timeout by using funcion options(timeout=3000) in R command line, It doesn`t work. Thanks for your help ^_^

bschilder commented 2 years ago

Hi @Thinknoon, thanks for reaching out. I'm afraid I don't understand your question though, could you try rephrasing? Preferably with a reproducible example.

Thinknoon commented 2 years ago

Hi, dear bschilder, when I using the function "get_example_gwas" as follow : _gwas_sumstats_path <- MAGMA.Celltyping::get_example_gwas(trait = "fluidintelligence",munged = FALSE) and then I got a Error: "Error in utils::download.file(url = URL, destfile = gwas_sumstats_path) : cannot open URL 'https://www.dropbox.com/s/t3lrfj1id8133sx/20016_irnt.gwas.imputed_v3.both_sexes.tsv.bgz?dl=1' In addition: Warning message: In utils::download.file(url = URL, destfile = gwas_sumstats_path) : URL 'https://www.dropbox.com/s/t3lrfj1id8133sx/20016_irnt.gwas.imputed_v3.both_sexes.tsv.bgz?dl=1': Timeout of 300 seconds was reached" Actuallly, I could connect to the website,but the downloading speed is a little slow.

I checked the files "get_example_gwas_raw.R" and found "options(timeout = 60 * 5)" in line 41, "Timeout of 300 seconds" as it mentioned may be the cause of this problem. so, it would be great if I can set the parameter 'timeout' easily.

bschilder commented 2 years ago

Thank you for making things more clear, this makes sense to me now.

The GWAS example files are rather large, so they do require a decent/stable internet connection to download. I'd recommend using munged=TRUE since the munged file is smaller, as some SNPs have been filtered out.

To your point though, it would be nice to allow users to specify their desired timeout. I'll add this as an argument to get_example_gwas as well as get_ctd.

bschilder commented 2 years ago

Now implemented in latest version: MAGMA.Celltyping 2.0.1