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

[Test] Taxon constraint check with added feedback #3109

Closed
wants to merge 31 commits into from
Closed

Conversation

gouttegd
Copy link
Collaborator

@gouttegd gouttegd commented Nov 2, 2023

This is a variation of the PR #3102 with the addition that, if the QC check fails because of some violations of the taxon constraints, a comment should be automatically posted to the PR with the reasoner’s explanations for the violations.

Work in progress, for testing purposes only.

gouttegd and others added 28 commits October 27, 2023 08:23
Import the version of the NCBITaxon slim that includes disjointness
axioms over taxon siblings. Those axioms are needed for the taxon
constraint check to work.
We make sure that taxon constraints are checked as part of the QC
pipeline (during the "bridge checks"). This is done by two steps.

1. We expand the RO:0002175 macros present in the ontology. This must
   only be done as part of the QC pipeline to avoid bloating the
  released artefacts with the "witness classes" created by the expansion
  of this macro.

2. We merge in the NCBITaxon slim with disjointness axioms. Not just an
   extracted module (such an extracted module has already been been
   imported as part of the normal imports pipeline), but the entire
   slim. Again, this must only be done in the QC pipeline because we do
   not want the entire NCBITaxon slim to be included in any relaese
   artefact, not even -full.
'suspensorium' is explicitly constrained to be 'NOT in mammals',
but pterygoid bone has no such restriction and is apparently found (at
least) in mice, so presumably pterygoid bone should not be assumed to be
part of something that does not exist in mammals.
The existence of a corpus luteum is documented in some jawless
vertebrates, so it cannot be said to only exist in mammals.
The pericardial cavity, like all terms related to 'heart', is strictly
defined as vertebrate-specific in Uberon. Ciona do have something that
is akin to a pericardium, but since they are not vertebrates, we should
either:

* broaden our heart-related terms (at least 'pericardium', and all terms
  connected to it) so that it is no longer vertebrate-specific;
* create another term to represent pericardium-like structure in
  non-vertebrates.

Until a decision is made between these two approaches, here we simply
remove the statement that the pericardial cavity exists in Ciona, since
it directly violates the vertebrate-specific constraint.
Some hagfish may have vertebral elements without having a full vertebral
column, so the existence of vertebral elements should not imply the
existence of a vertebral column.
The philtrum (UBERON:0005402) exists in species that do not have a
rhinarium (UBERON:0011256), so it should not be said to be part_of some
rhinarium.
Hagfishes are reported to "have independently evolved a highly laminated
cerebral cortex, comparable in many ways to the cerebral cortex of
mammals". So we relax the taxon constraint on 'neocortex' from mammals
up to vertebrates, so as to cover fishes.
The mapping between UBERON:0006334 and HBA:4413 is most likely bogus.
The Uberon term refers to a 'posterior lateral line' that is not
supposed to exist in amniotes, whereas the HBA term refers to a
'lateral nucleus of the pulvinar, left', a regional part of the brain.
'axial skeletal system' is intended to apply to chordates, but is said
to have as part some 'axial skeleton plus cranial skeleton', which is
vertebrate-specific. We remove the offending has_part axiom.
'dermatocranium' is taxon-constrained to jawed vertebrates, but is part
of the definition of 'nose' (through 'nasal skeleton') which exists
throughout vertebrates. So we relax the taxon constraint on
'dermatocranium' up to vertebrates as well.
AEO:0000154 is mapped to both UBERON:0036215 (anatomical surface region)
and UBERON:0002416 (integumental system), making the two Uberon terms
equivalent with each other upon merging the AEO bridge. Based on the
definition of the AEO term, the mapping with integumental system should
be the correct one; the mapping with 'anatomical surface region' had
probably been created on the basis on the lexical similarity between
'organism surface' and 'anatomical surface' (yet another example of how
lexical similarity matching is harmful).
'epithelium' is restricted to Eumatazoa, but "true epithelia" have been
reported in some sponges. Besides, the homology notes on 'epithelium'
clearly states that epithelial tissues are found in *metazoans*, not
*eumetazoans*. So we relax the taxon constraint up to metazoans.
'choroidal guanine tapetum' is restricted to elasmobranchs, but that
structure seems to exist throughout cartilaginous fishes, so we relax
the taxon constraint accordingly.
'skull' is said to be 'present in taxon' some Myxinidae. But Myxinidae
are jawless vertebrates while skull, as defined in Uberon, refers to the
association of a cranium with a mandible. Without a mandible, Myxinidae
have a cranium but no skull. So we move the 'present in taxon' some
Myxinidae axiom from 'skull' to 'cranium'.
'mouth' is said to overlap with 'respiratory system', but the mouth
exists throughout the eumatozoans while the respiratory system is
restricted to Bilateria. We remove the link to avoid restricting the
mouth to Bilateria as well.
The 'olivary pretectal nucleus' has been reported to exist in
salamanders, so we relax its taxon constraint from Amniota to Tetrapoda,
as as to cover both Amniota and Amphibia.
An arthropod structure quite obviously cannot be part of an
insect-specific structure, so we remove that link.
The 'cranium' exists throughout all craniates, so it should not be said
to be part of the 'skull', which only exists in jawed vertebrates.
…ton'.

The nose exists throughout vertebrates, but making the 'nasal skeleton'
part of the 'facial skeleton' makes it dependent of the 'skull', which
is specific to jawed vertebrates. So we break that link.
Homology notes on 'mouth' suggests the mouth evolved before the head and
is therefore present in taxa where the head is not, so 'mouth' should
not be dependent on 'head'.
The taxslim-disjoint-over-in-taxon.owl subset of NCBITaxon contains
*only* the disjointness axioms and nothing else, so we cannot import
just that subset. We need to import both the "normal" taxslim.owl subset
and the "disjoints" subset.
We removed the offending mapping between UBERON:0036215 and AEO:0000154,
but we must also re-regenerate the AEO bridge for the change to take
effect; otherwise the mapping still causes the QC check to fail since
the bridges are not automatically re-regenerated as part of the QC
pipeline.
If the online QC check fails, check if the failure is due to violations
of the taxon constraints and if it is, post a comment to the PR with the
reasoner's explanations for the violations.
Make the QC action not fail upon `make check` failure, so that all
subsequent actions (not just the first one) can be run. Then fail
explicitly at the end.
The comment-pr action's file option expects its argument to be relative
to the .github/workflows directory.
Copy link

github-actions bot commented Nov 2, 2023

This PR violates some taxon constraints. Here is what the reasoner has to say:

http://purl.obolibrary.org/obo/UBERON_8440041 in taxon http://purl.obolibrary.org/obo/NCBITaxon_9606 SubClassOf Nothing

DMBA_16271 SubClassOf Nothing

Axiom Impact

Axioms used 2 times

Axioms used 1 times

Ontologies used:

@gouttegd
Copy link
Collaborator Author

gouttegd commented Nov 2, 2023

Closing here. This was a test and it worked, so now I’ve added a clean commit on top on #3102.

@gouttegd gouttegd closed this Nov 2, 2023
@gouttegd gouttegd deleted the tc-check branch November 2, 2023 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants