Skip to content

Commit

Permalink
Merge pull request #3102 from obophenotype/new-taxon-constraint-check
Browse files Browse the repository at this point in the history
Enforce taxon constraints
  • Loading branch information
gouttegd authored Nov 10, 2023
2 parents 3f3d303 + c1ca725 commit 177c7af
Show file tree
Hide file tree
Showing 12 changed files with 367 additions and 95 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/qc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,35 @@ jobs:
- uses: actions/checkout@v2

- name: Run ontology QC checks
id: check
continue-on-error: true
env:
DEFAULT_BRANCH: master
ROBOT_JAVA_ARGS: -Xmx6G
run: cd src/ontology && mkdir -p tmp reports mirror && make ROBOT_ENV='ROBOT_JAVA_ARGS=-Xmx6G' GH_ACTION=true BRI=false MIR=false IMP=false test > TESTLOG.log

- name: Reason over taxon constraints
id: explaintc
continue-on-error: true
if: steps.check.outcome == 'failure'
run: |
if [ -s src/ontology/reports/taxon-constraint-check.txt ]; then
robot explain -i src/ontology/tmp/uberon-edit-plus-tax-equivs.owl -M unsatisfiability -u all -r ELK -e taxon-unsats.md
echo "<details>\n<summary>This PR violates some taxon constraints. Here is what the reasoner has to say:</summary>\n" > comment.md
cat taxon-unsats.md >> comment.md
echo "</details>" >> comment.md
exit 1
fi
- name: Post explanation for taxon constraint violations
if: steps.explaintc.outcome == 'failure'
uses: NejcZdovc/comment-pr@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
file: "../../comment.md"
identifier: "TAXON_CONSTRAINTS_REASONING"

- name: Last rows of QC report
if: ${{ failure() }}
run: tail -20 src/ontology/TESTLOG.log
if: steps.check.outcome == 'failure'
run: |
tail -20 src/ontology/TESTLOG.log
exit 1
10 changes: 9 additions & 1 deletion src/ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ all_main: $(MAIN_FILES)
# ----------------------------------------


IMPORTS = pr cl go envo ro bspo chebi pato bfo ncbitaxon nbo orcidio omo
IMPORTS = pr cl go envo ro bspo chebi pato bfo ncbitaxon ncbitaxondisjoints nbo orcidio omo

IMPORT_ROOTS = $(IMPORTDIR)/merged_import
IMPORT_OWL_FILES = $(foreach n,$(IMPORT_ROOTS), $(n).owl)
Expand Down Expand Up @@ -496,6 +496,14 @@ mirror-ncbitaxon: | $(TMPDIR)
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi


## ONTOLOGY: ncbitaxondisjoints
.PHONY: mirror-ncbitaxondisjoints
.PRECIOUS: $(MIRRORDIR)/ncbitaxondisjoints.owl
mirror-ncbitaxondisjoints: | $(TMPDIR)
if [ $(MIR) = true ] && [ $(IMP) = true ]; then $(ROBOT) convert -I http://purl.obolibrary.org/obo/ncbitaxon/subsets/taxslim-disjoint-over-in-taxon.owl -o $@.tmp.owl &&\
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi


## ONTOLOGY: nbo
.PHONY: mirror-nbo
.PRECIOUS: $(MIRRORDIR)/nbo.owl
Expand Down
7 changes: 1 addition & 6 deletions src/ontology/bridge/uberon-bridge-to-aeo.obo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ontology: uberon/bridge/uberon-bridge-to-aeo
data-version: 2023-10-27
data-version: 2023-10-30
property_value: seeAlso "http://purl.obolibrary.org/obo/uberon/references/reference_0000026" xsd:anyURI

[Term]
Expand Down Expand Up @@ -697,11 +697,6 @@ id: AEO:0001010 !
property_value: IAO:0000589 "differentiating neuroepithelium (AEO)" xsd:string
equivalent_to: UBERON:0034707 ! differentiating neuroepithelium

