-
Notifications
You must be signed in to change notification settings - Fork 71
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
Remove duplicate annotations from one of two .owl files? #848
Comments
Possibly unmerge? You can do almost anything with SPARQL and If neither of those seems suitable, we can look into the problem more closely. |
very important to get this right. I am relying in unmerge for a lot of things. Can you share your entire test setup with me please? |
I did one more test - I flattened the import file (i.e. removed subClassOf) by using robot:
Now the robot unmerge appears to work with this file! All the right entities and their annotations seem to be preserved in results/source-edit2.owl file. So I think the bug might be something to do with traversing the depth of source-import.owl file? Note in "test 4" there is a "yada comment more test 4" - this differs from import file in that a language tag was applied there. I was testing to see if it spotted the difference and it does, which is appropriate. |
Thank you @ddooley for sending me the setup. I think unmerge works correct - with a small wrinkle. It does not preserve the ontological types. Look at this: Test 4 on main:
Test 4 on import:
Test 4 unmerged file:
It seems like Unfortunately, OWL API tries to be smart and inject declarations when saving. Fortunately OWL API does not inject declarations on load. So here is a hack I have been using to circumvent your issue: Super hack creating an OFN, removing declarations, unmergingMakefile
The unmerged Test 4 now looks like this:
And you can see it in Protege. Let me know if you have any more questions! |
BTW @ddooley I really applaud the effort you are making here for FOODON, I think this is the right path and role model stuff! I have tried doing it for other ontologies as well, and its a lot of work - but I think this is what we need to do for OBO. |
Ok, I never would have thought of the Description/Declaration statements and unknown rdf:about issue. I will check out your solution of removing declaration statements in the ofn format of source-import.owl . Thanks! This reminds me, about ofn: I've been keeping all of my ontology files stored as .owl rdf/xml syntax. Should I be using ofn Owl Functional Syntax for all development / published files? Are there gotchas in switching from rdf/xml to ofn ? I recall ofn is great for consistent github file line ordering for better diffs. And finally, I'd save it as ofn but keep .owl suffixes? I guess ofn does not preserve xml entity namespace abbreviations? |
I personally recommend to keep edit files in ofn, and release (published) files in RDFXML! The latter is actually OBO standard, the former convention mostly in my world. OFN is just better for diffing. |
I will close this ticket but feel free to open again if other problems! |
I agree, but will add if you stick to the most useful subset of OWL you can
use obo format for the edit file, which is best for diffs and hand edits.
Protege reads this fine. You can keep additional axioms in a separate owl
file, possibly generated from templates rather than edited in protege.
…On Thu, May 13, 2021 at 10:22 AM Nico Matentzoglu ***@***.***> wrote:
I personally recommend to keep edit files in ofn, and release (published)
files in RDFXML! The latter is actually OBO standard, the former convention
mostly in my world.
OFN is just better for diffing.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#848 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAMMONYB67ICX4C56ER5OLTNQDEJANCNFSM44XESUDQ>
.
|
We have been migrating many ontology entities from a foodon-edit.owl file to google sheets as robot templates, then to robot managed .owl files. What I was trying to then do is find a robot command that would spot any entity annotation in the robot .owl file which was duplicated in the original foodon-edit.owl, and remove it from foodon-edit.owl , so that the robot .owl file would then be a clean, non-redundant import. (I didn't want to manually delete them from foodon-edit.owl, especially as there may still be some annotations there to preserve as they don't fit in the robot template pattern)
So am I missing an obvious way?
Cheers for all the good work on robot btw.
Damion
The text was updated successfully, but these errors were encountered: