Skip to content

Commit

Permalink
Remove NCBITAXON again
Browse files Browse the repository at this point in the history
  • Loading branch information
matentzn committed Mar 27, 2023
1 parent 60282a2 commit 322ebe9
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 23 deletions.
2 changes: 1 addition & 1 deletion docs/odk-workflows/RepositoryFileStructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ These are the current imports in BERO
| ecocore | http://purl.obolibrary.org/obo/ecocore.owl | None |
| to | http://purl.obolibrary.org/obo/to.owl | None |
| chebi | http://purl.obolibrary.org/obo/chebi.owl | None |
| ncbitaxon | http://purl.obolibrary.org/obo/ncbitaxon.owl | None |
| ncbitaxon | http://purl.obolibrary.org/obo/ncbitaxon/subsets/taxslim.owl | None |
| envo | http://purl.obolibrary.org/obo/envo.owl | None |
| go | http://purl.obolibrary.org/obo/go.owl | None |
| ncit | http://purl.obolibrary.org/obo/ncit.owl | custom |
Expand Down
42 changes: 22 additions & 20 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ----------------------------------------
# Makefile for bero
# Generated using ontology-development-kit
# ODK Version: v1.4
# ODK Version: v1.5
# ----------------------------------------
# IMPORTANT: DO NOT EDIT THIS FILE. To override default make goals, use bero.Makefile instead

Expand Down Expand Up @@ -43,7 +43,7 @@ REPORT_PROFILE_OPTS =
OBO_FORMAT_OPTIONS =
SPARQL_VALIDATION_CHECKS = owldef-self-reference iri-range label-with-iri multiple-replaced_by
SPARQL_EXPORTS = basic-report class-count-by-prefix edges xrefs obsoletes synonyms
ODK_VERSION_MAKEFILE = v1.4
ODK_VERSION_MAKEFILE = v1.5

TODAY ?= $(shell date +%Y-%m-%d)
OBODATE ?= $(shell date +'%d:%m:%Y %H:%M')
Expand Down Expand Up @@ -74,6 +74,10 @@ all_odk: odkversion test all_assets
test: odkversion reason_test sparql_test robot_reports
echo "Finished running all tests successfully."

.PHONY: test
test_fast:
$(MAKE_FAST) test

.PHONY: release_diff
release_diff: $(REPORTDIR)/release-diff.md

Expand Down Expand Up @@ -314,12 +318,6 @@ $(IMPORTDIR)/chebi_import.owl: $(MIRRORDIR)/chebi.owl $(IMPORTDIR)/chebi_terms_c
if [ $(IMP) = true ] && [ $(IMP_LARGE) = true ]; then $(ROBOT) merge -i $< \
$(ANNOTATE_CONVERT_FILE); fi

## Module for ontology: ncbitaxon

$(IMPORTDIR)/ncbitaxon_import.owl: $(MIRRORDIR)/ncbitaxon.owl $(IMPORTDIR)/ncbitaxon_terms_combined.txt
if [ $(IMP) = true ] && [ $(IMP_LARGE) = true ]; then $(ROBOT) merge -i $< \
$(ANNOTATE_CONVERT_FILE); fi

## Module for ontology: ncit

$(IMPORTDIR)/ncit_import.owl: $(MIRRORDIR)/ncit.owl
Expand Down Expand Up @@ -377,7 +375,7 @@ IMP_LARGE=true # Global parameter to bypass handling of large imports
mirror-mop: | $(TMPDIR)
if [ $(MIR) = true ] && [ $(IMP) = true ]; then curl -L $(OBOBASE)/mop.owl --create-dirs -o $(MIRRORDIR)/mop.owl --retry 4 --max-time 200 &&\
$(ROBOT) convert -i $(MIRRORDIR)/mop.owl -o $@.tmp.owl && \
$(ROBOT) remove -i $@.tmp.owl --base-iri $(URIBASE)/MOP --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\
$(ROBOT) remove -i $@.tmp.owl --base-iri $(OBOBASE)/MOP --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi


