ramiromagno / gwasrapidd

gwasrapidd: an R package to query, download and wrangle GWAS Catalog data
https://rmagno.eu/gwasrapidd/
Other
89 stars 15 forks source link

About failing download the studies of "get_studies()“ #38

Closed huyou0916 closed 1 year ago

huyou0916 commented 1 year ago

Professor: There is one question I want to consult. When I input command of "get_sudies()",

Allstudies <- get_studies()

Do you still want to proceed (y/n)? y

R.studio return: "OK! Getting all studies then. This is going to take a while... downloading [==>--------------------------------] 8% eta: 4hWarning: The request for https://www.ebi.ac.uk/gwas/rest/api/studies?page=332&size=20 failed: response code was 500. downloading [=========================>---------] 74% eta: 1hWarning: The request for https://www.ebi.ac.uk/gwas/rest/api/studies?page=2957&size=20 failed: response code was 500. downloading [==============================>----] 89% eta: 23m"

Could you tell me how can I deal with this problem? Looking forward to your reply. Thank you very much.

ramiromagno commented 1 year ago

Allstudies.rds.zip Hi @huyou0916,

{gwasrapidd} uses the GWAS Catalog REST API to fetch that data. It does this by iteratively performing multiple HTTP requests. The two 500 errors you got indicate an internal error with the GWAS Catalog server.

I've tried again those URLs that triggered the errors and they seem to be working fine, in isolation. So I guess it might have been a momentary fluke. I'd suggest you try again. Be warned though that fetching all study information in one go will not be the most agile approach. If you really interested in all studies, it might be more practical to download one of the data dumps provided by the GWAS Catalog team: https://www.ebi.ac.uk/gwas/docs/file-downloads.

See attached file. Unzip it first and then load the object with readRDS("Allstudies.rds").

huyou0916 commented 1 year ago

Thank you for your reply and advice. I have tried to fetch one study and then succeeded.

ramiromagno commented 1 year ago

I just tried getting all studies, and although it took a few minutes, in the end I got everything. The R object is provided as an attachment to my previous post.

ramiromagno commented 1 year ago

Hi @huyou0916,

Please do let me know if the issue was resolved so that I can close it.

Thanks!

huyou0916 commented 1 year ago

The problem has been resolved. Thanks a lot!

ramiromagno commented 9 months ago

Hi @huyou0916: I would like to reach out by email. Could you send me an email to rmagno at pattern.institute?