Repository navigation
import: 22 HP terms for Open Targets Safety 2.0 (#2817) - #2821
ar-ibrahim wants to merge 12 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 the 22 requested HP IRIs to iri_dependencies/hp_terms.txt and regenerates the HP import. The regeneration also refreshed the HP mirror, so the import picks up upstream HP changes beyond the 22 new terms - most visibly the removal of ~4600 UMLS/SNOMEDCT_US hasDbXref annotations that are no longer distributed upstream. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01UXj5XoTCgsSuiUVwZZB5tV
|
| Annotation | Count removed |
|---|---|
oboInOwl:hasDbXref → UMLS: |
2909 |
oboInOwl:hasDbXref → SNOMEDCT_US: |
1697 |
oboInOwl:hasDbXref → HPO_CONTRIBUTOR: |
3 |
oboInOwl:inSubset |
371 |
oboInOwl:hasExactSynonym |
40 |
rdfs:subClassOf |
30 |
reified owl:Axiom blocks |
14 |
rdfs:label |
3 |
Example — HP:0000011 Neurogenic bladder loses three xrefs:
- <oboInOwl:hasDbXref>SNOMEDCT_US:397732007</oboInOwl:hasDbXref>
- <oboInOwl:hasDbXref>SNOMEDCT_US:398064005</oboInOwl:hasDbXref>
- <oboInOwl:hasDbXref>UMLS:C0005697</oboInOwl:hasDbXref>PMID (709), MEDDRA (44), NCIT (17), ICD (15), MP (10) and other xref prefixes are unaffected — the removal is confined to UMLS: and SNOMEDCT_US:, which is consistent with upstream HP dropping the UMLS-derived mappings rather than with anything this PR did.
Additions beyond the 22 terms (also upstream): 99 exact synonyms, 51 subClassOf, 47 owl:Axiom, 27 hasSynonymType, 12 rdfs:comment. Net class count 2526 → 2548, i.e. exactly the 22 requested terms.
What needs a decision. If any downstream EFO consumer relies on UMLS or SNOMEDCT_US xrefs reaching them through hp_import.owl, merging this drops ~4600 of those mappings in one go. Options:
- Merge as-is — accept the upstream HP 2026-09-01 state; the xrefs are gone upstream and EFO should track that.
- Split — land the 22 terms against the previous mirror, and handle the HP version bump in its own PR so the xref loss is reviewed on its own merits.
I've left it as option 1 since the mirror refresh is the documented way to regenerate an import (om make imports/hp_import.owl --rebuild mirrors,imports) and pinning the old mirror would be a deliberate deviation. Happy to redo it as option 2 if the mapping loss is a problem for Open Targets or any other consumer.
🤖 Generated with Claude Code
|
Superseded by #2822. 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 the 22 HP terms requested in #2817 for the Open Targets Safety 2.0 project. The IRIs were added to
src/ontology/iri_dependencies/hp_terms.txtand the HP import was regenerated. No changes toefo-edit.owl— all terms sit under the existing HP hierarchy, which already places them beneath EFO:0000651phenotypeas requested in the ticket, so nosubclasses.csventry was needed.No new EFO terms are created by this PR, so there are no temporary
EFO_099xxxxIDs.Changes
Files touched:
src/ontology/iri_dependencies/hp_terms.txt— 22 IRIs added (hand-edited source list)src/ontology/imports/hp_terms.txt,src/ontology/imports/hp_import.owl— regenerated, not hand-editedClass count in the import: 2526 → 2548.
The regeneration also refreshed the HP mirror, so
hp_import.owlpicks up upstream HP changes unrelated to this request. See the dedicated comment below for the breakdown — the headline is ~4600 removedUMLS:/SNOMEDCT_US:hasDbXrefannotations. Please read that comment before judging the diff size.Checks
iri_dependencies→om makeroute; no hand-edited files underimports/efo-edit.owluntouched — no reasoning or normalization impactCloses #2817
🤖 Generated with Claude Code
https://claude.ai/code/session_01UXj5XoTCgsSuiUVwZZB5tV