-
Notifications
You must be signed in to change notification settings - Fork 74
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
BUG: robot template with class expressions duplicates classes as datatypes #1203
Comments
I bet this PR is somehow related to this issue: #1104, but I am not sure. Timeline fits. |
I am having the same problem. See https://github.com/PlantPhenoOntology/ppo/blob/odk-conversion/src/ontology/components/PPO_plant_structures.owl. The template is at https://github.com/PlantPhenoOntology/ppo/blob/odk-conversion/src/templates/PPO_plant_structures.tsv I am using the latest ODK. I can't replace RO:0000086 with 'has quality' as @daniwelter was able to do, because of the problem described in #1053. Feeling sad. |
Hi @ramonawalls. You should not need to use CURIEs everywhere in your templates. ROBOT is much happier if you use labels. And you should not need to quote labels most of the time -- only when they occur inside a logical expression. OBI has many examples: https://github.com/obi-ontology/obi/tree/master/src/ontology/templates. In order to parse templates (whether labels or CURIEs) ROBOT needs to know that you're using Object Properties or Data Properties or Annotation Properties or Classes, etc. That's why the |
Thank you again! I'm noting issue #442 so the examples only have to be in one place. @jamesaoverton, could you please provide links to the corresponding input files used in the OBI examples? |
This command runs the various OBI templates: https://github.com/obi-ontology/obi/blob/master/Makefile#L92. It imports |
@matentzn here is an example of a template that generates duplicate datatypes and the corresponding OWL file: https://github.com/PlantPhenoOntology/ppo/blob/odk-conversion/src/templates/PPO_plant_structures.tsv |
A couple more points.
|
I updated my ppo-odk.yaml to include
which generated the following robot command in my makefile
but when I ran |
I also tried copying the latest release of the file to my src/ontology directory and pointing at it
but it didn't make a difference. |
There are good and bad news. The bad news, the problem seems real:
With: template.tsv:
ontology.owl:
results in:
It appears that the "oracle" (--input) does not work as intended. Fortunately there is an easy fix, by simply asserting the type of the object property in the same template:
It does not matter then wether you are using the --input parameter or not:
Works as well. |
Thank you, @matentzn! I'll give it a try. |
It worked! Woohoo! |
I skimmed this today and recognized the problem. Three hours later I have a partial solution. The problem is that when the Manchester parser reads "R some X" it doesn't know whether R is a DataProperty or an ObjectProperty. First it tries to get a DataProperty for R, and if that fails then it tries to get an ObjectProperty for R. Maybe there's a reason for that order. For OBO purposes R is more likely to be an ObjectProperty, and it would be nice to be able to look at X to get a hint. But OWLAPI would have to change this, which could be breaking. The right thing to do is what Nico did: use I think that's the best we can do. |
From the ROBOT Slack channel:
I'm having a weird issue with robot template since the last release. It's probably user error but since I upgraded to v1.9.6, any classes used in class expressions become duplicated as datatypes. This is an extract from my template file:
HANCESTRO:0010
turns out fine butHANCESTRO:0599
is now both a class and a datatype. I've tried various permutations, e.g. having a column header ofand then just
HANCESTRO:0599
in the cell, but the outcome is the same. I also double-checked some components that have been around for a while, and the problem occurs for these as well when it hasn't before (comparing with the current release version from April 2024).As per @jamesaoverton's suggestion, I then replaced
RO:0000086
with'has quality'
(and the same for any other object properties in my templates) and this fixed the issue.Problem replicated in release v1.9.6, 1.9.5 and 1.9.4. Last successful version uncertain but may have been 1.9.2 or 1.9.3.
The text was updated successfully, but these errors were encountered: