diff --git a/.gitignore b/.gitignore
index a8cf265..7687dc3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/src/ontology/Makefile b/src/ontology/Makefile
index ad1d0ba..e552672 100644
--- a/src/ontology/Makefile
+++ b/src/ontology/Makefile
@@ -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
@@ -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 $@.tmp.owl && mv $@.tmp.owl $@
-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
@@ -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
@@ -285,6 +285,13 @@ $(PRESEED): $(SRCMERGED)
$(ROBOT) query -f csv -i $< --query ../sparql/terms.sparql $@.tmp &&\
cat $@.tmp | sort | uniq > $@
+SIMPLESEED=$(TMPDIR)/simple_seed.txt
+
+$(SIMPLESEED): $(SRCMERGED) $(ONTOLOGYTERMS)
+ $(ROBOT) query -f csv -i $< --query ../sparql/simple-seed.sparql $@.tmp &&\
+ cat $@.tmp $(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 \
@@ -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
# ----------------------------------------
@@ -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 $@.tmp.obo && grep -v ^owl-axioms $@.tmp.obo > $@ && rm $@.tmp.obo
+$(ONT)-base.json: $(ONT)-base.owl
+ $(ROBOT) annotate --input $< --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
+ convert --check false -f json -o $@.tmp.json &&\
+ mv $@.tmp.json $@
$(ONT)-full.obo: $(ONT)-full.owl
$(ROBOT) convert --input $< --check false -f obo $(OBO_FORMAT_OPTIONS) -o $@.tmp.obo && grep -v ^owl-axioms $@.tmp.obo > $@ && rm $@.tmp.obo
$(ONT)-full.json: $(ONT)-full.owl
$(ROBOT) annotate --input $< --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
convert --check false -f json -o $@.tmp.json &&\
mv $@.tmp.json $@
-$(ONT)-base.obo: $(ONT)-base.owl
+$(ONT)-simple.obo: $(ONT)-simple.owl
$(ROBOT) convert --input $< --check false -f obo $(OBO_FORMAT_OPTIONS) -o $@.tmp.obo && grep -v ^owl-axioms $@.tmp.obo > $@ && rm $@.tmp.obo
-$(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 $@.tmp.json &&\
+ mv $@.tmp.json $@
+ecto-mre.obo: ecto-mre.owl
+ $(ROBOT) convert --input $< --check false -f obo $(OBO_FORMAT_OPTIONS) -o $@.tmp.obo && grep -v ^owl-axioms $@.tmp.obo > $@ && rm $@.tmp.obo
+ecto-mre.json: ecto-mre.owl
$(ROBOT) annotate --input $< --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
convert --check false -f json -o $@.tmp.json &&\
mv $@.tmp.json $@
@@ -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 $@.tmp.owl && mv $@.tmp.owl $@
+# 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 $@.tmp.owl && mv $@.tmp.owl $@
+
+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
# ----------------------------------------
diff --git a/src/ontology/catalog-v001.xml b/src/ontology/catalog-v001.xml
index 41f3a9e..e12b4c8 100644
--- a/src/ontology/catalog-v001.xml
+++ b/src/ontology/catalog-v001.xml
@@ -5,6 +5,7 @@
+
diff --git a/src/ontology/components/subsets.owl b/src/ontology/components/subsets.owl
new file mode 100644
index 0000000..e7a5074
--- /dev/null
+++ b/src/ontology/components/subsets.owl
@@ -0,0 +1,1046 @@
+Prefix(:=)
+Prefix(owl:=)
+Prefix(rdf:=)
+Prefix(xml:=)
+Prefix(xsd:=)
+Prefix(rdfs:=)
+
+
+Ontology(
+
+Annotation(owl:versionInfo "2024-01-13")
+
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(AnnotationProperty())
+
+
+############################
+# Classes
+############################
+
+# Class: ()
+
+AnnotationAssertion( )
+
+# Class: ()
+
+AnnotationAssertion( )
+
+# Class: ()
+
+AnnotationAssertion( )
+
+# Class: ()
+
+AnnotationAssertion( )
+
+# Class: ()
+
+AnnotationAssertion( )
+
+# Class: ()
+
+AnnotationAssertion( )
+
+# Class: ()
+
+AnnotationAssertion( )
+
+# Class: ()
+
+AnnotationAssertion( )
+
+# Class: