lgatto / rols

An R package to query EBI's Ontology Lookup Service (OLS)
http://lgatto.github.io/rols/
10 stars 6 forks source link

Error 404 for getting Terms from EFO #42

Open quirinmanz opened 8 months ago

quirinmanz commented 8 months ago

Hi,

Thanks for the helpful package.

I realized that e.g., for EFO, there is a problem when trying to access a term like:

> Term('efo', 'EFO:0001200')
Error during wrapup: HTTP 404 Not Found.

This might be because in https://github.com/lgatto/rols/blob/1f85f319d8ebae6c7dcf539719150e5a4b2bf783/R/Terms.R#L192 http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252F is hardcoded, but should be http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252F for efo instead.

https://www.ebi.ac.uk/ols4/api/ontologies/efo/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0001200 works, while https://www.ebi.ac.uk/ols4/api/ontologies/efo/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FEFO_0001200 gives a 404 ERROR.

I would appreciate any help.

Best, Quirin

lgatto commented 8 months ago

Thank you - yes, there's an issue with URL encoding. Will look into it asap.

quirinmanz commented 8 months ago

Just a thought: It looks like the fileLocation in config maps to the correct URL. Maybe the 'Ontology' signature should become the main signature instead of 'character.'

> Ontology('efo')@config$fileLocation
[1] "http://www.ebi.ac.uk/efo/efo.owl"
> Ontology('cl')@config$fileLocation
[1] "http://purl.obolibrary.org/obo/cl.owl"
lgatto commented 8 months ago

This has been fixed in the latest version - could you check on your side? Thank!