[Term]
id: AEO:0000154 !
property_value: IAO:0000589 "anatomical surface region (AEO)" xsd:string
equivalent_to: UBERON:0036215 ! anatomical surface region

[Typedef]
id: part_of
xref: BFO:0000050
Expand Down
10 changes: 1 addition & 9 deletions src/ontology/bridge/uberon-bridge-to-aeo.owl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
xmlns:terms="http://purl.org/dc/terms/"
xmlns:oboInOwl="http://www.geneontology.org/formats/oboInOwl#">
<owl:Ontology rdf:about="http://purl.obolibrary.org/obo/uberon/bridge/uberon-bridge-to-aeo.owl">
<owl:versionIRI rdf:resource="http://purl.obolibrary.org/obo/uberon/bridge/uberon-bridge-to-aeo/2023-10-27/uberon/bridge/uberon-bridge-to-aeo.owl"/>
<owl:versionIRI rdf:resource="http://purl.obolibrary.org/obo/uberon/bridge/uberon-bridge-to-aeo/2023-10-30/uberon/bridge/uberon-bridge-to-aeo.owl"/>
<rdfs:seeAlso rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">http://purl.obolibrary.org/obo/uberon/references/reference_0000026</rdfs:seeAlso>
</owl:Ontology>

Expand Down Expand Up @@ -1118,8 +1118,6 @@

<owl:Class rdf:about="http://purl.obolibrary.org/obo/AEO_0000154">
<owl:equivalentClass rdf:resource="http://purl.obolibrary.org/obo/UBERON_0002416"/>
<owl:equivalentClass rdf:resource="http://purl.obolibrary.org/obo/UBERON_0036215"/>
<obo:IAO_0000589 rdf:datatype="http://www.w3.org/2001/XMLSchema#string">anatomical surface region (AEO)</obo:IAO_0000589>
<obo:IAO_0000589 rdf:datatype="http://www.w3.org/2001/XMLSchema#string">integumental system (AEO)</obo:IAO_0000589>
<oboInOwl:id rdf:datatype="http://www.w3.org/2001/XMLSchema#string">AEO:0000154</oboInOwl:id>
</owl:Class>
Expand Down Expand Up @@ -2531,12 +2529,6 @@
<!-- http://purl.obolibrary.org/obo/UBERON_0034707 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/UBERON_0034707"/>



<!-- http://purl.obolibrary.org/obo/UBERON_0036215 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/UBERON_0036215"/>
</rdf:RDF>


