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

Error when running get_associations() #39

Closed mightyphil2000 closed 1 year ago

mightyphil2000 commented 1 year ago

When running gwasrapidd::get_associations(efo_id ="EFO:0001663",verbose = verbose,warnings = warnings)

I get the following error message: Error: Elements 1 of is_efo_id2(efo_id) are not true

I wonder what is the cause of the error?

mightyphil2000 commented 1 year ago

So it actually does work if the efo_id looks like (underscore instead of semicolon) "EFO_0001663" but not "EFO:0001663"

Is this a bug? Should the script allow semicolons? I got the efo from here: https://www.ebi.ac.uk/ols/ontologies/efo/terms?short_form=EFO_0001663

Although the url has the underscore in the efo, if you go to the web page the efo has a semicolon and not an underscore.

ramiromagno commented 1 year ago

Hi Philip!,

Thank you for taking the time to bring this to my attention.

You are right that get_associations() expects an EFO identifier in the format EFO_0000000, and should not have a colon. It seems both formats are possible. According to this website, it seems that the format adopted by gwasrapidd is called the Open Targets JSON schema. The format using the colon is internal normalised CURIE representation.

I think it is best to keep it this way as it matches the way the GWAS Catalog uses EFO identifiers:

snap

mightyphil2000 commented 1 year ago

Thanks Ramiro!

Yes agree that makes sense.

BTW, I should have said colon not semicolon!

ramiromagno commented 1 year ago

oh yeah! :) and I repeated the same mistake :D