lgatto / rols

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

Search gives me results outside of the cell ontology, despite specification #33

Open LTLA opened 3 years ago

LTLA commented 3 years ago
library(rols)
qry <- OlsSearch("lymphatic", ontology="CL")
out <- olsSearch(qry)
df <- as(out, "data.frame")
df$obo_id[1:10]
##  [1] "UBERON:0001473" "CL:0002554"     "CL:0002138"     "CL:0019017"
##  [5] "CL:2000011"     "UBERON:0006558" "UBERON:0003456" "UBERON:0002042"
##  [9] "UBERON:0035198" "UBERON:0004232"

My guess is that you're picking up terms that are linked to but not part of the Cell Ontology. For example, some CL terms will be annotated with the tissue of origin from UBERON.

Seems like it would make a lot of sense for local="true" to be the default when ontology= is specified:

qry <- OlsSearch("lymphatic", ontology="CL", local="true")
out <- olsSearch(qry)
df <- as(out, "data.frame")
df$obo_id[1:10]
##  [1] "CL:0002554" "CL:0002138" "CL:0019017" "CL:2000011" "CL:2000041"
##  [6] "CL:0005020" "CL:0005022" "CL:0002139" "CL:0005021" NA

Of course, I only know this from reading the REST API documentation at https://www.ebi.ac.uk/ols/docs/api; this information is not anywhere in the vignette or in the package documentation. ?OlsSearch is particularly unhelpful.

Session info is the same as #32.

lgatto commented 3 years ago

Your suggestion seems reasonable, but I won't have time to look into this for now.

lgatto commented 9 months ago

Keeping track of this, but now, it seems that there's an issue on the server side level - https://github.com/EBISPOT/ols4/issues/623.