Skip to content

Term validator misses GO/UBERON slot misuse due missing Descriptor term bindings #451

@cmungall

Description

@cmungall

Problem

We are seeing ontology-slot misplacements pass just validate / just validate-terms, e.g.:

  • UBERON:0002107 (liver) placed under biological_processes
  • GO Molecular Function terms (e.g. GO:0003824, GO:0022857) placed in biological_processes

These should fail curation QC, but currently pass in several PR branches.

Repro

Example from CPS1 branch/PR #407:

  • kb/disorders/Carbamoyl_Phosphate_Synthetase_I_Deficiency.yaml
  • Node Impaired mitochondrial ureagenesis had UBERON:0002107 under biological_processes.

Running:

  • just validate kb/disorders/Carbamoyl_Phosphate_Synthetase_I_Deficiency.yaml
  • just validate-terms kb/disorders/Carbamoyl_Phosphate_Synthetase_I_Deficiency.yaml

Both passed before manual file fix.

Root Cause

In src/dismech/schema/dismech.yaml, descriptor classes lack term binding constraints:

  • BiologicalProcessDescriptor.slot_usage.term has no bindings to BiologicalProcessTerm.
  • AnatomicalEntityDescriptor.slot_usage.term has no bindings to AnatomicalEntityTerm.

So the validator checks term existence/label but not ontology branch constraints (reachable_from GO:0008150, reachable_from UBERON:0001062) for these descriptor usages.

Proposed Fix

Add explicit bindings in descriptor slot usages, analogous to CellTypeDescriptor and GeneDescriptor:

  • BiologicalProcessDescriptor.term -> range: BiologicalProcessTerm
  • AnatomicalEntityDescriptor.term -> range: AnatomicalEntityTerm
  • (Optionally also tighten other descriptor classes where intended.)

Then add/adjust a regression test asserting that:

  • GO MF term in biological_processes fails
  • UBERON term in biological_processes fails

Context

Raised while curating metabolic PRs where these were repeatedly flagged by reviewer but not by validator. This issue captures the validator-side gap so these become machine-caught.

Reported by Codex.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingschema

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions