Skip to content
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

Add 'ontology' selection for remove and filter #452

Merged
merged 8 commits into from
Mar 14, 2019

Conversation

beckyjackson
Copy link
Contributor

@beckyjackson beckyjackson commented Mar 13, 2019

To remove or filter for the ontology annotations:

robot filter --input x.owl --select ontology --output y.owl

Returns a new ontology with only the ontology annotations from x.owl

robot remove --input x.owl --select ontology --output y.owl

Returns a copy of x.owl without any ontology annotations.

See #451

@matentzn
Copy link
Contributor

Just to be annoying (sorry):

robot filter --input x.owl --select ontology --term-file terms.txt --trim false --output y.owl

Returns a new ontology y with the ontology annotations from x.owl and all axioms containing terms in terms.txt?

@beckyjackson
Copy link
Contributor Author

No worries. Yes, that is correct!

@jamesaoverton
Copy link
Member

I think this is right. It has always bugged me that "imports" is handled in a special way, and now "ontology" is handled in a special way, but I don't see an alternative.

Please include a test that addresses @matentzn's specific use case.

@beckyjackson
Copy link
Contributor Author

Side note, @matentzn - I would also add the annotations selector to that command to make sure any classes that get pulled in as a result of the filter have labels, etc (otherwise they will only have the declarations).

@matentzn
Copy link
Contributor

Thanks @rctauber!

@jamesaoverton jamesaoverton merged commit 741ce8f into ontodev:master Mar 14, 2019
@beckyjackson beckyjackson deleted the select-ontology branch May 2, 2019 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants