Skip to content

Add 'ontology' selection for remove and filter#452

Merged
jamesaoverton merged 8 commits intoontodev:masterfrom
beckyjackson:select-ontology
Mar 14, 2019
Merged

Add 'ontology' selection for remove and filter#452
jamesaoverton merged 8 commits intoontodev:masterfrom
beckyjackson:select-ontology

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