Skip to content

Commit 6c5c4dd

Browse files
committed
fixed obi pruning
1 parent de00d84 commit 6c5c4dd

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

docs/odk-workflows/RepositoryFileStructure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ These are the current imports in BERO
2020
| po | http://purl.obolibrary.org/obo/po.owl | None |
2121
| omo | http://purl.obolibrary.org/obo/omo.owl | None |
2222
| ecocore | http://purl.obolibrary.org/obo/ecocore.owl | None |
23-
| obi | http://purl.obolibrary.org/obo/obi.owl | None |
2423
| to | http://purl.obolibrary.org/obo/to.owl | None |
2524
| chebi | http://purl.obolibrary.org/obo/chebi.owl | None |
2625
| ncbitaxon | http://purl.obolibrary.org/obo/ncbitaxon/subsets/taxslim.owl | None |
@@ -30,6 +29,7 @@ These are the current imports in BERO
3029
| edam | https://edamontology.org/EDAM_1.25.owl | custom |
3130
| pato | http://purl.obolibrary.org/obo/pato.owl | custom |
3231
| mesh | https://raw.githubusercontent.com/cmungall/mesh2owl/master/mesh-obo.obo | custom |
32+
| obi | http://purl.obolibrary.org/obo/obi.owl | custom |
3333

3434
## Components
3535
Components, in contrast to imports, are considered full members of the ontology. This means that any axiom in a component is also included in the ontology base - which means it is considered _native_ to the ontology. While this sounds complicated, consider this: conceptually, no component should be part of more than one ontology. If that seems to be the case, we are most likely talking about an import. Components are often not needed for ontologies, but there are some use cases:

src/ontology/Makefile

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ all_main: $(MAIN_FILES)
9797
# ----------------------------------------
9898

9999

100-
IMPORTS = mop po omo ecocore obi to chebi ncbitaxon envo go ncit edam pato mesh
100+
IMPORTS = mop po omo ecocore to chebi ncbitaxon envo go ncit edam pato mesh obi
101101

102102
IMPORT_ROOTS = $(patsubst %, $(IMPORTDIR)/%_import, $(IMPORTS))
103103
IMPORT_OWL_FILES = $(foreach n,$(IMPORT_ROOTS), $(n).owl)
@@ -288,6 +288,10 @@ $(IMPORTDIR)/pato_import.owl: $(MIRRORDIR)/pato.owl
288288

289289
$(IMPORTDIR)/mesh_import.owl: $(MIRRORDIR)/mesh.owl
290290
echo "ERROR: You have configured your default module type to be custom; this behavior needs to be overwritten in bero.Makefile!" && false
291+
## Module for ontology: obi
292+
293+
$(IMPORTDIR)/obi_import.owl: $(MIRRORDIR)/obi.owl
294+
echo "ERROR: You have configured your default module type to be custom; this behavior needs to be overwritten in bero.Makefile!" && false
291295

292296
.PHONY: refresh-imports
293297
refresh-imports:
@@ -356,16 +360,6 @@ mirror-ecocore: | $(TMPDIR)
356360
$(ROBOT) convert -i $(MIRRORDIR)/ecocore.owl -o $@.tmp.owl && mv $@.tmp.owl $(TMPDIR)/$@.owl; fi
357361

358362

359-
## ONTOLOGY: obi
360-
.PHONY: mirror-obi
361-
.PRECIOUS: $(MIRRORDIR)/obi.owl
362-
mirror-obi: | $(TMPDIR)
363-
if [ $(MIR) = true ] && [ $(IMP) = true ]; then curl -L $(URIBASE)/obi.owl --create-dirs -o $(MIRRORDIR)/obi.owl --retry 4 --max-time 200 &&\
364-
$(ROBOT) convert -i $(MIRRORDIR)/obi.owl -o $@.tmp.owl && \
365-
$(ROBOT) remove -i $@.tmp.owl --base-iri $(URIBASE)/OBI --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\
366-
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi
367-
368-
369363
## ONTOLOGY: to
370364
.PHONY: mirror-to
371365
.PRECIOUS: $(MIRRORDIR)/to.owl
@@ -444,6 +438,16 @@ mirror-mesh: | $(TMPDIR)
444438
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi
445439

446440

441+
## ONTOLOGY: obi
442+
.PHONY: mirror-obi
443+
.PRECIOUS: $(MIRRORDIR)/obi.owl
444+
mirror-obi: | $(TMPDIR)
445+
if [ $(MIR) = true ] && [ $(IMP) = true ]; then curl -L $(URIBASE)/obi.owl --create-dirs -o $(MIRRORDIR)/obi.owl --retry 4 --max-time 200 &&\
446+
$(ROBOT) convert -i $(MIRRORDIR)/obi.owl -o $@.tmp.owl && \
447+
$(ROBOT) remove -i $@.tmp.owl --base-iri $(URIBASE)/OBI --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\
448+
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi
449+
450+
447451
$(MIRRORDIR)/%.owl: mirror-% | $(MIRRORDIR)
448452
if [ $(IMP) = true ] && [ $(MIR) = true ] && [ -f $(TMPDIR)/mirror-$*.owl ]; then if cmp -s $(TMPDIR)/mirror-$*.owl $@ ; then echo "Mirror identical, ignoring."; else echo "Mirrors different, updating." &&\
449453
cp $(TMPDIR)/mirror-$*.owl $@; fi; fi

src/ontology/bero.Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ $(IMPORTDIR)/obi_import.owl: $(MIRRORDIR)/obi.owl $(IMPORTDIR)/obi_terms_combine
6666
if [ $(IMP) = true ]; then $(ROBOT) remove -i $< \
6767
--term OBI:0000011 \
6868
--select "self descendants" \
69-
--select "owl:deprecated='true'^^xsd:boolean" \
7069
--signature true \
7170
query --update ../sparql/preprocess-module.ru --update ../sparql/inject-subset-declaration.ru --update ../sparql/postprocess-module.ru \
7271
annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) --output $@.tmp.owl && mv $@.tmp.owl $@; fi

0 commit comments

Comments
 (0)