Expand Down
7 changes: 0 additions & 7 deletions src/ontology/bridge/uberon-bridge-to-dmba.obo
Original file line number Diff line number Diff line change
Expand Up @@ -1319,13 +1319,6 @@ intersection_of: BFO:0000050 NCBITaxon:10090 {name="anterior nucleus of hypothal
property_value: IAO:0000589 "posterior part of anterior hypothalamic nucleus" xsd:string
property_value: status "Verified" xsd:string {source="https://ror.org/03cpe7c52"}

[Term]
id: DMBA:16271
intersection_of: UBERON:0000435 {name="lateral tuberal nucleus"}
intersection_of: BFO:0000050 NCBITaxon:10090 {name="lateral tuberal nucleus"}
property_value: IAO:0000589 "lateral tuberal nucleus" xsd:string
property_value: status "Verified" xsd:string {source="https://ror.org/03cpe7c52"}

[Term]
id: DMBA:16308
intersection_of: UBERON:0001894 {name="diencephalon"}
Expand Down
31 changes: 0 additions & 31 deletions src/ontology/bridge/uberon-bridge-to-dmba.owl
Original file line number Diff line number Diff line change
Expand Up @@ -5723,37 +5723,6 @@



<!-- http://purl.obolibrary.org/obo/DMBA_16271 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/DMBA_16271">
<owl:equivalentClass rdf:nodeID="genid1129"/>
<obo:IAO_0000589>lateral tuberal nucleus</obo:IAO_0000589>
<oboInOwl:status>Verified</oboInOwl:status>
</owl:Class>
<owl:Class rdf:nodeID="genid1129">
<owl:intersectionOf rdf:parseType="Collection">
<rdf:Description rdf:about="http://purl.obolibrary.org/obo/UBERON_0000435"/>
<owl:Restriction>
<owl:onProperty rdf:resource="http://purl.obolibrary.org/obo/BFO_0000050"/>
<owl:someValuesFrom rdf:resource="http://purl.obolibrary.org/obo/NCBITaxon_10090"/>
</owl:Restriction>
</owl:intersectionOf>
</owl:Class>
<owl:Axiom>
<owl:annotatedSource rdf:resource="http://purl.obolibrary.org/obo/DMBA_16271"/>
<owl:annotatedProperty rdf:resource="http://www.w3.org/2002/07/owl#equivalentClass"/>
<owl:annotatedTarget rdf:nodeID="genid1129"/>
<rdfs:label>lateral tuberal nucleus</rdfs:label>
</owl:Axiom>
<owl:Axiom>
<owl:annotatedSource rdf:resource="http://purl.obolibrary.org/obo/DMBA_16271"/>
<owl:annotatedProperty rdf:resource="http://www.geneontology.org/formats/oboInOwl#status"/>
<owl:annotatedTarget>Verified</owl:annotatedTarget>
<oboInOwl:source>https://ror.org/03cpe7c52</oboInOwl:source>
</owl:Axiom>



<!-- http://purl.obolibrary.org/obo/DMBA_16308 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/DMBA_16308">
Expand Down
36 changes: 27 additions & 9 deletions src/ontology/components/hra_subset.owl
Original file line number Diff line number Diff line change
Expand Up @@ -14131,15 +14131,6 @@



<!-- http://purl.obolibrary.org/obo/UBERON_8440041 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/UBERON_8440041">
<obo:RO_0002175 rdf:resource="http://purl.obolibrary.org/obo/NCBITaxon_9606"/>
<oboInOwl:inSubset rdf:resource="http://purl.obolibrary.org/obo/uberon/core#human_reference_atlas"/>
</owl:Class>



<!-- http://purl.obolibrary.org/obo/UBERON_8450002 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/UBERON_8450002">
Expand Down Expand Up @@ -14209,6 +14200,33 @@
<obo:RO_0002175 rdf:resource="http://purl.obolibrary.org/obo/NCBITaxon_9606"/>
<oboInOwl:inSubset rdf:resource="http://purl.obolibrary.org/obo/uberon/core#human_reference_atlas"/>
</owl:Class>



<!-- http://purl.obolibrary.org/obo/UBERON_8600019 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/UBERON_8600019">
<obo:RO_0002175 rdf:resource="http://purl.obolibrary.org/obo/NCBITaxon_9606"/>
<oboInOwl:inSubset rdf:resource="http://purl.obolibrary.org/obo/uberon/core#human_reference_atlas"/>
</owl:Class>



<!-- http://purl.obolibrary.org/obo/UBERON_8600020 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/UBERON_8600020">
<obo:RO_0002175 rdf:resource="http://purl.obolibrary.org/obo/NCBITaxon_9606"/>
<oboInOwl:inSubset rdf:resource="http://purl.obolibrary.org/obo/uberon/core#human_reference_atlas"/>
</owl:Class>



<!-- http://purl.obolibrary.org/obo/UBERON_8600021 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/UBERON_8600021">
<obo:RO_0002175 rdf:resource="http://purl.obolibrary.org/obo/NCBITaxon_9606"/>
<oboInOwl:inSubset rdf:resource="http://purl.obolibrary.org/obo/uberon/core#human_reference_atlas"/>
</owl:Class>
</rdf:RDF>


Expand Down
Loading

0 comments on commit 177c7af

Please sign in to comment.