Skip to content

Commit a66a8f7

Browse files
committed
Strip BFO continuant/occurrent disjointness before reasoning (VFB2#457)
pip_vfb-pipeline-dumps has been failing construct_all.owl since build #872 with 'The ontology is inconsistent' under ELK. One of the mechanisms (the other is a separate FBbt laterality curation issue, tracked separately on VFB2#457): scRNAseq Clustering individuals assert 'has_part' to their Assay (vfb-scRNAseq-ontology's schema, unchanged since well before this started failing). Assay is a BFO occurrent; 'Clustering has_part Assay' is equivalent to 'Assay part_of Clustering', and once Clustering is inferred continuant that collides with BFO's DisjointClasses(continuant, part_of some occurrent) (and its mirror, and the plain continuant/occurrent disjointness) - both fbbt.owl and vfbext.owl carry their own copy of these axioms via their bundled BFO/RO import closure, and both get merged into all.ttl. vfb-scRNAseq-ontology's schema can't easily change without touching the TSV-building scripts, and that ontology is being migrated to VirtualFlyBrain/vfb-scRNAseq anyway, where the real fix belongs. As a stopgap to get builds passing again, strip the three continuant/occurrent disjointness axioms from the merged all.ttl right before reasoning, in the construct_all.owl rule: robot merge -i all.ttl remove --term BFO:0000002 --term BFO:0000003 --axioms DisjointClasses --preserve-structure false reason --reasoner ELK ... Verified with robot merge+reason (ELK) against a minimal reproducer (one scRNAseq dataset file's individual assertions + the BFO/RO axioms that trip this): the full construct_all.owl command chain (merge, reason with the same axiom-generators/relax/reduce/annotate/convert steps used here) reproduces 'The ontology is inconsistent' without this remove step, and completes cleanly with it. This only removes the continuant/occurrent disjointness - no other DisjointClasses axioms are touched. Temporary: revert once the scRNAseq migration lands a real fix. Refs VirtualFlyBrain/VFB2#457.
1 parent e279607 commit a66a8f7

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

‎dumps.Makefile‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,27 @@ $(RAW_DUMPS_DIR)/%.ttl:
9595
$(RAW_DUMPS_DIR)/construct_%.owl: $(RAW_DUMPS_DIR)/%.ttl
9696
$(call log, $@, $(ROBOT) merge -i $< annotate --ontology-iri "http://virtualflybrain.org/data/VFB/OWL/raw/$*.owl" convert -f owl -o $@ $(STDOUT_FILTER))
9797

98+
# TEMPORARY (VFB2#457): BFO's continuant/occurrent disjointness --
99+
# DisjointClasses(BFO:0000002, BFO:0000003) and the two GCI forms
100+
# DisjointClasses(BFO:0000002, part_of some BFO:0000003) / mirror -- is tripped
101+
# by 'Clustering has_part Assay' in the scRNAseq data (Assay is an occurrent,
102+
# Clustering ends up inferred continuant, so 'Assay part_of Clustering' hits the
103+
# GCI form). vfb-scRNAseq-ontology's schema can't change without touching the
104+
# TSV-building scripts it's about to be migrated away from anyway
105+
# (VirtualFlyBrain/vfb-scRNAseq), so as a stopgap we strip these three axioms
106+
# from the merged all.ttl right before reasoning, wherever they came from
107+
# (fbbt.owl and vfbext.owl both carry a copy via their own BFO/RO import
108+
# closure). Remove this step once the scRNAseq migration lands the real fix.
109+
# Verified with robot merge+reason (ELK): a scRNAseq dataset file that
110+
# reproduces "The ontology is inconsistent" on its own reasons cleanly once
111+
# this remove step runs first.
112+
#
98113
# Generates an OWL file from multiple TTL files, infers annotations and relations,
99114
# reduces the ontology, annotates it, and saves it to disk.
100115
$(RAW_DUMPS_DIR)/construct_all.owl: $(RAW_DUMPS_DIR)/all.ttl
101-
$(call log, $@, $(ROBOT) merge -i $< reason --reasoner ELK --axiom-generators "SubClass EquivalentClass ClassAssertion" --exclude-tautologies structural relax reduce --reasoner ELK annotate --ontology-iri "http://virtualflybrain.org/data/VFB/OWL/raw/all.owl" convert -f owl -o $@ $(STDOUT_FILTER) || { $(EXPLAIN_ALL) ; false ; })
116+
$(call log, $@, $(ROBOT) merge -i $< \
117+
remove --term BFO:0000002 --term BFO:0000003 --axioms "DisjointClasses" --preserve-structure false \
118+
reason --reasoner ELK --axiom-generators "SubClass EquivalentClass ClassAssertion" --exclude-tautologies structural relax reduce --reasoner ELK annotate --ontology-iri "http://virtualflybrain.org/data/VFB/OWL/raw/all.owl" convert -f owl -o $@ $(STDOUT_FILTER) || { $(EXPLAIN_ALL) ; false ; })
102119

103120
# Infers annotations and relations for the virtual fly brain ontology using the ROBOT inference engine.
104121
$(RAW_DUMPS_DIR)/inferred_annotation.owl: $(FINAL_DUMPS_DIR)/owlery.owl $(RAW_DUMPS_DIR)/vfb-config.yaml

0 commit comments

Comments
 (0)