-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing ontology terms #6
Comments
Regarding robotOk, so something else I've noticed: setting the path to robot myself (via this function which downloads robot from https://github.com/ontodev/robot/releases) yields different results than running Cell Ontology exampleHere's another example from the Cell Ontology. Attempt 1ont <- simona::import_ontology("http://purl.obolibrary.org/obo/cl.owl")
Attempt 2Here I download robot and set the path to it myself. KGExplorer:::get_ontology_robot()
ont <- simona::import_ontology("http://purl.obolibrary.org/obo/cl.owl", remove_rings=TRUE)
grep("CL:0002494",ont@terms)
# [1] 0
But cardiocytes (CL:0002494) is indeed a term in the current CL: Attempt 3This time, I'll try using the method of running try({
ont <- simona::import_ontology("http://purl.obolibrary.org/obo/cl.owl", remove_rings=TRUE)
})
ont <- simona::import_ontology("http://purl.obolibrary.org/obo/cl.owl", remove_rings=TRUE)
grep("CL:0002494",ont@terms)
# [1] 1213
Success! So it seems my attempts to avoid the initial error with |
That said, i'm still noticing missing terms when using the OBO file directly from the CL GitHub: ont <- simona::import_ontology("https://github.com/obophenotype/cell-ontology/releases/download/v2024-02-13/cl-base.obo")
"CL:0002494" %in% ont@terms
# FALSE
|
Any idea of what might be going on here @jokergoo ? I'm in the process of publishing several papers that revolve around the use of |
The error of the path of robot.jar has been fixed. I just forgot to update the variable which saves the path after robot.jar is downloaded. For the missing terms, that was a stupid bug. it is something like Now the two bugs are all fixed. Please update from GitHub.
And
|
Awesome! I'll try it out, thanks |
Just wait, I found another bug... |
Just found I haven't considered the following tag in the obo file:
|
I would say, the obo/owl formats are more complex than I thought... I am not an expert in this field. I worked with GO very often but not with other ontologies. It seems the Currently, there are the following three ways to process ontology files.
And if you only restrict the DAG object to CL terms:
With the new github version, you can also filter the namespace by:
Then the three object
You still need to update the package from GitHub. I made some small changes. |
Thanks for the updates @jokergoo |
"intersection_of" is syntax in OBO for equivalent class statements - better not handle these if you dont know exactly what they mean (it does mean "AND"), so you can assume that all intersections together correspond to one big equivalent class statement with lots of AND AND statements. Lucky for you, technically, you can use this as an There is a big push in OBO to make sure that the x-base.obo/owl files include all subclass statements, not just x.owl/obo. This is not yet true though for all ontologies, but it is for CL and Mondo for example. |
Nico is correct, you can ignore intersectionof.
…On Thu, Apr 4, 2024 at 10:31 AM Nico Matentzoglu ***@***.***> wrote:
"intersection_of" is syntax in OBO for equivalent class statements -
better not handle these if you dont know exactly what they mean (it does
mean "AND"), so you can assume that all intersections together correspond
to one big equivalent class statement with lots of AND AND statements.
Lucky for you, technically, you can use this as an isa but this is really
not what general tools should be doing.
There is a big push in OBO to make sure that the x-base.obo/owl files
include *all* subclass statements, not just x.owl/obo. This is not yet
true though for all ontologies, but it is for CL and Mondo for example.
—
Reply to this email directly, view it on GitHub
<#6 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAMMOIHW35KLOUOEPTSNUDY3WE7BAVCNFSM6AAAAABD7WVXL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZXG44TGOBWGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hey @jokergoo, thanks again for the updates. Just tried using the current dev version of no slot of name "alternative_terms" for this object of class "ontology_DAG"First, the latest version of simona doesn't seem to be back-compatible with Error in term_to_node_id(dag, terms, strict = FALSE) :
no slot of name "alternative_terms" for this object of class "ontology_DAG" Would be nice to gracefully handle older objects by not using slots that don't exist in the object. Missing
|
@bschilder Did you use the version from GitHub?
You cannot use it on older objects because the definition of the |
Yes, but it looks like you've made some additional changes since I last installed. Not sure where to find the exact version of the cl-basic.obo you're using, but here's an example that uses a version we can both access: ont <- simona::import_ontology("http://purl.obolibrary.org/obo/cl/releases/2024-04-05/cl.owl", remove_cyclic_paths = TRUE, remove_rings = TRUE) In my original report, this is how i was checking whether the term was available. "CL:0000111" %in% ont@terms # FALSE
"CL:0000111" %in% ont@alternative_terms # FALSE
"CL:0000111" %in% names(ont@alternative_terms) # TRUE But it seems I can confirm that other downstream functions are able to use the alt IDs. So things are looking good in this regard! simona::shortest_distances_via_NCA(ont, terms = "CL:0000111")
Ok, but if that's the case then it would be good to return an error that lets users know this. Otherwise, it's not obvious what the issue is. I only figured it out because I'm involved in this thread. |
Hi again!,
I've noticed something a bit strange when importing ontologies as
ontology_DAG
objects. There seems to be some terms that are available on the OLS but not when I import the file withsimona
.I can confirm both are pulling from the same remote OWL file.
https://www.ebi.ac.uk/ols4/ontologies/uberon
I can also confirm that the term is searchable and not deprecated on OLS:
https://www.ebi.ac.uk/ols4/ontologies/uberon/classes/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FUBERON_0001155
This doesn't seem to be specific to UBERON, as I've noticed similar issues with CL.
https://www.ebi.ac.uk/ols4/ontologies/cl
Do you have an idea of what might be going on here?
Thanks!,
Brian
The text was updated successfully, but these errors were encountered: