You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Apologies in advance if the title isn't quite right - please edit as required!)
As discussed on Slack here, I have experienced some odd behaviour when using robot remove in the following situation...
Goal: retain labels, isDefinedBy, and definitions from a subset of CHMO that I've previously created with extract.
Actual result: the command below works as expected ONLY when the IAO definitions DO NOT themselves have annotation properties on them. When the definitions themselves have annotation properties, the entire definition is removed.
Here is my command (feel free to just use the entire CHMO ontology here instead of my tmp file of course ;-) ):
Although some classes, such as BFO independent continuant are being correctly modified with the above command, the CHMO classes are NOT. Here is an example CHMO class before running the remove command:
<!-- http://purl.obolibrary.org/obo/CHMO_0000156 -->
<owl:Classrdf:about="http://purl.obolibrary.org/obo/CHMO_0000156">
<rdfs:subClassOfrdf:resource="http://purl.obolibrary.org/obo/CHMO_0000141"/>
<obo:IAO_0000115>A method for determining structure by directing a beam of X-rays at the sample and detecting the positions and intensities of the diffracted X-rays as a pattern of spots on a photographic plate.</obo:IAO_0000115>
<oboInOwl:hasExactSynonym>X-Ray crystallographic analysis</oboInOwl:hasExactSynonym>
<oboInOwl:hasExactSynonym>X-ray analysis</oboInOwl:hasExactSynonym>
<oboInOwl:hasExactSynonym>X-ray crystallography</oboInOwl:hasExactSynonym>
<oboInOwl:hasExactSynonym>X-ray diffraction analysis</oboInOwl:hasExactSynonym>
<oboInOwl:hasExactSynonym>X-ray diffractometry</oboInOwl:hasExactSynonym>
<oboInOwl:hasExactSynonym>X-ray structure determination</oboInOwl:hasExactSynonym>
<oboInOwl:hasExactSynonym>XRD</oboInOwl:hasExactSynonym>
<oboInOwl:id>CHMO:0000156</oboInOwl:id>
<rdfs:isDefinedByrdf:resource="http://purl.obolibrary.org/obo/chmo.owl"/>
<rdfs:label>X-ray diffraction</rdfs:label>
</owl:Class>
<owl:Axiom>
<owl:annotatedSourcerdf:resource="http://purl.obolibrary.org/obo/CHMO_0000156"/>
<owl:annotatedPropertyrdf:resource="http://purl.obolibrary.org/obo/IAO_0000115"/>
<owl:annotatedTarget>A method for determining structure by directing a beam of X-rays at the sample and detecting the positions and intensities of the diffracted X-rays as a pattern of spots on a photographic plate.</owl:annotatedTarget>
<oboInOwl:hasDbXref>FIX:0000007</oboInOwl:hasDbXref>
<oboInOwl:hasDbXref>ISBN:90190280031-0</oboInOwl:hasDbXref>
</owl:Axiom>
And here is the same CHMO class after running remove (label and isDefinedBy are kept, but definition has been "incorrectly" removed):
At Philip's suggestion, I then created a test version of CHMO that didn't have the annotations on IAO definition. When I run the remove command over that modified ontology, remove functions as expected:
<!-- http://purl.obolibrary.org/obo/CHMO_0000156 -->
<owl:Classrdf:about="http://purl.obolibrary.org/obo/CHMO_0000156">
<rdfs:subClassOfrdf:resource="http://purl.obolibrary.org/obo/CHMO_0000141"/>
<obo:IAO_0000115>A method for determining structure by directing a beam of X-rays at the sample and detecting the positions and intensities of the diffracted X-rays as a pattern of spots on a photographic plate.</obo:IAO_0000115>
<rdfs:isDefinedByrdf:resource="http://purl.obolibrary.org/obo/chmo.owl"/>
<rdfs:label>X-ray diffraction</rdfs:label>
</owl:Class>
I would be agnostic about whether or not the associated properties are retained or removed. The important thing for me is that the definition is retained.
Thanks!
The text was updated successfully, but these errors were encountered:
I'm terrified of digging into the remove code. As a workaround, could you remove the annotations from the IAO annotation properties in a first step, then do this task as a second step?
(Apologies in advance if the title isn't quite right - please edit as required!)
As discussed on Slack here, I have experienced some odd behaviour when using
robot remove
in the following situation...Goal: retain labels, isDefinedBy, and definitions from a subset of CHMO that I've previously created with
extract
.Actual result: the command below works as expected ONLY when the IAO definitions DO NOT themselves have annotation properties on them. When the definitions themselves have annotation properties, the entire definition is removed.
Here is my command (feel free to just use the entire CHMO ontology here instead of my tmp file of course ;-) ):
java -jar ~/Programs/robot.jar remove --input chmo-import-tmp.owl --term rdfs:label --term IAO:0000115 --term rdfs:isDefinedBy --select complement --select annotation-properties --output chmo-import-tmp2.owl
Although some classes, such as BFO independent continuant are being correctly modified with the above command, the CHMO classes are NOT. Here is an example CHMO class before running the remove command:
And here is the same CHMO class after running remove (label and isDefinedBy are kept, but definition has been "incorrectly" removed):
At Philip's suggestion, I then created a test version of CHMO that didn't have the annotations on IAO definition. When I run the remove command over that modified ontology,
remove
functions as expected:I would be agnostic about whether or not the associated properties are retained or removed. The important thing for me is that the definition is retained.
Thanks!
The text was updated successfully, but these errors were encountered: