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 ECTO MRE subset as release artefact #249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ src/mapping/.cogs
src/mapping/mre_ecto2.sssom.tsv
src/patterns/data/default/*.txt
src/patterns/data/default/*.ofn
src/ontology/ecto-mre.owl
55 changes: 49 additions & 6 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ----------------------------------------
# Makefile for ecto
# Generated using ontology-development-kit
# ODK Version: v1.4
# ODK Version: v1.4.3
# ----------------------------------------
# IMPORTANT: DO NOT EDIT THIS FILE. To override default make goals, use ecto.Makefile instead

Expand Down Expand Up @@ -43,14 +43,14 @@ 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.4.3

TODAY ?= $(shell date +%Y-%m-%d)
OBODATE ?= $(shell date +'%d:%m:%Y %H:%M')
VERSION= $(TODAY)
ANNOTATE_ONTOLOGY_VERSION = annotate -V $(ONTBASE)/releases/$(VERSION)/$@ --annotation owl:versionInfo $(VERSION)
ANNOTATE_CONVERT_FILE = annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) convert -f ofn --output [email protected] && mv [email protected] $@
OTHER_SRC = $(PATTERNDIR)/definitions.owl $(COMPONENTSDIR)/ecto-xrefs.owl $(COMPONENTSDIR)/bridge.owl $(COMPONENTSDIR)/obsoletes.owl
OTHER_SRC = $(PATTERNDIR)/definitions.owl $(COMPONENTSDIR)/ecto-xrefs.owl $(COMPONENTSDIR)/bridge.owl $(COMPONENTSDIR)/obsoletes.owl $(COMPONENTSDIR)/subsets.owl
ONTOLOGYTERMS = $(TMPDIR)/ontologyterms.txt
EDIT_PREPROCESSED = $(TMPDIR)/$(ONT)-preprocess.owl
PATTERNDIR= ../patterns
Expand All @@ -61,7 +61,7 @@ PATTERN_RELEASE_FILES= $(PATTERNDIR)/definitions.owl $(PATTERNDIR)/pattern.

FORMATS = $(sort owl obo json owl)
FORMATS_INCL_TSV = $(sort $(FORMATS) tsv)
RELEASE_ARTEFACTS = $(sort $(ONT)-full $(ONT)-base )
RELEASE_ARTEFACTS = $(sort $(ONT)-base $(ONT)-full $(ONT)-simple ecto-mre )

# ----------------------------------------
# Top-level targets
Expand Down Expand Up @@ -285,6 +285,13 @@ $(PRESEED): $(SRCMERGED)
$(ROBOT) query -f csv -i $< --query ../sparql/terms.sparql [email protected] &&\
cat [email protected] | sort | uniq > $@

SIMPLESEED=$(TMPDIR)/simple_seed.txt

$(SIMPLESEED): $(SRCMERGED) $(ONTOLOGYTERMS)
$(ROBOT) query -f csv -i $< --query ../sparql/simple-seed.sparql [email protected] &&\
cat [email protected] $(ONTOLOGYTERMS) | sort | uniq > $@ &&\
echo "http://www.geneontology.org/formats/oboInOwl#SubsetProperty" >> $@ &&\
echo "http://www.geneontology.org/formats/oboInOwl#SynonymTypeProperty" >> $@


ALLSEED = $(PRESEED) $(TMPDIR)/all_pattern_terms.txt \
Expand Down Expand Up @@ -396,6 +403,14 @@ $(COMPONENTSDIR)/%: | $(COMPONENTSDIR)





$(COMPONENTSDIR)/subsets.owl: $(TEMPLATEDIR)/subsets.tsv
if [ $(COMP) = true ] ; then $(ROBOT) template \
$(patsubst %, --template %, $^) \
$(ANNOTATE_CONVERT_FILE); fi

.PRECIOUS: $(COMPONENTSDIR)/subsets.owl
# ----------------------------------------
# Mirroring upstream ontologies
# ----------------------------------------
Expand Down Expand Up @@ -671,15 +686,27 @@ $(PATTERNDIR)/definitions.owl: $(DOSDP_OWL_FILES_DEFAULT)
# ----------------------------------------


$(ONT)-base.obo: $(ONT)-base.owl
$(ROBOT) convert --input $< --check false -f obo $(OBO_FORMAT_OPTIONS) -o [email protected] && grep -v ^owl-axioms [email protected] > $@ && rm [email protected]
$(ONT)-base.json: $(ONT)-base.owl
$(ROBOT) annotate --input $< --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
convert --check false -f json -o [email protected] &&\
mv [email protected] $@
$(ONT)-full.obo: $(ONT)-full.owl
$(ROBOT) convert --input $< --check false -f obo $(OBO_FORMAT_OPTIONS) -o [email protected] && grep -v ^owl-axioms [email protected] > $@ && rm [email protected]
$(ONT)-full.json: $(ONT)-full.owl
$(ROBOT) annotate --input $< --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
convert --check false -f json -o [email protected] &&\
mv [email protected] $@
$(ONT)-base.obo: $(ONT)-base.owl
$(ONT)-simple.obo: $(ONT)-simple.owl
$(ROBOT) convert --input $< --check false -f obo $(OBO_FORMAT_OPTIONS) -o [email protected] && grep -v ^owl-axioms [email protected] > $@ && rm [email protected]
$(ONT)-base.json: $(ONT)-base.owl
$(ONT)-simple.json: $(ONT)-simple.owl
$(ROBOT) annotate --input $< --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
convert --check false -f json -o [email protected] &&\
mv [email protected] $@
ecto-mre.obo: ecto-mre.owl
$(ROBOT) convert --input $< --check false -f obo $(OBO_FORMAT_OPTIONS) -o [email protected] && grep -v ^owl-axioms [email protected] > $@ && rm [email protected]
ecto-mre.json: ecto-mre.owl
$(ROBOT) annotate --input $< --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
convert --check false -f json -o [email protected] &&\
mv [email protected] $@
Expand Down Expand Up @@ -725,6 +752,22 @@ $(ONT)-full.owl: $(EDIT_PREPROCESSED) $(OTHER_SRC) $(IMPORT_FILES)
relax \
reduce -r ELK \
$(SHARED_ROBOT_COMMANDS) annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) --output [email protected] && mv [email protected] $@
# foo-simple: (edit->reason,relax,reduce,drop imports, drop every axiom which contains an entity outside the "namespaces of interest")
# drop every axiom: filter --term-file keep_terms.txt --trim true
# remove --select imports --trim false
$(ONT)-simple.owl: $(EDIT_PREPROCESSED) $(OTHER_SRC) $(SIMPLESEED) $(IMPORT_FILES)
$(ROBOT_RELEASE_IMPORT_MODE) \
reason --reasoner ELK --equivalent-classes-allowed asserted-only --exclude-tautologies structural \
relax \
remove --axioms equivalent \
relax \
filter --term-file $(SIMPLESEED) --select "annotations ontology anonymous self" --trim true --signature true \
reduce -r ELK \
query --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru \
$(SHARED_ROBOT_COMMANDS) annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) --output [email protected] && mv [email protected] $@

ecto-mre.owl:
echo "ERROR: You have configured a custom release artefact ($@); this release artefact needs to be define in ecto.Makefile!" && false
# ----------------------------------------
# Debugging Tools
# ----------------------------------------
Expand Down
1 change: 1 addition & 0 deletions src/ontology/catalog-v001.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<group id="Folder Repository, directory=, recursive=false, Auto-Update=false, version=2" prefer="public" xml:base=""/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/ecto/components/bridge.owl" uri="components/bridge.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/ecto/components/ecto-xrefs.owl" uri="components/ecto-xrefs.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/ecto/components/subsets.owl" uri="components/subsets.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/ecto/components/xrefs.owl" uri="components/ecto-xrefs.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/ecto/imports/chebi_import.owl" uri="imports/chebi_import.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/ecto/imports/envo_import.owl" uri="imports/envo_import.owl"/>
Expand Down
Loading
Loading