Open allysonlister opened 1 year ago
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?
I understand, and I can do that - thanks!
(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!