Expand All @@ -387,7 +385,7 @@ mirror-mop: | $(TMPDIR)
mirror-po: | $(TMPDIR)
if [ $(MIR) = true ] && [ $(IMP) = true ]; then curl -L $(OBOBASE)/po.owl --create-dirs -o $(MIRRORDIR)/po.owl --retry 4 --max-time 200 &&\
$(ROBOT) convert -i $(MIRRORDIR)/po.owl -o $@.tmp.owl && \
$(ROBOT) remove -i $@.tmp.owl --base-iri $(URIBASE)/PO --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\
$(ROBOT) remove -i $@.tmp.owl --base-iri $(OBOBASE)/PO --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi


Expand All @@ -414,7 +412,7 @@ mirror-ecocore: | $(TMPDIR)
mirror-to: | $(TMPDIR)
if [ $(MIR) = true ] && [ $(IMP) = true ]; then curl -L $(OBOBASE)/to.owl --create-dirs -o $(MIRRORDIR)/to.owl --retry 4 --max-time 200 &&\
$(ROBOT) convert -i $(MIRRORDIR)/to.owl -o $@.tmp.owl && \
$(ROBOT) remove -i $@.tmp.owl --base-iri $(URIBASE)/TO --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\
$(ROBOT) remove -i $@.tmp.owl --base-iri $(OBOBASE)/TO --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi


Expand All @@ -424,16 +422,15 @@ mirror-to: | $(TMPDIR)
mirror-chebi: | $(TMPDIR)
if [ $(MIR) = true ] && [ $(IMP) = true ] && [ $(IMP_LARGE) = true ]; then curl -L $(OBOBASE)/chebi.owl.gz --create-dirs -o $(MIRRORDIR)/chebi.owl.gz --retry 4 --max-time 200 &&\
$(ROBOT) convert -i $(MIRRORDIR)/chebi.owl.gz -o $@.tmp.owl && \
$(ROBOT) remove -i $@.tmp.owl --base-iri $(URIBASE)/CHEBI --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\
$(ROBOT) remove -i $@.tmp.owl --base-iri $(OBOBASE)/CHEBI --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi


## ONTOLOGY: ncbitaxon
.PHONY: mirror-ncbitaxon
.PRECIOUS: $(MIRRORDIR)/ncbitaxon.owl
mirror-ncbitaxon: | $(TMPDIR)
if [ $(MIR) = true ] && [ $(IMP) = true ] && [ $(IMP_LARGE) = true ]; then curl -L $(OBOBASE)/ncbitaxon.owl.gz --create-dirs -o $(MIRRORDIR)/ncbitaxon.owl.gz --retry 4 --max-time 200 &&\
$(ROBOT) convert -i $(MIRRORDIR)/ncbitaxon.owl.gz -o $@.tmp.owl && \
if [ $(MIR) = true ] && [ $(IMP) = true ]; then $(ROBOT) convert -I http://purl.obolibrary.org/obo/ncbitaxon/subsets/taxslim.owl -o $@.tmp.owl && \
$(ROBOT) remove -i $@.tmp.owl --base-iri http://purl.obolibrary.org/obo/NCBITaxon_ --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi

Expand All @@ -460,7 +457,7 @@ mirror-go: | $(TMPDIR)
mirror-ncit: | $(TMPDIR)
if [ $(MIR) = true ] && [ $(IMP) = true ] && [ $(IMP_LARGE) = true ]; then curl -L $(OBOBASE)/ncit.owl --create-dirs -o $(MIRRORDIR)/ncit.owl --retry 4 --max-time 200 &&\
$(ROBOT) convert -i $(MIRRORDIR)/ncit.owl -o $@.tmp.owl && \
$(ROBOT) remove -i $@.tmp.owl --base-iri $(URIBASE)/NCIT --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\
$(ROBOT) remove -i $@.tmp.owl --base-iri $(OBOBASE)/NCIT --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi


Expand Down Expand Up @@ -494,7 +491,7 @@ mirror-mesh: | $(TMPDIR)
mirror-obi: | $(TMPDIR)
if [ $(MIR) = true ] && [ $(IMP) = true ]; then curl -L $(OBOBASE)/obi.owl --create-dirs -o $(MIRRORDIR)/obi.owl --retry 4 --max-time 200 &&\
$(ROBOT) convert -i $(MIRRORDIR)/obi.owl -o $@.tmp.owl && \
$(ROBOT) remove -i $@.tmp.owl --base-iri $(URIBASE)/OBI --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\
$(ROBOT) remove -i $@.tmp.owl --base-iri $(OBOBASE)/OBI --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi


