Repository navigation
Import 33 MONDO terms for Open Targets Safety 2.0 (refs #2818) - #2820
ar-ibrahim wants to merge 14 commits into
Conversation
Plan (owlmake.yaml):
- Add fetch rules for mirror/hpoa.owl and mirror/mondo-owl.owl (the two
non-import fetches from get_mirrors.sh that had no producer in the plan)
and register them in the mirrors refresh group, so the d2p components
build on a fresh clone.
- Delete the two inert rules referencing SPARQL files that do not exist
(build/fbbt-self-xref.txt, remove-fbbt-self-xref).
- Encode the merged-ontology-removal pipeline for its five instantiable
ontologies (chebi, cl, fbbt, hp, obi): filtered-X-mirror.owl,
efo-edit-without-X.owl, remaining-X.ofn, preserve-axioms-X.{ttl,owl}
and phony dump_X, translated from the deleted Makefile lines 112-141.
- Fix the HGNC auto-exclude echo to read the terms file by its
root-relative path, so the reported count is no longer empty.
Docs: make .claude/agents/efo-importer.md and
docs/Import_terms_from_another_ontology.md describe the same two-step
import refresh as the .github variants (refresh the mirror explicitly,
then rebuild the import): mirrors are kept by default, so -B on the
import target reuses the on-disk mirror rather than re-fetching it.
Rewrite docs/odk-workflows/components.md for the owlmake build.
Workflows: spell the ID-allocation step om make allocate-definitive-ids;
pin the copilot-setup owlmake download to v0.2.2 instead of latest; drop
qc.yml's stale ODK header and unused DEFAULT_BRANCH.
Refs #2768.
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RMkT6NpLSiwerUD773q8V1
…s,imports
Validating the previous commit's two-step procedure against om 0.2.2 showed
it does not work: mirrors AND imports are refresh groups the plan keeps by
default, and a kept target is reused even when named explicitly with -B
(om make mirror/hancestro.owl -B and om make imports/hancestro_import.owl -B
both no-op with "pinned (MIR=false)" / "pinned (IMP=false)"). The .github
docs' two-step spelling had the same defect, so all five documents now
describe the one verified command:
om make imports/<ontology>_import.owl --rebuild mirrors,imports
which re-downloads the plan-named mirror and regenerates the import, touching
only the requested target's closure (verified: re-fetches hancestro.owl and
rewrites hancestro_import.owl byte-identically on an unchanged seed list).
The full-set spelling becomes om make all_imports --rebuild mirrors,imports.
Files: CLAUDE.md, .claude/agents/efo-importer.md,
.github/agents/EFO-importer.md, .github/copilot-instructions.md,
docs/Import_terms_from_another_ontology.md.
Refs #2768.
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RMkT6NpLSiwerUD773q8V1
EFO and owlmake are developed together, so no environment pins an exact owlmake release and no two environments follow different lines: the QC and ID-allocation containers move from the 0.2-python image tag to latest-python, and the copilot-setup binary download returns to releases/latest, matching the README's editor install. owlmake.yaml's min_owlmake_version stays as the floor that fails a build outright if an environment lags it. Refs #2768. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RMkT6NpLSiwerUD773q8V1
The disease-to-phenotype component's hpoa half was built from Monarch's dipper RDF (data.monarchinitiative.org/ttl/hpoa.ttl), which no longer exists — the URL 404s and no current Monarch product publishes the OBAN association model the d2p-hpoa.ru query consumed. Rebuild that half from the maintained upstream instead: the plan fetches purl.obolibrary.org/obo/hp/hpoa/phenotype.hpoa (already the IRI the component stamps as dc:source) into the mirrors group, and a new stdlib-only repo script, src/scripts/hpoa_to_d2p.py, converts it to the same Turtle shape the MONDO half produces: disease skos:related phenotype with a reified axiom per pair. ORPHA ids map to ORDO IRIs (the form EFO's disease branch carries, matching the 77k Orphanet axioms in the committed component); OMIM and DECIPHER map to their entry URLs; NOT-qualified rows are excluded; all aspects are kept, matching the inheritance terms present in the committed component. d2p-hpoa.ru is deleted with the OBAN model it queried, and get_mirrors.sh goes too — every fetch it performed is now a plan rule, and its hpoa line was the dead URL. Verified with om 0.2.2: om make components/d2p_hpoa.ttl fetches phenotype.hpoa (35 MB) and writes 284,267 distinct disease-phenotype pairs (128 MB Turtle), which om convert parses and maps to axioms cleanly in 26s. Refs #2768. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RMkT6NpLSiwerUD773q8V1
The previous fix rewrote the wc path inside the HGNC auto-exclude echo to src/ontology/imports/mondo_import.owl.hgnc.txt on the reasoning that every other plan path is repo-root-relative. Shell steps in the import pipeline run from src/ontology, and text inside a command substitution is passed to the shell verbatim, so the rewrite broke the very count it meant to fix. Measured with om 0.2.2 on om make imports/mondo_import.owl: the rewritten path prints "sh: cannot open src/ontology/imports/mondo_import.owl.hgnc.txt: No such file" and an empty count (also observed in CI run 32986716429); restored to imports/mondo_import.owl.hgnc.txt it prints "Auto-excluding 3606 HGNC terms from mondo import". Refs #2768. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RMkT6NpLSiwerUD773q8V1
Port Arwa's two white matter rarefaction terms from efo-4 to master
…2815) MONDO 2026-09-01 obsoleted MONDO_0019398 (desmin-related myopathy with Mallory body-like inclusions) with replacement MONDO_0100100 (congenital myopathy 3 with rigid spine). check_mondo_obsoletes failed on master because the replacement was not in mondo_terms.txt. Import it, repoint the IAO_0100001 / reason_for_obsolescence on obsolete Orphanet_84132 to the live term, and refresh the obsolete-check report. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Import MONDO_0100100, replacement for obsoleted MONDO_0019398 (fixes check_mondo_obsoletes on master)
Adds 33 of the 34 requested MONDO disease terms to the import seed list and regenerates the derived seed file. All terms were verified against OLS (bidirectional ID/label match), none are obsolete, and all resolve to MONDO:0000001 'disease' via MONDO's own hierarchy in the generated import - so no subclasses.csv entry or efo-edit.owl change is needed. MONDO:0003634 'proteinuria' is deliberately omitted. It is listed in mondo_exclude.txt as a duplicate label: EFO already carries proteinuria as HP:0000093, imported via hp_terms.txt. MONDO's own class also carries an editorial comment recommending the HPO term instead. Requesters should use HP:0000093 for proteinuria annotation. The derived imports/mondo_terms.txt additionally picks up MONDO_0100100, added to the source list by 064b6e5 (refs #2815) without the derived file being regenerated at the time. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01AWNpNSoJahy3ZtBcMaUstK
…2818) Fixes a nolabels-violation QC failure introduced by the MONDO import in 7546782. MONDO:0001339 "portal vein thrombosis" asserts RO_0004026 (disease has location) some UBERON:0002017, but the portal vein was not on EFO's UBERON seed list, so the merged ontology carried a bare class declaration with no rdfs:label. UBERON:0002017 was verified bidirectionally against OLS (label "portal vein", not obsolete) and added to the UBERON seed list; the import was regenerated with om make imports/uberon_import.owl --rebuild mirrors,imports. The regenerated import also reparents UBERON:0001639 "hepatic portal vein" from UBERON:0001638 (vein) to UBERON:0002017 (portal vein). That is BOT extraction no longer having to lift it to the nearest available ancestor, and matches UBERON's asserted hierarchy. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01AWNpNSoJahy3ZtBcMaUstK
… (refs #2818) Fixes a duplicate-label QC failure introduced by the MONDO import in 7546782. The native EFO term and the newly imported MONDO:0018824 both carried the label "pyoderma gangrenosum". Resolved by obsoleting the EFO term in favour of the Mondo one: - label prefixed with obsolete_ - owl:deprecated true - obsoleted_in_version 3.94.0 (next minor after the current 3.93.0) - reason_for_obsolescence and IAO_0100001 pointing at MONDO:0018824 - all logical axioms removed (both subClassOf parents and the RO_0002314 some UBERON_0000014 restriction) The definition, original IAO_0000117 author annotation and all seven xrefs are retained, matching the convention of the existing obsolete terms in this file. No axiom elsewhere in efo-edit.owl referenced EFO_0006835, and it does not appear in subclasses.csv, so nothing needed rewiring. Note: EFO_0006835 is flagged gwas_trait "true" in the generated components/gwas_import.owl, which is driven by iri_dependencies/ gwas_terms.tsv and is not updated by obsoletion. 990 previously obsoleted EFO terms are in the same state, so this follows existing practice rather than introducing a new gap. Verified with om make qc: all four checks pass (sparql_test with 11/11 rules clean, all_reports, label_synonym_dup_check, check_mondo_obsoletes), plus om make normalize_src and om reason -r ELK. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01AWNpNSoJahy3ZtBcMaUstK
Two CI failures fixed — 2 new commitsThe
Both failures were introduced by this PR; 1. UBERON:0002017 portal vein (
|
| Check | Result |
|---|---|
sparql_test |
PASS — 11/11 rules, 0 violations each |
all_reports |
PASS |
label_synonym_dup_check |
PASS (warning: 5018 collisions, down from 5019) |
check_mondo_obsoletes |
PASS (warning: 473 deprecated without replacement — unchanged, pre-existing) |
Also clean: om make normalize_src, and om reason -i src/ontology/efo-edit.owl -r ELK (exit 0, no unsatisfiable classes).
Both previously-failing rules now report 0, and no previously-passing rule regressed — no-dangling-violation and deprecated-violation in particular, which were the plausible casualties of stripping the term's parents and adding a deprecated class.
Still open
MONDO:0003634 proteinuria remains unimported, as described in the PR description — EFO already carries the concept as HP:0000093. That part of #2818 is answered by an existing term, which is why the issue is intentionally left open.
🤖 Generated with Claude Code
|
Superseded by #2823. This branch was based on the pre-reset master, so merging it would have reintroduced the owlmake build-system migration (now kept on |
Summary
Imports 33 of the 34 MONDO disease terms requested in #2818 for the Open Targets Safety 2.0 project's data annotation work.
This is an imports-only change — no new EFO terms, so
efo-edit.owlis untouched and there are no temporaryEFO_099xxxxIDs in this PR.One term was deliberately omitted:
MONDO:0003634proteinuria. See Notes below.Changes
src/ontology/iri_dependencies/mondo_terms.txtsrc/ontology/imports/mondo_terms.txtimports/mondo_import.owlwas rebuilt locally to validate the change but is gitignored, so it is not part of this diff — CI rebuilds it.The 33 imported terms
Checks
subClassOfpath to MONDO:0000001diseasein the generated import — the parent requested in the ticketsrc/templates/subclasses.csventry requiredom make imports/mondo_import.owl --rebuild mirrors,imports— exit 0, no errorsimports/hand-editedom make normalize_src/om reason— not run, and not applicable:efo-edit.owlhas no changes in this PRNotes / open questions
MONDO:0003634
proteinuriawas not importedMONDO_0003634is listed insrc/ontology/iri_dependencies/mondo_exclude.txt(line 3888). Theremove-termsstep inowlmake.yamlstrips it from the built import, so adding it to the seed list has no effect — confirmed empirically (grep -c MONDO_0003634 imports/mondo_import.owl→ 0).This exclusion is deliberate and, as far as I can tell, still correct:
mondo_exclude.txtdescends from a file originally namedmondo_duplicates.txt. The commit that added this entry is 74f8884 (2019-04-12), titled "Updated to work with new MONDO release and fixed duplicate label issue".hp_terms.txtand present inhp_import.owl("Increased levels of protein in the urine.").rdfs:commentrecommending the HPO term instead.Recommendation: keep the exclusion and use HP:0000093 for proteinuria annotation in Open Targets Safety 2.0. Removing it would reintroduce the duplicate-label problem it was created to fix. Reviewers who disagree should say so — the alternative is dropping
MONDO_0003634frommondo_exclude.txtand rebuilding.Incidental line in the derived seed list
imports/mondo_terms.txtgains one line unrelated to this ticket:MONDO_0100100. It was added to the source list by 064b6e5 (refs #2815) without the derived file being regenerated at the time; this rebuild catches it up. Harmless, but flagging it so it isn't a surprise in review.Refs #2818 — intentionally left open, as the proteinuria part of the request is answered by an existing term rather than by this import.
🤖 Generated with Claude Code
https://claude.ai/code/session_01AWNpNSoJahy3ZtBcMaUstK