INCATools / ontology-development-kit

Bootstrap an OBO Library ontology
http://incatools.github.io/ontology-development-kit/
BSD 3-Clause "New" or "Revised" License
219 stars 54 forks source link

slme_individuals: exclude keeps individuals in imports #854

Closed pfabry closed 1 year ago

pfabry commented 1 year ago

This issue is a follow-up of #849

I tried to filter out individuals in *-odk.yaml:

import_group:
    products:
    - id: bfo
    - id: omo
      module_type: slme (I believe that this line is unnecessary)
      slme_individuals: exclude

Update_repo created the following command in the makefile:

## Module for ontology: omo

$(IMPORTDIR)/omo_import.owl: $(MIRRORDIR)/omo.owl $(IMPORTDIR)/omo_terms_combined.txt
    if [ $(IMP) = true ]; then $(ROBOT) query -i $< --update ../sparql/preprocess-module.ru \
        extract -T $(IMPORTDIR)/omo_terms_combined.txt --copy-ontology-annotations true --force true --individuals exclude --method BOT \
        query --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
        $(ANNOTATE_CONVERT_FILE); fi

Yet, the resulting omo_import.owl still includes all individuals from mirrored OMO.

example: https://github.com/pfabry/ODKTestImports/pull/5

edit: running directly the ROBOT command extract with --individuals exclude also keeps the individuals: robot extract --method BOT --input omo_import.owl --term-file omo_terms_combined.txt --individuals exclude --output omo_test.owl

matentzn commented 1 year ago

Interesting! I think this may have to be turned into a ROBOT ticket; my initial intuition is that "individuals exclude" only removes axioms where an individual is the "subject". If you agree that this is a ROBOT issue more than an ODK issue, can you move the issue there?

pfabry commented 1 year ago

Indeed this is a problem more relevant to ROBOT than ODK. cf. https://github.com/ontodev/robot/issues/1111