Expand Down Expand Up @@ -584,9 +581,13 @@ ROBOT_RELEASE_IMPORT_MODE=$(ROBOT) merge --input $<
# ROBOT pipeline that removes imports, then merges components. This is for release artefacts that start from "base"
ROBOT_RELEASE_IMPORT_MODE_BASE=$(ROBOT) remove --input $< --select imports --trim false merge $(patsubst %, -i %, $(OTHER_SRC))

# base: All the axioms as they are editted by the editors, excluding reasoning
$(ONT)-base.owl: $(EDIT_PREPROCESSED) $(OTHER_SRC)
$(ROBOT_RELEASE_IMPORT_MODE_BASE) \
# base: A version of the ontology that does not include any externally imported axioms.
$(ONT)-base.owl: $(EDIT_PREPROCESSED) $(OTHER_SRC) $(IMPORT_FILES)
$(ROBOT_RELEASE_IMPORT_MODE) \
reason --reasoner ELK --equivalent-classes-allowed all --exclude-tautologies structural \
relax \
reduce -r ELK \
remove --base-iri $(URIBASE)/BERO --axioms external --preserve-structure false --trim false \
$(SHARED_ROBOT_COMMANDS) \
annotate --link-annotation http://purl.org/dc/elements/1.1/type http://purl.obolibrary.org/obo/IAO_8000001 \
--ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
Expand Down Expand Up @@ -678,6 +679,7 @@ Core commands:
* prepare_release_fast: Run the entire release pipeline without refreshing imports, recreating components or recompiling patterns.
* update_repo: Update the ODK repository setup using the config file bero-odk.yaml
* test: Running all validation tests
* test_fast: Runs the test suite, but without updating imports or components
* odkversion: Show the current version of the ODK Makefile and ROBOT.
* clean: Delete all temporary files
* help: Print ODK Usage information
Expand All @@ -695,7 +697,7 @@ Imports management:

Editor utilities:
* validate_idranges: Make sure your ID ranges file is formatted correctly
* normalize_src: Load and safe your bero-edit file after you to make sure its serialised correctly
* normalize_src: Load and save your bero-edit file after you to make sure its serialised correctly
* explain_unsat: If you have unsatisfiable classes, this command will create a markdown file (tmp/explain_unsat.md) which will explain all your unsatisfiable classes
* validate-all-tsv: Check all your tsv files for possible problems in syntax. Use ALL_TSV_FILES variable to list files
* validate-tsv: Check a tsv file for syntactic problems with tsvalid. Use TSV variable to pass filepath, e.g. make TSV=../my.tsv validate-tsv.
Expand Down
3 changes: 1 addition & 2 deletions src/ontology/bero-odk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ import_group:
use_gzipped: TRUE
make_base: TRUE
- id: ncbitaxon
is_large: TRUE
use_gzipped: TRUE
mirror_from: http://purl.obolibrary.org/obo/ncbitaxon/subsets/taxslim.owl
make_base: TRUE
base_iris:
- http://purl.obolibrary.org/obo/NCBITaxon_
Expand Down
8 changes: 8 additions & 0 deletions src/ontology/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ ODK_TAG=${ODK_TAG:-latest}
ODK_JAVA_OPTS=${ODK_JAVA_OPTS:--Xmx20G}
ODK_DEBUG=${ODK_DEBUG:-no}

# Convert OWLAPI_* environment variables to the OWLAPI as Java options
# See http://owlcs.github.io/owlapi/apidocs_4/org/semanticweb/owlapi/model/parameters/ConfigurationOptions.html
# for a list of allowed options
OWLAPI_OPTIONS_NAMESPACE=org.semanticweb.owlapi.model.parameters.ConfigurationOptions
for owlapi_var in $(env | sed -n s/^OWLAPI_//p) ; do
ODK_JAVA_OPTS="$ODK_JAVA_OPTS -D$OWLAPI_OPTIONS_NAMESPACE.${owlapi_var%=*}=${owlapi_var#*=}"
done

TIMECMD=
if [ x$ODK_DEBUG = xyes ]; then
# If you wish to change the format string, take care of using
Expand Down

0 comments on commit 322ebe9

Please sign in to comment.