Skip to content

Add hra muscular ntr#3700

Open
dosumis wants to merge 25 commits into
masterfrom
add-hra-muscular-ntr
Open

Add hra muscular ntr#3700
dosumis wants to merge 25 commits into
masterfrom
add-hra-muscular-ntr

Conversation

@dosumis
Copy link
Copy Markdown
Contributor

@dosumis dosumis commented Apr 28, 2026

fixes #3707

10 input terms processed by the new dual-template flow:
- Stage 1: pre-classified into 8 leaf + 2 group rows
- Stage 2: 8 group JSONs (7 leaf parent groups + 1 grouping_terms bucket)
- Stage 3: 8 ntr-term-researcher agents (3 needed retry due to API stream
  timeouts; grouping_terms handled inline after retry stalled)
- Stage 4: dual-template merge

Final output:
- 4 NEW leaf terms with Aristotelian definitions, real PMID/DOI refs,
  resolved is_a/part_of, Wikipedia + FMA xrefs
- 0 NEW group terms — both 'anterior vertebral muscle' and
  'circular pharyngeal muscle' resolved to existing UBERON terms via
  Step 2 OLS4 check, validating that confirmed_match takes precedence
  over Step 8 EC pattern detection
- 5 confirmed_match (5 of 10 input terms already exist in UBERON):
  - ceratoglossus → UBERON:0008428
  - chondroglossus muscle → UBERON:0011535
  - costal diaphragm → UBERON:0035831
  - aryepiglotticus muscle → UBERON:0011025
  - constrictor muscle of pharynx → UBERON:0001569 (NEW from group flow)
- 1 possible_match: anterior vertebral muscle ≈ UBERON:0008549 (prevertebral
  muscle) — flagged for curator decision (synonym vs new term)
- 1 manual_curation: anterior vertebral muscle — UBERON's similar term uses
  attaches_to + innervated_by axioms, not the simple genus + part_of
  pattern, so out of EC template scope

The test exercises: leaf+INFER parent, leaf+NEEDS_MAPPING:FMA parent,
leaf+UNRESOLVABLE parent (including wrong-domain), group→confirmed_match,
group→possible_match+manual_curation. All paths working as designed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ai4c-agent
Copy link
Copy Markdown

ai4c-agent Bot commented Apr 28, 2026

Claude finished @dosumis's task in 5m 44s —— View job


PR Review: Add HRA Muscular NTR

Review checklist:

  • Hierarchy and parents are consistent
  • Definitions and supporting references look adequate
  • Obsolete or replacement handling is safe
  • OBO and ODK conventions appear preserved
  • No obvious CI, auth, or workflow regression

Summary

This PR adds ROBOT template infrastructure and four new NTR (New Term Request) leaf terms for HRA (Human Reference Atlas) muscular-system structures, along with a bulk NTR workflow toolkit. The term-level research appears careful and the definition quality is high. However, there are two issues that should be addressed before merge, and several important follow-on items.


🔴 CRITICAL

1. New templates not registered in ODK config — they will never compile

src/templates/hra-muscular.template.tsv and src/templates/hra-muscular-groups.template.tsv are added, but neither appears in src/ontology/uberon-odk.yaml nor has a corresponding rule in src/ontology/uberon.Makefile.

The precedent is hra-skeleton.template.tsv, which is listed under use_template: true in uberon-odk.yaml and has a custom $(COMPONENTSDIR)/hra_skeleton.owl rule in uberon.Makefile. Without equivalent registration the four NTR terms will never be built into the ontology.

2. dorsal part of intertransversarii laterales lumborum muscle — relationship type mismatch between workflow output and template

The definition research output (bulk_ntr_workflow/outputs/definitions/unresolvable_meningohypophyseal_artery.json) explicitly says:

"Note that 'dorsal part of' implies a subdivision, hence part_of relationship rather than is_a."

and sets resolved_relationships: "part_of". Yet src/templates/hra-muscular.template.tsv (row 6, UBERON:9900010) places UBERON:0008242 in the is_a column, not the part_of column. The research output and the final template are in direct conflict. Curator should decide the correct relationship and make the template consistent.


🟡 IMPORTANT

3. clavicular head of pectoralis major muscle (UBERON:9900008) — no is_a in template

Row 5 of hra-muscular.template.tsv has an empty is_a column and only part_of UBERON:0002381. In OBO format every term needs at least one explicit is_a (or a logical definition from which the reasoner can infer one). The template currently produces a term with only a BFO:0000050 some pectoralis_major SubClassOf axiom and no direct type. A parent such as "muscle head" (if such a class exists or should be created) or at minimum a generic skeletal muscle parent should be added.

4. ASCTB-TEMP IRIs in the def_xref column

All four terms carry https://purl.org/ccf/ASCTB-TEMP_<label> in the def_xref column (the column mapped to oboInOwl:hasDbXref on the definition). These are ephemeral provenance tracking IRIs from the HRA ASCT+B tables, not stable literature citations. They should be moved to the general xref column (or dropped) so they are not asserted as definition sources.

For example, anterior cervical intertransversarii muscle cites:

https://fipat.library.dal.ca/ta2/|ISBN:9780323393225|https://purl.org/ccf/ASCTB-TEMP_anterior-cervical-intertransversarii-muscle|PMID:12650404

The ASCTB-TEMP IRI is the third token in the definition xref list.

5. Missing term_tracker_item in both templates

Per CLAUDE.md and Uberon conventions, terms should link back to the originating GitHub issue with a term_tracker_item property. Neither template has a column for this. The hra-skeleton precedent and general UBERON practice require it for traceable provenance.

6. hra-muscular-reports/ placed under src/templates/

src/templates/hra-muscular-reports/ contains pipeline outputs (candidates.tsv, errors.tsv, input.tsv, manual_curation.tsv), not template files. These will confuse any tool that iterates src/templates/*.tsv or src/templates/**/*.tsv. Reports should live in bulk_ntr_workflow/outputs/ or similar, not inside the template directory.


🔵 SUGGESTIONS

7. Binary Excel file in repo root

hra_unmapped-asct-term-list-with-refs.xlsx (277 KB) is added to the repository root. Binary blobs in a git repo grow the clone size permanently. If this is source data, consider storing it under src/datasets/ with a brief README, or keeping it outside git (linked from the issue tracker).

8. ISBN:9780323393225 as a def_xref

ISBN references are non-standard in OBO/UBERON; PMID: and doi: are the expected citation forms. The TA2 URL (https://fipat.library.dal.ca/ta2/) is already included and serves as the Terminologia Anatomica reference. The ISBN could be removed from def_xref or moved to a comment.

9. FMA parent for articularis genu (UBERON:0004252) is very broad

FMA:22424 "Muscle of anterior compartment of thigh" has no UBERON equivalent, so the workflow fell back to UBERON:0004252 "hindlimb stylopod muscle". The fallback is documented in the definition output and the errors report, but UBERON:0004252 is a very coarse grouping. The definition output itself suggests considering UBERON:0001377 (quadriceps femoris) and explicitly notes that "articularis genu is anatomically discrete from the quadriceps". Curator should confirm the fallback is acceptable or note it for a follow-up parent term request.

10. @playwright/mcp@latest in .mcp.json is a floating version

Using @latest means the Playwright MCP server version is not pinned. Different contributors will pull different versions, which can affect reproducibility of the research workflow. Pinning to a specific semver is safer for shared infrastructure.

11. bulk_ntr_workflow/ adds substantial non-ontology content

The PR adds 1,700+ lines of Python scripts, JSON outputs, and documentation for the bulk NTR pipeline. This infrastructure is valuable but may belong in a separate utilities repository or be .gitignored when done. If it stays, the bulk_ntr_workflow/CLAUDE.md should be moved to somewhere that does not accidentally extend the project-level CLAUDE.md scope.


Per-term verdict

NTR ID Label Parent Status
UBERON:9900001 anterior cervical intertransversarii muscle is_a UBERON:0002324 (muscle of back) ✅ Reasonable; parent broad but defensible
UBERON:9900003 articularis genu muscle is_a UBERON:0004252 (hindlimb stylopod muscle) 🟡 Fallback parent; FMA:22437 xref looks correct
UBERON:9900008 clavicular head of pectoralis major muscle part_of UBERON:0002381 (pectoralis major) 🔴 No is_a
UBERON:9900010 dorsal part of intertransversarii laterales lumborum muscle template: is_a UBERON:0008242; workflow output: part_of UBERON:0008242 🔴 Relationship type conflict

Confirmed matches correctly excluded from template: aryepiglottic part of oblique arytenoid muscle (→ UBERON:0011025), costal part of respiratory diaphragm muscle (→ UBERON:0035831), ceratoglossus of hyoglossus muscle (→ UBERON:0008428), chondroglossus of hyoglossus muscle (→ UBERON:0011535), circular pharyngeal muscle (→ UBERON:0001569).


The term research quality and definition writing are solid. The main blockers are the missing ODK registration (templates won't compile without it) and the relationship-type inconsistency on UBERON:9900010. Addressing the missing is_a on UBERON:9900008 and the ASCTB-TEMP def_xrefs would bring the templates into line with Uberon conventions.

Copy link
Copy Markdown

@ai4c-agent ai4c-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two blocking issues before merge:

  1. Templates not wired into the buildhra-muscular.template.tsv and hra-muscular-groups.template.tsv are not registered in uberon-odk.yaml or uberon.Makefile. Without equivalent entries to the hra-skeleton precedent these terms will never compile into the ontology.

  2. Relationship-type conflict on UBERON:9900010 — the definition workflow output (unresolvable_meningohypophyseal_artery.json) explicitly recommends part_of for dorsal part of intertransversarii laterales lumborum muscle but the template uses is_a. These need to be reconciled.

Also flagged as important (see full comment):

  • UBERON:9900008 (clavicular head) has no is_a, only part_of
  • ASCTB-TEMP IRIs in the def_xref column should be in xref
  • term_tracker_item missing from both templates
  • Report files under src/templates/hra-muscular-reports/ should not live inside the template directory

Copy link
Copy Markdown

@ai4c-agent ai4c-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two blocking issues before merge:

  1. Templates not wired into the build — hra-muscular.template.tsv and hra-muscular-groups.template.tsv are not registered in uberon-odk.yaml or uberon.Makefile. Without equivalent entries to the hra-skeleton precedent these terms will never compile into the ontology.

  2. Relationship-type conflict on UBERON:9900010 — the definition workflow output (unresolvable_meningohypophyseal_artery.json) explicitly recommends part_of for dorsal part of intertransversarii laterales lumborum muscle but the template uses is_a. These need to be reconciled.

Also flagged as important (see full comment):

  • UBERON:9900008 (clavicular head) has no is_a, only part_of
  • ASCTB-TEMP IRIs in the def_xref column should be in xref
  • term_tracker_item missing from both templates
  • Report files under src/templates/hra-muscular-reports/ should not live inside the template directory

Copy link
Copy Markdown

@ai4c-agent ai4c-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two blocking issues before merge. 1) Templates not wired into the build: hra-muscular.template.tsv and hra-muscular-groups.template.tsv are not registered in uberon-odk.yaml or uberon.Makefile. 2) Relationship-type conflict on UBERON:9900010: workflow output says part_of but template uses is_a. See full review comment for details.

dosumis and others added 8 commits April 28, 2026 11:17
…umn assignment

Previously the agent picked is_a OR part_of and put the resolved parent in one
column, leaving the other empty. UBERON convention for specific named structures
is to populate BOTH — e.g. vastus lateralis (UBERON:0001379) has
'is_a UBERON:0001630 (muscle organ)' AND 'relationship: part_of UBERON:0001377
(quadriceps femoris)'.

ntr-term-researcher.md changes:
- Step 7 rewritten: agent now uses awk over uberon-edit.obo to find similar
  specific UBERON terms, identifies the genus class (typically muscle organ
  UBERON:0001630, muscle head UBERON:0011906) AND the part_of containing
  structure, then populates leaf_template_rows[label] = {is_a, part_of}
- Worked examples included (clavicular head, articularis genu, dominant
  follicle subtypes)
- Explicit warning: do NOT just take the source parent and assign it to one
  column; the source parent is often too broad to serve as the genus
- Output JSON gains leaf_template_rows key (analogous to group_template_rows)
- Quality checks updated: prefer leaf_template_rows; both is_a and part_of
  should be populated when applicable

merge_definitions.py changes:
- load_subagent_outputs reads leaf_template_rows
- merge_leaf_template uses leaf_template_rows first; falls back to legacy
  resolved_relationships + resolved_parents if absent (backward compatible)
- New counter 'leaf_template_rows used' in summary output

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…lated

After updating Step 7 of the agent spec to require obo-grep lookup of similar
UBERON terms before assigning the parent, re-ran the 4 leaf-term agents on the
muscular-system test set. All 4 now populate both is_a and part_of columns:

| Term                                                | is_a               | part_of           |
|-----------------------------------------------------|--------------------|-------------------|
| anterior cervical intertransversarii muscle         | muscle organ       | neck              |
| articularis genu muscle                             | muscle organ       | hindlimb stylopod |
| clavicular head of pectoralis major muscle          | muscle head        | pectoralis major  |
| dorsal part of intertransversarii laterales lumborum| muscle organ       | lower back muscle |

Notable: clavicular head correctly resolved to is_a UBERON:0011906 (muscle
head) — matching the long head of biceps brachii (UBERON:0007168) precedent.
articularis genu correctly distinguished UBERON:0004252 (sibling grouping
class, not container) from UBERON:0000376 (the actual containing region) by
following the pectineus precedent.

Stage 4 reports leaf_template_rows used=4, legacy resolved_relationships=0
— confirms the new path is exercising the proper genus+location lookup
rather than the legacy single-column assignment.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Standalone experiment in bulk_ntr_workflow/experiments/. Workflow scripts
NOT modified. Tests whether an agent can extract origin/insertion/
innervation/action from Wikipedia + uberon-edit.obo with UBERON ID
resolution and verbatim evidence quotes per field.

Test set (well-known whole muscle → obscure sub-part):
- internal abdominal oblique muscle (existing UBERON:0005454)
- tensor fascia latae muscle (existing UBERON:0001376)
- iliocostalis cervicalis muscle (existing UBERON:0008546)
- articularis genu muscle (NEW)
- clavicular head of pectoralis major muscle (NEW, muscle head)
- dorsal part of intertransversarii laterales lumborum (NEW, obscure)

Findings (full report in SUMMARY.md):

1. All 6 terms got 5-6 of 6 enrichment fields populated. Where UBERON IDs
   couldn't be resolved (named attachments, specific nerves, specific bone
   landmarks), the agent gracefully fell back to free-text quotes plus
   parent-class UBERON IDs.

2. The hypothesis that 'muscle parts are poorly axiomatised' is partly
   confirmed: parent muscle classes for sub-parts are missing
   (intertransversarii laterales lumborum), but the bigger gap is in
   UBERON's coverage of related anatomical entities — superior gluteal
   nerve, lateral pectoral nerve, iliotibial tract, suprapatellar bursa,
   ilioinguinal nerve, linea alba, accessory process of lumbar vertebra
   are all missing. A famous muscle like tensor fasciae latae has 2 such
   gaps; the obscure dorsal sub-part has 3 — gaps are not strongly
   correlated with term obscurity.

3. The verbatim-quote design works well for review. Each enrichment field
   carries 1-3 sentences of evidence + a source URL, making the
   enrichment auditable in seconds per field.

4. 3 of 6 picks turned out to be already in UBERON despite being plausible
   NTR candidates — Step 2 (existing-term check) continues to do real work.
   Existing UBERON stanzas often have surprisingly light axiomatisation
   (tensor fasciae latae has only 1 origin axiom), so enrichment could
   also improve existing terms, not just new ones.

No workflow changes; results are reference material for a future enrichment
phase. Roadmap candidates: (a) system-specific templates with pre-extracted
fields per system, (b) standardised evidence-quote design across all fields,
(c) cascade detection — flag missing UBERON entities as candidate NTRs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
User hypothesis: simple is_a + part_of would be sufficient for ovary terms
(unlike muscles where origin/insertion/innervation are needed).

Result: hypothesis NOT confirmed. 5 of 6 ovary terms tested require
relations beyond is_a + part_of:

- Layers (corona radiata, CL granulosa lutein, CL theca): need
  composed_primarily_of (CL:cell type) and/or bounding_layer_of, has_part
- Compositional complex (cumulus oophorus oocyte complex): needs has_part
  to distinguish from cumulus oophorus alone
- Follicle stages (early antral, transitional primary): need develops_from
  PLUS has_component with cardinality constraints PLUS
  has_potential_to_develop_into — UBERON's existing precedent
  (UBERON:0000035/36/37) uses all of these

Why ovary is harder for simple is_a + part_of than expected:
- Sibling layers share part_of (both lutein + theca layers part_of corpus
  luteum) — part_of alone doesn't differentiate
- Sibling follicle stages share is_a (all primary/secondary/tertiary
  is_a ovarian follicle AND part_of ovary) — neither relation distinguishes
- The defining property is cellular composition or developmental position,
  neither captured by spatial part_of

Cross-experiment comparison:
- Muscle group: simple genus + part_of EC sufficient (74% precedent)
- Muscle individual: needs muscle origin/insertion/innervation
- Muscle head/sub-part: simple is_a + part_of works (sparse precedent)
- Ovary layer/complex/stage: needs composed_primarily_of, has_part,
  develops_from, cardinality

Conclusion: per-system templates are warranted. A single one-size-fits-all
leaf template either over-fits one domain or under-serves both.

The evidence-quote JSON design transferred cleanly between domains —
confirming it as a generalisable pattern.

Output: bulk_ntr_workflow/experiments/SUMMARY_OVARY.md and 6 enriched JSONs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Stage 1 now partitions input rows by source `tables` value into system overlays.
Each overlay produces its own clean leaf template with system-specific columns;
unmapped tables go to the default template.

Phase 6 — develops_from on default leaf template
- New optional column with directive `SC RO:0002202 some %`
- Empty cell → no axiom (standard ROBOT pattern; do NOT alter directive to
  work around empty cells)
- Populated by agent for stage series (follicle stages, embryonic stages, etc.)

Phase 7 — skeletal-muscle overlay
- New muscle template variant: <name>-muscle.template.tsv
- Adds has_muscle_origin (RO:0002372), has_muscle_insertion (RO:0002373),
  innervated_by (RO:0002005)
- All optional; populated by agent only with evidence-quoted UBERON IDs
- Triggered by source table value `muscular-system` (SYSTEM_OVERLAYS map)

Implementation notes:
- generate_template.py: SYSTEM_OVERLAYS, classify_system(), overlay_paths();
  per-row routing builds leaf_rows_by_overlay dict; one template TSV written
  per overlay
- group_terms_by_parent.py: reads ALL leaf templates (default + system
  overlays) via discover_leaf_templates(); each per-term JSON entry now
  carries `system` field
- merge_definitions.py: REFACTORED to use header-name lookup
  (header_indices()) instead of hardcoded column indices. Each leaf
  template variant's columns are looked up at merge time. Optional logic
  columns (develops_from, has_muscle_*) populate from
  leaf_template_rows[label] when both column and value exist.
- agent spec: documents system field, develops_from + muscle-overlay
  guidance; output JSON example shows the optional fields
- CLAUDE.md: column reference splits leaf table into default + muscle
  overlay; new partitioning subsection

Smoke-tested with --table muscular-system --limit 10:
- Step 0 routing correctly outputs muscle=8, group=2 (no default partition
  since all 10 rows are muscular-system)
- Output template has 16 columns with the 6 expected logic relations
  (is_a + part_of + develops_from + 3 muscle)
- Merge with existing leaf_template_rows from previous run still works
  via legacy is_a + part_of fallback (Optional cols filled: 0 because
  agents haven't been re-run with new spec)

Phase 8 (term promotion) and overlays for skeleton/vasculature/nervous
documented in ROADMAP only — not implemented.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Re-ran Stage 1 with --table muscular-system --limit 10. Output:
- Step 0 routing: muscle=8, group=2 (correctly partitioned by source table)
- <name>-muscle.template.tsv has 16 columns: 6 logic relations
  (is_a, part_of, develops_from, has_muscle_origin, has_muscle_insertion,
  innervated_by) + 10 metadata
- Default leaf template absent (no rows for it — all are muscular-system)

Re-ran one agent (articularis genu) with the updated spec. Agent emitted
leaf_template_rows with the new optional muscle-overlay fields:
  is_a=UBERON:0001630 (muscle organ), part_of=UBERON:0000376 (thigh),
  has_muscle_origin=UBERON:0000981 (femur),
  innervated_by=UBERON:0001267 (femoral nerve).
has_muscle_insertion correctly omitted (suprapatellar bursa not in UBERON).

Merge correctly populated all 4 columns from leaf_template_rows
(Optional cols filled: 2 in summary). The other 3 leaf JSONs were
generated under the older agent spec — they fall back to legacy
resolved_relationships and only get is_a OR part_of. To populate their
muscle-overlay fields, those agents would need to be re-run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Stage 1 partitioning: muscle=55, group=20 (no default partition)
Stage 2 grouping: 45 groups (44 leaf + 1 grouping_terms bucket of 20 group terms)
Stage 3: 45 agents in 6 parallel batches; all completed without API timeouts
Stage 4 merge results:

Leaf template <name>-muscle.template.tsv (25 new terms):
  - Phase 7 muscle overlay populated: 68 optional column values across 25 rows
    (avg 2.7 muscle-specific columns per term — origin/insertion/innervated_by)
  - All 25 use leaf_template_rows (no legacy fallback path triggered)
  - 0 PENDING definitions, 0 INFER relationships, 0 unresolved
  - 24 of 25 have real PMID/DOI/ISBN def_xrefs added

Groups template <name>-groups.template.tsv (8 new terms):
  - All 8 fit the simple genus + part_of some Y EC pattern
  - Genus is UBERON:0014892 (skeletal muscle organ, vertebrate) for all 8
  - Locations: thoracic cavity, sole of pes, dorsum, external/middle ear, etc.

Reports:
  - candidates.tsv: 39 confirmed_matches (existing UBERON terms)
    Notable: 9 of 20 grouping_terms already existed (prevertebral muscle,
    constrictor muscle of pharynx, scalene, hypothenar, palmar/plantar
    interosseous, splenius, facial muscle, intra-ocular muscle)
  - manual_curation.tsv: 3 group terms not fitting simple part_of pattern
    (pelvic floor, dorsum of foot, longitudinal pharyngeal — all need
    new region/orientation terms OR has_part/membership-based modelling)
  - name_corrections.tsv: 17 entries (typos like 'capitus' → 'capitis',
    Latin variants like 'fascia' → 'fasciae', 'tibalis' → 'tibialis')

Wrong-domain parent issues flagged by agents (data quality in HRA source):
  - sternum→diaphragm (costal/sternal parts)
  - splenic artery→intrinsic muscle of tongue (inferior longitudinal)
  - innominate bone→pharyngeal muscle (pterygopharyngeus)
  - tip of renal papilla→hand muscle (palmar interosseous)
  - meningohypophyseal artery→lumbar back muscle (dorsal intertransversarii)
  - and many more — captured in individual JSON unresolvable notes

NOT merged to main. Branch retains everything for review.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ai4c-agent
Copy link
Copy Markdown

ai4c-agent Bot commented May 11, 2026

Claude finished @dosumis's task in 5m 44s —— View job


PR Review: Add HRA Muscular NTR (Re-review after sync)

Review checklist:

  • Hierarchy and parents are consistent
  • Definitions and supporting references look adequate
  • Obsolete or replacement handling is safe
  • OBO and ODK conventions appear preserved
  • No obvious CI, auth, or workflow regression

Tasks:

  • Load context and begin review
  • Inspect current template files and term content
  • Check ODK config and Makefile registration
  • Verify relationship types and is_a completeness
  • Check xrefs and ASCTB-TEMP handling
  • Review new/changed files vs previous issues
  • Post final review

Summary

The PR has grown substantially since the first review: the original four-term hra-muscular.template.tsv has been replaced by hra-muscular-muscle.template.tsv (25 leaf terms) and hra-muscular-groups.template.tsv (8 grouping terms), for 33 new NTRs total. Two prior blockers were resolved: UBERON:9900008 (clavicular head) now correctly has is_a UBERON:0011906 (muscle head), and the UBERON:9900010 relationship-type conflict was reconciled. However, the build-registration blocker remains, and a new critical logical conflict has been introduced in the groups template.


✅ Fixed since previous review

Issue Status
UBERON:9900008 (clavicular head) missing is_a ✅ Fixed — now is_a UBERON:0011906 (muscle head)
UBERON:9900010 relationship-type conflict (is_a vs part_of) ✅ Resolved — now is_a UBERON:0001630 + part_of UBERON:0001137

🔴 CRITICAL

1. Templates still not registered in ODK config or Makefile

Neither hra-muscular-muscle.template.tsv nor hra-muscular-groups.template.tsv appear in src/ontology/uberon-odk.yaml or src/ontology/uberon.Makefile. The precedent set by hra-skeleton.template.tsv requires entries in both files:

In uberon-odk.yaml:

- filename: hra_muscular.owl
  templates:
    - hra-muscular-muscle.template.tsv
    - hra-muscular-groups.template.tsv

And a corresponding build rule in uberon.Makefile (mirroring the hra_skeleton.owl rule). Without these, all 33 new terms will never compile into the ontology.

2. Groups template: three back-muscle terms have identical EC axiom definitions — reasoner will infer equivalence

intermediate back muscle (UBERON:9900020), segmental back muscle (UBERON:9900055), and superficial back muscle (UBERON:9900063) all have the same genus (UBERON:0014892) and location (UBERON:0001137), producing:

EquivalentClass(UBERON:9900020, UBERON:0014892 AND (BFO:0000050 some UBERON:0001137))
EquivalentClass(UBERON:9900055, UBERON:0014892 AND (BFO:0000050 some UBERON:0001137))
EquivalentClass(UBERON:9900063, UBERON:0014892 AND (BFO:0000050 some UBERON:0001137))

The OWL reasoner will immediately conclude all three are equivalent classes. Grouping terms like these are usually defined via SC (SubClassOf), not EC (EquivalentClass), precisely because equivalent-class axioms require fully differentiating conditions. Either change the template column from EC % / EC BFO:0000050 some % to SC % / SC BFO:0000050 some % for all grouping rows, or provide distinct location terms for each of the three back layers.


🟡 IMPORTANT

3. ASCTB-TEMP IRIs still in the def_xref column

All 33 terms still carry https://purl.org/ccf/ASCTB-TEMP_<label> in the def_xref column (mapped to oboInOwl:hasDbXref on the definition annotation). These are ephemeral workflow-tracking IRIs, not stable literature citations. They should be moved to the general xref column or dropped entirely so they are not asserted as definition sources. Flagged in the previous review; still unfixed.

4. term_tracker_item missing from both templates

Per CLAUDE.md and Uberon conventions, terms should link back to the originating GitHub issue. Neither template has a term_tracker_item column. Flagged in the previous review; still absent.

5. hra-muscular-reports/ still under src/templates/

Pipeline outputs (candidates.tsv, errors.tsv, input.tsv, manual_curation.tsv) live in src/templates/hra-muscular-reports/. This is not a template artefact and will confuse tools that iterate src/templates/**/*.tsv. Flagged in the previous review; still in place.

6. Three leaf terms use is_a UBERON:0001630 (muscle organ) instead of the more specific UBERON:0014892 (skeletal muscle organ, vertebrate)

  • UBERON:9900003 (articularis genu muscle)
  • UBERON:9900010 (dorsal part of intertransversarii laterales lumborum muscle)
  • UBERON:9900026 (lateral posterior cervical intertransversarii muscle)

All other skeletal muscle leaf terms in the same template correctly use UBERON:0014892. These three are clearly skeletal muscles and should be consistent.

7. UBERON:9900025 (lateral compartment of leg muscle) — part_of column is empty

The definition explicitly states the structure is "part of the lateral (fibular) fascial compartment of the leg". The part_of column in the template row has no value. If a lateral compartment region term exists or is being added, it should be set here. Otherwise the logical and textual definitions are misaligned.


🔵 SUGGESTIONS

8. ISBN:9780323393225 in def_xref is non-standard

ISBN citations are not standard OBO/UBERON practice. The TA2 URL (https://fipat.library.dal.ca/ta2/) already covers the Terminologia Anatomica source. The ISBN could be dropped from def_xref or moved to a comment.

9. UBERON:9900047 (posterior abdominal wall muscle) — location is generic abdominal wall

The EC axiom uses UBERON:0003697 (abdominal wall), but the term name specifies the posterior abdominal wall. If a posterior abdominal wall region term exists, it would be a more precise location.


Per-template verdict

Leaf template (25 terms) — most terms look anatomically sound with good definitions and PMIDs. Specific concerns:

NTR Issue
UBERON:9900003 (articularis genu) is_a too broad (muscle organ instead of skeletal muscle organ, vertebrate)
UBERON:9900010 (dorsal part lumborum) is_a too broad (same issue)
UBERON:9900025 (lateral compartment leg) part_of column blank despite definition mentioning compartment
UBERON:9900026 (lateral post. cervical intertransversarii) is_a too broad (same issue)

Groups template (8 terms) — logical-definition structure is sound in principle, but three back-layer groupings share identical EC axioms (see critical issue 2 above). The remaining five groupings (ear, abdominal wall, sole, thoracic wall) each have unique location values and are fine.

Two prior blockers are resolved. The remaining critical items (build registration and EC axiom collision) must be addressed before merge.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

This PR modifies some logical definitions. See details below:

Number of classes with modified logical definitions: 5

http://purl.obolibrary.org/obo/UBERON_1100029

No changes in inferred subclasses.

http://purl.obolibrary.org/obo/UBERON_1100017

Added subclasses: 3

http://purl.obolibrary.org/obo/UBERON_1100005

No changes in inferred subclasses.

http://purl.obolibrary.org/obo/UBERON_1100024

Added subclasses: 1

http://purl.obolibrary.org/obo/UBERON_1100021

Added subclasses: 4

Copy link
Copy Markdown

@ai4c-agent ai4c-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two new critical issues must be fixed before merge:

  1. Templates still not registered in ODK config/Makefile — both hra-muscular-muscle.template.tsv and hra-muscular-groups.template.tsv are absent from uberon-odk.yaml and uberon.Makefile. No component build rule exists, so all 33 new terms will never compile.

  2. Groups template EC axiom collision — intermediate back muscle (UBERON:9900020), segmental back muscle (UBERON:9900055), and superficial back muscle (UBERON:9900063) all produce identical EquivalentClass axioms (skeletal muscle organ AND part_of dorsum). The reasoner will infer these three terms are equivalent. These grouping terms should use SC (SubClassOf) columns, not EC (EquivalentClass).

Fixed from prior review: UBERON:9900008 now has is_a (muscle head) ✅; UBERON:9900010 relationship conflict resolved ✅.

Still outstanding from prior review (IMPORTANT): ASCTB-TEMP IRIs remain in the def_xref column; term_tracker_item columns missing from both templates; hra-muscular-reports/ still under src/templates/.

See the full review comment for details and per-term verdict.

dosumis and others added 3 commits May 11, 2026 17:35
…m run

26 unresolvable notes extracted from per-term JSON outputs in
bulk_ntr_workflow/outputs/definitions/. Most are wrong-domain parent
issues in HRA source data (sternum→diaphragm, splenic artery→tongue
muscle, innominate bone→pharyngeal muscle, meningohypophyseal artery→
lumbar muscle, anterior cerebral artery→hand muscle, fused sacrum→
abdominal muscle, etc.).

Workflow gap noted: merge_definitions.py currently writes aggregated
reports for confirmed_matches, name_corrections, out_of_scope, and
manual_curation, but NOT for unresolvable. Adding this aggregation to
the merge script would surface these systematically without manual
extraction. Tracked for follow-up.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces standalone unresolvable.tsv with a single curator-facing review
file. Each row of the original input gets:

| Column                  | Purpose                                       |
|-------------------------|-----------------------------------------------|
| table, as_iri, label    | Input source identifiers                       |
| term_type               | leaf | group                                  |
| source_parent_id        | Parent ID from source data                     |
| source_parent_label     | Parent label from source                       |
| status                  | confirmed_match | new_term_leaf |               |
|                         | new_term_group | manual_curation                |
| mapped_uberon_id        | Either existing UBERON ID (if confirmed)      |
|                         | OR new UBERON:99xxxxx ID (if new term)        |
| label_correction        | Suggested corrected label (typos etc.)        |
| label_correction_reason | Why the label was corrected                    |
| parent_correction       | Corrected parent UBERON ID (when source was   |
|                         | wrong-domain or missing)                       |
| curator_notes           | Pipe-separated unresolvable notes from agents |
|                         | (wrong-domain parents, missing UBERON          |
|                         | entities, modelling caveats)                   |

Aggregated stats for the muscular-system run:
- 75 input rows
- Status: 39 confirmed_match, 25 new_term_leaf, 8 new_term_group,
  3 manual_curation
- 17 with label corrections
- 34 with parent corrections (parent_correction populated)
- 20 with curator notes (mostly wrong-domain source parents)

This is the file curators should review first — one row per input
term, all findings consolidated, no need to dig into per-term JSONs.

Built one-off via Python script joining input.tsv + candidates.tsv +
name_corrections.tsv + manual_curation.tsv + per-term unresolvable
notes from outputs/definitions/*.json. Should be moved into
merge_definitions.py as an aggregated report writer (follow-up).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three new columns make curator review substantially faster:

- mapped_label: human-readable label of the mapped UBERON term
  (looked up from src/ontology/uberon-edit.obo). For new terms, shows
  '(new term: <label>)'. Saves the curator from having to look up each
  UBERON ID separately.

- parent_correction_label: human-readable label for parent_correction.
  Same rationale.

- mapping_evidence: synthesised evidence from per-term JSON outputs
  explaining WHY each source term maps to its existing UBERON match.
  Pulls from various agent field names (note, match_notes,
  match_evidence, web_evidence, rationale, matched_synonyms).
  Example: 'UBERON:0035831 has EXACT synonym "costal part of diaphragm"
  (FMA:58277). The source label "respiratory diaphragm muscle"
  resolves to UBERON:0001103 (diaphragm)...'

Stats:
- 71/75 rows have mapped_label populated
- 29 confirmed_match rows have mapping_evidence (the other 10 had
  agents that didn't emit the optional evidence fields — minor gap)
- 34 with parent_correction (so 34 with parent_correction_label too)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ai4c-agent
Copy link
Copy Markdown

ai4c-agent Bot commented May 11, 2026

Claude finished @dosumis's task in 6m 48s —— View job


PR Review: Add HRA Muscular NTR (Third review)

Tasks:

  • Load context and begin review
  • Inspect current template files and term content
  • Check ODK config and Makefile registration
  • Verify EC axiom issue in groups template
  • Check is_a parents for leaf terms
  • Check xrefs and ASCTB-TEMP handling
  • Check term_tracker_item and report file placement
  • Post final review

Review checklist:

  • Hierarchy and parents are consistent (with exceptions noted below)
  • Definitions and supporting references look adequate
  • Obsolete or replacement handling is safe
  • OBO and ODK conventions appear preserved — FAILS (templates not registered; EC collision; missing term_tracker_item)
  • No obvious CI, auth, or workflow regression

Summary

No issues from the previous review have been fixed. The three most recent commits (bb73ff6, 77fd128, 0fdd84d) only add columns and a report to the pipeline output files in src/templates/hra-muscular-reports/. The term templates themselves are unchanged since the second review. Both critical blockers remain open, as do all the important issues.

Additionally, the new NTR terms are not present in src/ontology/uberon-edit.obo at all — they exist only in the two unregistered template TSV files and will have no effect on the ontology until the build-registration blocker is resolved.

The uberon-edit.obo changes in this PR (removing UBERON:1200004 and updating lymph node sinus axioms) appear correct; CI confirms no regression in inferred subclasses for the two affected terms.


🔴 CRITICAL (same as previous review — still unresolved)

1. Templates not registered in ODK config or Makefile

hra-muscular-muscle.template.tsv (25 terms) and hra-muscular-groups.template.tsv (8 terms) are absent from both src/ontology/uberon-odk.yaml and src/ontology/uberon.Makefile. The hra-skeleton precedent requires:

In uberon-odk.yaml:

- filename: hra_muscular.owl
  templates:
    - hra-muscular-muscle.template.tsv
    - hra-muscular-groups.template.tsv

And a corresponding build rule in uberon.Makefile mirroring the hra_skeleton.owl rule at line 1364. Without these, all 33 new NTRs will never compile into the ontology.

2. EC axiom collision in groups template — three back-layer groupings will be inferred equivalent

intermediate back muscle (UBERON:9900020), segmental back muscle (UBERON:9900055), and superficial back muscle (UBERON:9900063) all use:

EC UBERON:0014892
EC BFO:0000050 some UBERON:0001137

All three produce the identical EquivalentClass axiom skeletal_muscle_organ AND part_of dorsum. An OWL reasoner will immediately conclude these three classes are mutually equivalent. Change the groups template row-2 column tags from EC % / EC BFO:0000050 some % to SC % / SC BFO:0000050 some % for all grouping rows, or provide distinct location terms for the three back layers.


🟡 IMPORTANT (same as previous review — still unresolved)

3. ASCTB-TEMP IRIs still in the def_xref column

All 33 terms still carry https://purl.org/ccf/ASCTB-TEMP_<label> in the def_xref column (row-2: >A oboInOwl:hasDbXref SPLIT=|). These ephemeral workflow-tracking IRIs are asserted as definition sources. Move them to the general xref column or drop them.

4. term_tracker_item missing from both templates

Neither template has a term_tracker_item column. Per CLAUDE.md and Uberon convention, terms must link back to the originating GitHub issue.

5. hra-muscular-reports/ still under src/templates/

The reports directory now has 6 files (candidates.tsv, errors.tsv, input.tsv, manual_curation.tsv, name_corrections.tsv, review.tsv). These are pipeline outputs and should not live under src/templates/, where any tool iterating src/templates/**/*.tsv will treat them as ROBOT templates.

6. Three leaf terms use is_a UBERON:0001630 (muscle organ) instead of UBERON:0014892 (skeletal muscle organ, vertebrate)

NTR ID Label
UBERON:9900003 articularis genu muscle
UBERON:9900010 dorsal part of intertransversarii laterales lumborum muscle
UBERON:9900026 lateral posterior cervical intertransversarii muscle

All other skeletal muscle leaf terms in the same template use UBERON:0014892. These three are clearly skeletal muscles and should be consistent.

7. UBERON:9900025 (lateral compartment of leg muscle) — part_of column is empty

The definition says "A skeletal muscle organ that is part of the lateral (fibular) fascial compartment of the leg". The part_of column (column 6) contains no value, leaving the textual and logical definitions misaligned.


🔵 SUGGESTIONS (carried from previous review)

8. ISBN:9780323393225 in def_xref is non-standard — the TA2 URL already covers the Terminologia Anatomica reference; the ISBN could be dropped or moved to a comment.

9. UBERON:9900047 (posterior abdominal wall muscle) — uses UBERON:0003697 (abdominal wall, generic) as location; if a posterior abdominal wall region term exists, it would be more precise.


What changed since the last review

The three newest commits add pipeline output enhancements:

  • name_corrections.tsv (new) — captures source label corrections; useful for QC
  • review.tsv — three new columns (mapped_label, parent_correction_label, mapping_evidence) for easier curator review

These are valuable workflow additions, but do not address any of the open issues.

The uberon-edit.obo changes (removal of UBERON:1200004 and related axiom updates) look correct; CI reports no inferred-subclass regressions for the two affected lymph node sinus terms.


Per-template verdict (unchanged)

Leaf template (25 terms): Definition quality is high with good PMID support. Specific concerns remain on UBERON:9900003, 9900010, 9900026 (is_a too broad) and UBERON:9900025 (part_of blank).

Groups template (8 terms): The critical EC axiom collision on the three back-layer groupings (UBERON:9900020, 9900055, 9900063) must be fixed. The other five groupings (ear, abdominal wall, sole, thoracic wall, middle ear) each have unique locations and are logically sound.

The two critical blockers (build registration; EC axiom collision) and the important issues must be addressed before merge.

Copy link
Copy Markdown

@ai4c-agent ai4c-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two critical blockers remain unresolved since the previous review:

  1. Templates not registered in ODK config/Makefile — hra-muscular-muscle.template.tsv and hra-muscular-groups.template.tsv are absent from uberon-odk.yaml and uberon.Makefile. All 33 new NTR terms exist only in unregistered template files and will never compile into the ontology.

  2. EC axiom collision in groups template — intermediate back muscle (UBERON:9900020), segmental back muscle (UBERON:9900055), and superficial back muscle (UBERON:9900063) produce identical EquivalentClass axioms (skeletal muscle organ AND part_of dorsum). The reasoner will infer all three are equivalent classes. Change EC to SC for grouping rows.

Also still outstanding (flagged in both prior reviews): ASCTB-TEMP IRIs in def_xref; term_tracker_item missing from both templates; hra-muscular-reports/ under src/templates/; three leaf terms (9900003, 9900010, 9900026) using too-broad is_a UBERON:0001630; UBERON:9900025 part_of column empty.

No issues from the previous review were addressed in the three most recent commits. See the full review comment for details.

- uberon-odk.yaml: add hra_muscular.owl component product, built from
  hra-muscular-groups.template.tsv + hra-muscular-muscle.template.tsv
- update_repo regenerated src/ontology/Makefile (OTHER_SRC,
  recreate-components, $(COMPONENTSDIR)/hra_muscular.owl rule) and the
  components documentation page
- uberon.Makefile: override the ODK-generated rule for hra_muscular.owl
  so it pulls in templates/hra-muscular-prefixes.owl (declaring dcterms:
  and foaf: annotation properties) plus explicit --prefix flags; modelled
  on the existing hra_skeleton override
- templates/hra-muscular-prefixes.owl: new prefix stub declaring all
  annotation/object properties used in the two muscular template TSVs
- catalog-v001.xml: add catalog entry for hra_muscular.owl
- uberon-edit.obo: add import: line for the new component
- components/hra_muscular.owl: initial generated component file
- .github/workflows/diff.yml: change COMP=false -> COMP=true in both
  classify_branch and classify_main so the #gogoeditdiff workflow
  rebuilds template-derived components before classification. Without
  this, PRs that only edit a template TSV produce a no-op classification
  diff because both sides load the committed component.

This lets #gogoeditdiff surface the effect of template changes on both
the unreasoned edit-file diff (catalog-resolved imports load the freshly
generated component) and the reasoned -base diff.

Signed-off-by: @dragon-ai-agent
@dosumis dosumis requested a review from matentzn as a code owner May 15, 2026 14:44
@ai4c-agent
Copy link
Copy Markdown

ai4c-agent Bot commented May 15, 2026

PR Review: Add HRA Muscular NTR (Fourth review)

Tasks:

  • Load context and begin review
  • Check most recent commits for fixes to prior issues
  • Inspect ODK config and Makefile registration
  • Verify EC axiom issue in groups template
  • Check is_a parents for leaf terms
  • Check xrefs and ASCTB-TEMP handling
  • Check term_tracker_item and report file placement
  • Post final review

View job run

…dit file

Adds three HRA back-muscle grouping terms to uberon-edit.obo with plain is_a
parents under UBERON:0004469 (musculature of back):

  - UBERON:9900020 intermediate back muscle
  - UBERON:9900055 segmental back muscle
  - UBERON:9900063 superficial back muscle

These were originally in hra-muscular-groups.template.tsv with EC axioms of the
form (skeletal muscle organ AND part_of some dorsum). Because all three share
the same genus + location, the reasoner produced an unsatisfiable triplet
collapsing them into a single equivalence class.

Per Wikipedia (Human_back), the three groupings are differentiated by
anatomical layer, innervation source (anterior vs posterior rami), embryological
origin, and function - none of which the simple genus + part_of location
pattern can capture. The terms are therefore curated manually as named
groupings without OWL equivalence axioms; the rationale is captured in
per-term comments and in src/templates/hra-muscular-reports/manual_curation.tsv.

Refs #3707
Signed-off-by: @dragon-ai-agent

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Large scale logical changes detected. Review by specific Uberon Core Team members is required.

@github-actions github-actions Bot requested a review from cmungall May 15, 2026 14:47
@dosumis
Copy link
Copy Markdown
Contributor Author

dosumis commented May 15, 2026

#gogoedtidiff

@ai4c-agent
Copy link
Copy Markdown

ai4c-agent Bot commented May 15, 2026

Claude finished @dosumis's task in 5m 21s —— View job


PR Review: Add HRA Muscular NTR (Fourth review)

Review checklist:

  • Hierarchy and parents are consistent (with exceptions noted)
  • Definitions and supporting references look adequate
  • Obsolete or replacement handling is safe
  • OBO and ODK conventions appear preserved — partially (templates now registered ✅; ASCTB-TEMP still in def_xref; term_tracker_item still absent from template-derived terms)
  • No obvious CI, auth, or workflow regression

Tasks:

  • Load context and begin review
  • Check most recent commits for fixes to prior issues
  • Inspect ODK config and Makefile registration
  • Verify EC axiom issue in groups template
  • Check is_a parents for leaf terms
  • Check xrefs and ASCTB-TEMP handling
  • Check term_tracker_item and report file placement
  • Post final review

Summary

Both previous critical blockers are now resolved:

  1. Templates registered (commit 3f73ed6): hra-muscular-muscle.template.tsv and hra-muscular-groups.template.tsv are now in uberon-odk.yaml and uberon.Makefile, with a prefixes stub and catalog entry. The component will compile correctly.

  2. EC axiom collision fixed (commit c21556f): The three back-muscle groupings (UBERON:9900020, 9900055, 9900063) were removed from the template and added to uberon-edit.obo as manually-curated terms with plain is_a UBERON:0004469 (musculature of back), well-written rationale comments, and term_tracker_item links. This is the right approach.

Five important issues from prior reviews remain open:


🟡 IMPORTANT (still outstanding)

1. ASCTB-TEMP IRIs still in the def_xref column

All 25 leaf terms and 5 group terms still carry https://purl.org/ccf/ASCTB-TEMP_<label> in the def_xref column (mapped to oboInOwl:hasDbXref on the definition annotation). These ephemeral IRIs are being asserted as definition sources. By contrast, the three manually-curated back-muscle terms in uberon-edit.obo correctly place the ASCTB-TEMP IRI in the xref: field (not the definition's xrefs). The template rows should follow that same convention.

2. Three leaf terms use is_a UBERON:0001630 (muscle organ) instead of UBERON:0014892 (skeletal muscle organ, vertebrate)

NTR ID Label
UBERON:9900003 articularis genu muscle
UBERON:9900010 dorsal part of intertransversarii laterales lumborum muscle
UBERON:9900026 lateral posterior cervical intertransversarii muscle

All three are clearly skeletal muscles. All other leaf terms in the same template use UBERON:0014892. The inconsistency means these three will not be classified as vertebrate skeletal muscles by the reasoner.

3. UBERON:9900025 (lateral compartment of leg muscle) — part_of column is empty

The definition says "part of the lateral (fibular) fascial compartment of the leg" but the part_of column (column 6 of the template) is blank, leaving the textual and logical definitions misaligned. Fix this →

4. term_tracker_item missing from both template files

The three manually-curated terms in uberon-edit.obo correctly carry property_value: term_tracker_item "https://github.com/obophenotype/uberon/issues/3707" xsd:anyURI. The remaining 30 template-derived terms do not, because neither template has a term_tracker_item column. Per CLAUDE.md conventions these should link back to the originating issue.

5. hra-muscular-reports/ still under src/templates/

Six pipeline-output files remain in src/templates/hra-muscular-reports/. Any tool iterating src/templates/**/*.tsv will treat them as ROBOT templates. These should be moved to bulk_ntr_workflow/outputs/ or similar.


🔵 SUGGESTIONS

6. ISBN:9780323393225 in def_xref is non-standard; the TA2 URL already covers the Terminologia Anatomica source and the ISBN could be dropped or moved to a comment.

7. UBERON:9900047 (posterior abdominal wall muscle) uses generic UBERON:0003697 (abdominal wall) as the location; if a posterior abdominal wall region term exists it would be more precise.


What changed since the last review

Commit What it does Issues addressed
3f73ed6 Register hra_muscular component in ODK config, Makefile, catalog; add prefixes stub; enable COMP=true in diff workflow ✅ Critical #1 (build registration)
c21556f Move 3 back-muscle groupings to manual curation in uberon-edit.obo ✅ Critical #2 (EC axiom collision)
bb73ff6 / 77fd128 / 0fdd84d Pipeline report enhancements only No review issues addressed

Both critical blockers are resolved. The five remaining important issues are convention and logical-accuracy items that should be fixed before merge.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Large scale logical changes detected. Review by specific Uberon Core Team members is required.

Copy link
Copy Markdown

@ai4c-agent ai4c-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review checklist:

  • Hierarchy and parents are consistent (with exceptions noted)
  • Definitions and supporting references look adequate
  • Obsolete or replacement handling is safe
  • OBO and ODK conventions appear preserved — partially (templates now registered ✅; ASCTB-TEMP still in def_xref; term_tracker_item still absent from templates)
  • No obvious CI, auth, or workflow regression

Summary: Fourth Review

Both previous critical blockers are now resolved:

  1. Templates registered (commit 3f73ed6): hra-muscular-muscle.template.tsv and hra-muscular-groups.template.tsv are now registered in uberon-odk.yaml and uberon.Makefile, with a prefixes stub and catalog entry. The 33-term component will compile correctly.

  2. EC axiom collision fixed (commit c21556f): The three identical EC-axiom back-muscle groupings (UBERON:9900020 intermediate, UBERON:9900055 segmental, UBERON:9900063 superficial) were removed from the template and added to uberon-edit.obo as manually-curated terms with plain is_a UBERON:0004469 (musculature of back), well-written rationale comments, and term_tracker_item links. This is the right approach.

Five important issues from prior reviews remain unresolved:


🟡 IMPORTANT (still outstanding)

1. ASCTB-TEMP IRIs still in the def_xref column

All 25 leaf terms and 5 group terms still carry https://purl.org/ccf/ASCTB-TEMP_<label> in the def_xref column (mapped to oboInOwl:hasDbXref on the definition annotation). These ephemeral workflow-tracking IRIs are being asserted as definition sources. By contrast, the three manually-curated back-muscle terms correctly place the ASCTB-TEMP IRI in the xref: field, not in the definition's xrefs. The template rows should follow the same convention.

2. Three leaf terms use is_a UBERON:0001630 (muscle organ) instead of UBERON:0014892 (skeletal muscle organ, vertebrate)

NTR ID Label
UBERON:9900003 articularis genu muscle
UBERON:9900010 dorsal part of intertransversarii laterales lumborum muscle
UBERON:9900026 lateral posterior cervical intertransversarii muscle

All three are clearly skeletal muscles. All other skeletal-muscle leaf terms in the same template correctly use UBERON:0014892. The inconsistency means these three will not be classified as vertebrate skeletal muscles by the reasoner.

3. UBERON:9900025 (lateral compartment of leg muscle) — part_of column is empty

The definition explicitly states the structure is 'part of the lateral (fibular) fascial compartment of the leg', but the part_of column (column 6) has no value, leaving the textual and logical definitions misaligned. The lateral compartment of leg (UBERON:0035526 is already referenced in the innervated_by column so the IRI is known; the correct part_of target may be a fascial compartment term if one exists, otherwise the current innervated_by reference suggests the compartment IRI needs checking.)

4. term_tracker_item missing from both template files

The three manually-curated terms in uberon-edit.obo correctly have property_value: term_tracker_item "https://github.com/obophenotype/uberon/issues/3707" xsd:anyURI. The remaining 30 template-derived terms do not, because neither template has a term_tracker_item column. Per CLAUDE.md convention these should link back to the originating issue.

5. hra-muscular-reports/ still under src/templates/

Six pipeline-output files (candidates.tsv, errors.tsv, input.tsv, manual_curation.tsv, name_corrections.tsv, review.tsv) remain in src/templates/hra-muscular-reports/. Any tool iterating src/templates/**/*.tsv will treat them as ROBOT templates. These belong in bulk_ntr_workflow/outputs/ or a similar non-template location.


🔵 SUGGESTIONS (carried from prior reviews)

6. ISBN:9780323393225 in def_xref — the TA2 URL already covers the Terminologia Anatomica source; the ISBN is non-standard in OBO/UBERON and could be dropped or moved to a comment.

7. UBERON:9900047 (posterior abdominal wall muscle) — uses generic UBERON:0003697 (abdominal wall) as location; a posterior abdominal wall region term would be more precise if one exists.


What changed since the last review

Commit What it does Issues addressed
3f73ed6 Register hra_muscular component; update Makefile, catalog, ODK config; add prefixes stub; enable COMP=true in diff workflow ✅ Critical #1 fixed
c21556f Move 3 back-muscle groupings to manual curation in uberon-edit.obo ✅ Critical #2 fixed
bb73ff6 / 77fd128 / 0fdd84d Pipeline report enhancements only No review issues addressed

Per-term verdict

Manually-curated back-muscle groupings (uberon-edit.obo):

NTR Label Status
UBERON:9900020 intermediate back muscle ✅ Correctly curated with is_a, comment, term_tracker_item
UBERON:9900055 segmental back muscle ✅ Same
UBERON:9900063 superficial back muscle ✅ Same

Groups template (5 remaining terms):

NTR Label Status
UBERON:9900013 external ear muscle ✅ Unique EC axiom, sound
UBERON:9900036 middle ear muscle ✅ Unique EC axiom, sound
UBERON:9900047 posterior abdominal wall muscle 🔵 Generic location (suggestion only)
UBERON:9900056 sole of foot muscle ✅ Unique EC axiom, sound
UBERON:9900068 thoracic wall muscle ✅ Unique EC axiom, sound

Leaf template (25 terms): Definitions and PMIDs are high quality. Specific concerns:

NTR Issue
UBERON:9900003 is_a too broad (muscle organ, not skeletal muscle organ vertebrate)
UBERON:9900010 is_a too broad (same)
UBERON:9900025 part_of column blank despite definition describing compartment membership
UBERON:9900026 is_a too broad (same)

The two critical blockers are resolved — good progress. The remaining issues are important conventions (definition xref semantics, is_a parent precision, term_tracker_item traceability) that should be fixed before merge.

dosumis and others added 2 commits May 15, 2026 17:46
…orts out of templates

Addresses review feedback items 3, 4, 5, 7:

- Item 3: UBERON:9900025 (lateral compartment of leg muscle) now has
  part_of UBERON:0000978 (leg). The reviewer's note that 0035526 was in
  innervated_by was correct — 0035526 is the superficial fibular nerve
  (not the compartment). No 'lateral compartment of leg' region term
  exists in UBERON, so the generic 'leg' was used.

- Item 4: Both templates now carry a term_tracker_item column
  (AT IAO:0000233^^xsd:anyURI) pointing back to issue #3707, and
  hra-muscular-prefixes.owl declares IAO_0000233. All 30 template-
  derived terms now have term_tracker_item annotations matching the
  three manually-curated terms.

- Item 5: Moved hra-muscular-reports/ from src/templates/ to
  bulk_ntr_workflow/outputs/. These are pipeline outputs, not ROBOT
  templates, and were at risk of being picked up by any tooling that
  iterates src/templates/. Updated generate_template.py,
  merge_definitions.py, and bulk_ntr_workflow/CLAUDE.md accordingly.

- Item 7: posterior abdominal wall (UBERON:9900047): no posterior
  counterpart of anterior abdominal wall (UBERON:0006635) exists in
  UBERON, so the term retains its location as the generic abdominal
  wall (UBERON:0003697). Flagged in manual_curation.tsv for future
  follow-up.

Regenerated src/ontology/components/hra_muscular.owl from the updated
templates.

Refs #3707
Signed-off-by: @dragon-ai-agent

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ai4c-agent
Copy link
Copy Markdown

ai4c-agent Bot commented May 18, 2026

PR Review: Add HRA Muscular NTR (Fifth review)

Tasks:

  • Load context and begin review
  • Check most recent commits for fixes to prior issues
  • Inspect template files for remaining issues
  • Check ASCTB-TEMP IRIs in def_xref
  • Verify is_a parents for 3 leaf terms
  • Check UBERON:9900025 part_of column
  • Check term_tracker_item in templates
  • Check hra-muscular-reports/ placement
  • Post final review

View job run

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Large scale logical changes detected. Review by specific Uberon Core Team members is required.

dosumis and others added 3 commits May 18, 2026 10:29
Since the three back-muscle grouping terms are curated manually without
OWL equivalence axioms, their member muscles need explicit is_a edges to
populate the hierarchy under each group.

Changes:

- Re-parented all three groupings from UBERON:0004469 (musculature of
  back, collection-class) to UBERON:0002324 (muscle of back, singular)
  to match UBERON convention for sibling 'X back muscle' terms
  (UBERON:0008242 lower / 0008243 upper). This avoids the type mismatch
  of asserting a single muscle is_a a musculature.

- Tweaked all three definitions to fit singular interpretation:
  'A muscle of back that is part of the [layer]...'. Members are
  listed within the definitions and comments make the wiring explicit.

- Added is_a links to existing UBERON members:
    UBERON:0002380 trapezius muscle               → 9900063 superficial
    UBERON:0001112 latissimus dorsi muscle        → 9900063 superficial
    UBERON:0005461 levator scapulae muscle        → 9900063 superficial
    UBERON:0001126 serratus dorsalis superior     → 9900020 intermediate
    UBERON:0001127 serratus dorsalis inferior     → 9900020 intermediate
    UBERON:8410070 levator costarum               → 9900055 segmental

- Re-parented 11 HRA segmental leaf rows in hra-muscular-muscle.template.tsv
  from generic UBERON:0014892 / 0001630 / 0004518 to UBERON:9900055
  (segmental back muscle): the various interspinales, intertransversarii,
  and levatores costarum subdivisions.

Rhomboid major and rhomboid minor have no UBERON terms; not wired here.

Refs #3707
Signed-off-by: @dragon-ai-agent

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ing EC

UBERON had `anterior abdominal wall` (UBERON:0006635) but no `posterior
abdominal wall`, even though UBERON:0006635's own definition explicitly
partitions the wall into anterior/posterior/lateral. This blocked a
clean Aristotelian EC for the HRA muscular grouping term
`posterior abdominal wall muscle` (UBERON:9900047), which had been
falling back to `part_of abdominal wall` (UBERON:0003697) — too broad
and inconsistent with the parallel anterior wall pattern.

Changes:

- New term UBERON:9900100 `posterior abdominal wall`:
  - is_a UBERON:0000475 (organism subdivision)
  - part_of UBERON:0003697 (abdominal wall)
  - Mirrors UBERON:0006635 (anterior abdominal wall) as the dorsal
    sibling subdivision; refs Wikipedia:Abdominal_wall + Gray's
    (ISBN:9780323393225).
  - Carries the standard added_by_HRA metadata (dc-contributor,
    dcterms-date, term_tracker_item, present_in_taxon NCBITaxon:9606,
    created_by: dragon-ai-agent).

- Rewire existing posterior-wall muscles with part_of UBERON:9900100:
  - UBERON:0001220 quadratus lumborum (already had the synonym
    "muscle of posterior abdominal wall" — clear signal it belonged)
  - UBERON:0001298 psoas major muscle
  - UBERON:0001372 psoas minor muscle
  - UBERON:0001369 iliacus muscle
  (Per Gray's classification of posterior abdominal wall muscles.)

- Update template hra-muscular-groups.template.tsv row for
  UBERON:9900047 `posterior abdominal wall muscle`:
  - location -> UBERON:9900100 (was UBERON:0003697)
  - Definition reworded to Aristotelian form
    "A skeletal muscle organ that is part of a posterior abdominal
    wall. Examples: …", mirroring UBERON:0002461 `anterior abdominal
    wall muscle` (the existing parallel).
  This produces a clean EquivalentClasses axiom in the rebuilt
  component: UBERON:9900047 = UBERON:0014892 ∩ part_of UBERON:9900100.

- Rebuilt components/hra_muscular.owl via the make rule (the file now
  has the proper ontology IRI Ontology(...components/hra_muscular.owl>
  rather than the empty <Ontology/> introduced by an earlier manual
  rebuild — fixes Protégé catalog resolution).

After classification the four part_of'd muscles should be inferred as
subclasses of UBERON:9900047 via the EC; downstream PRs can tighten
their muscle-class hierarchy as needed (psoas major/minor/iliacus
currently reach UBERON:0014892 only via deeper chains).

Signed-off-by: @dragon-ai-agent
@ai4c-agent
Copy link
Copy Markdown

ai4c-agent Bot commented May 18, 2026

Claude finished @dosumis's task in 5m 23s —— View job


PR Review: Add HRA Muscular NTR (Fifth review)

Review checklist:

  • Hierarchy and parents are consistent
  • Definitions and supporting references look adequate
  • Obsolete or replacement handling is safe
  • OBO and ODK conventions appear preserved — partially (ASCTB-TEMP still in def_xref; articularis genu is_a still too broad)
  • No obvious CI, auth, or workflow regression

Tasks:

  • Load context and begin review
  • Check most recent commits for fixes to prior issues
  • Inspect template files for remaining issues
  • Check ASCTB-TEMP IRIs in def_xref
  • Verify is_a parents for leaf terms
  • Check UBERON:9900025 part_of column
  • Check term_tracker_item in templates
  • Check hra-muscular-reports/ placement
  • Post final review

Summary

Significant progress since the fourth review. Three important issues flagged in previous reviews are now resolved, two back-muscle is_a problems were fixed via re-parenting through UBERON:9900055, and a new term UBERON:9900100 (posterior abdominal wall) was added to give the grouping term UBERON:9900047 a clean Aristotelian location. Two important issues from prior reviews remain unresolved: ASCTB-TEMP IRIs asserted as definition sources (flagged in all four prior reviews), and the articularis genu is_a being too broad (flagged since the second review).


✅ Fixed since the fourth review

Issue Commit Status
UBERON:9900025 (lateral compartment of leg): part_of column blank e640036 ✅ Now part_of UBERON:0000978 (leg)
term_tracker_item missing from both templates e640036 ✅ Column added; all 30 template-derived terms now link to issue #3707
hra-muscular-reports/ inside src/templates/ e640036 ✅ Moved to bulk_ntr_workflow/outputs/
UBERON:9900010 and UBERON:9900026 is_a too broad (UBERON:0001630) 6436580 ✅ Both re-parented to UBERON:9900055 (segmental back muscle)
UBERON:9900047 location too generic (abdominal wall) 8117acb ✅ New term UBERON:9900100 (posterior abdominal wall) created; location updated
Back-muscle groupings lacked subclass wiring 6436580 ✅ serratus dorsalis superior/inferior → 9900020; levator costarum → 9900055; trapezius/latissimus dorsi/levator scapulae → 9900063
UBERON:9900020/9900055/9900063 parented to collection-class UBERON:0004469 6436580 ✅ Re-parented to UBERON:0002324 (muscle of back), matching UBERON:0008242/0008243 convention

🟡 IMPORTANT (still unresolved — flagged in all prior reviews)

1. ASCTB-TEMP IRIs still in the def_xref column — asserted as definition sources

All 30 template-derived terms (25 leaf + 5 grouping) still carry https://purl.org/ccf/ASCTB-TEMP_<label> in the def_xref column (>A oboInOwl:hasDbXref SPLIT=|), which asserts them as sources for the definition annotation. These are ephemeral workflow-tracking IRIs, not stable literature citations.

For example, anterior cervical intertransversarii muscle (UBERON:9900001) has:

https://fipat.library.dal.ca/ta2/|ISBN:9780323393225|https://purl.org/ccf/ASCTB-TEMP_anterior-cervical-intertransversarii-muscle|PMID:7076562

By contrast, the three manually-curated back-muscle groupings in uberon-edit.obo correctly place the ASCTB-TEMP IRI in the xref: field, not as a definition source. The template rows should follow the same convention: remove the ASCTB-TEMP IRI from the def_xref column and, if retention is desired, place it in the general xref column instead.

Fix this →

2. UBERON:9900003 (articularis genu muscle) — is_a still too broad

Row 4 of hra-muscular-muscle.template.tsv still uses UBERON:0001630 (muscle organ) as the is_a. All other skeletal muscle leaf terms in the same template now use either a more specific parent (UBERON:0011906 for muscle heads, UBERON:0010990 for multifidus, UBERON:0001576 for tongue muscles, UBERON:9900055 for segmental back muscles) or UBERON:0014892 (skeletal muscle organ, vertebrate). Articularis genu is a skeletal muscle and should use UBERON:0014892 for consistency. The inconsistency means the reasoner will not classify it as a vertebrate skeletal muscle.

Fix this →


🔵 SUGGESTIONS

3. UBERON:9900100 (posterior abdominal wall) — no PMID citation

The new term's definition cites ISBN:9780323393225 and Wikipedia:Abdominal_wall but no PMID. This matches the pattern of the parallel anterior abdominal wall term (UBERON:0006635), so it is not a blocker, but a supporting PMID would strengthen the definition.

4. Iliacus (UBERON:0001369) wired to UBERON:9900100

Adding part_of UBERON:9900100 (posterior abdominal wall) to iliacus is defensible under Gray's classification, but iliacus is functionally and developmentally a pelvic-girdle muscle — its existing is_a UBERON:0001497 (muscle of pelvic girdle) already reflects this. This is a judgment call the curator has made; if acceptable, it may be worth noting in the iliacus comment field that the muscle is classified under both pelvic girdle and posterior abdominal wall.

5. ISBN:9780323393225 in def_xref is non-standard

ISBN references are not standard OBO/UBERON citation form. The TA2 URL (https://fipat.library.dal.ca/ta2/) already covers the Terminologia Anatomica source. The ISBN could be moved to a comment or dropped from def_xref.


What changed since the last review

Commit What it does Issues addressed
e640036 Fix part_of for 9900025, add term_tracker_item column, move reports out of templates ✅ Items 3, 4, 5 from 4th review
6436580 Re-parent groupings to UBERON:0002324; wire subclasses; fix 9900010 + 9900026 is_a ✅ Items 2 and 6 from 4th review
8117acb Add UBERON:9900100 (posterior abdominal wall); wire 4 muscles; update 9900047 EC ✅ Item 7 from 4th review

Per-term verdict (current state)

Groups template (5 remaining):

NTR Label Status
UBERON:9900013 external ear muscle ✅ Unique EC; sound
UBERON:9900036 middle ear muscle ✅ Unique EC; sound
UBERON:9900047 posterior abdominal wall muscle ✅ Now uses precise UBERON:9900100 location
UBERON:9900056 sole of foot muscle ✅ Unique EC; sound
UBERON:9900068 thoracic wall muscle ✅ Unique EC; sound

Manually-curated back groupings (uberon-edit.obo):

NTR Label Status
UBERON:9900020 intermediate back muscle ✅ is_a UBERON:0002324; subclass wiring correct
UBERON:9900055 segmental back muscle ✅ is_a UBERON:0002324; members wired
UBERON:9900063 superficial back muscle ✅ is_a UBERON:0002324; trapezius/latissimus/levator scapulae wired

Leaf template (25 terms) — remaining concern:

NTR Issue
UBERON:9900003 is_a UBERON:0001630 (muscle organ) — should be UBERON:0014892
All 25 terms ASCTB-TEMP IRIs in def_xref column

The two prior critical blockers are resolved, three previously-important issues are now fixed, and the PR is close to ready. Addressing the two remaining important items (ASCTB-TEMP def_xref semantics and the articularis genu is_a) would bring the templates fully in line with Uberon conventions.

Copy link
Copy Markdown

@ai4c-agent ai4c-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fifth review summary

Two important issues from previous reviews remain unresolved:

  1. ASCTB-TEMP IRIs still in the def_xref column — all 30 template-derived terms assert ephemeral workflow-tracking IRIs (https://purl.org/ccf/ASCTB-TEMP_...) as definition sources. The manually-curated back-muscle groupings in uberon-edit.obo correctly place these in the xref: field instead. The template rows should follow the same pattern.

  2. UBERON:9900003 (articularis genu muscle) — is_a UBERON:0001630 (muscle organ) instead of UBERON:0014892 (skeletal muscle organ, vertebrate). All other skeletal muscle leaf terms in the template now use UBERON:0014892 or a more specific parent; this one remains inconsistent.

Both blockers from the fourth review are resolved, and three previously-important items are now fixed (part_of for 9900025 ✅, term_tracker_item column ✅, reports moved out of src/templates ✅). The two back-muscle is_a problems (9900010, 9900026) are also fixed via re-parenting through UBERON:9900055, and the new UBERON:9900100 (posterior abdominal wall) provides a clean EC location for UBERON:9900047. Excellent progress — two small fixes to go.

dosumis and others added 3 commits May 18, 2026 11:22
…ange)

The 9900000-10000000 range is reserved for temporary IDs that are
reassigned on merge to master. It is only appropriate for terms added
directly to uberon-edit.obo, not for template-driven terms.

Remapped 30 template-row IDs from UBERON:99xxxxx to UBERON:1100001-1100030
(David Osumi-Sutherland range), preserving sort order:

  9900001->1100001  9900003->1100002  9900008->1100003  9900010->1100004
  9900013->1100005  9900015->1100006  9900018->1100007  9900019->1100008
  9900022->1100009  9900023->1100010  9900025->1100011  9900026->1100012
  9900030->1100013  9900031->1100014  9900034->1100015  9900035->1100016
  9900036->1100017  9900037->1100018  9900038->1100019  9900039->1100020
  9900047->1100021  9900049->1100022  9900050->1100023  9900056->1100024
  9900061->1100025  9900062->1100026  9900064->1100027  9900067->1100028
  9900068->1100029  9900074->1100030

The four UBERON:99xxxxx terms in uberon-edit.obo (9900020 intermediate
back muscle, 9900055 segmental back muscle, 9900063 superficial back
muscle, 9900100 posterior abdominal wall) stay in the temp range -
those are direct ontology terms and will be reassigned on merge per
the standard temp-ID protocol.

Files updated:
- src/templates/hra-muscular-muscle.template.tsv: 25 row IDs remapped
- src/templates/hra-muscular-groups.template.tsv: 5 row IDs remapped
- bulk_ntr_workflow/outputs/hra-muscular-reports/manual_curation.tsv
- bulk_ntr_workflow/outputs/hra-muscular-reports/review.tsv

Also regenerated src/ontology/components/hra_muscular.owl using the
full Makefile rule (template + annotate ontology-iri/version-iri/version
+ convert -f ofn). This fixes prior commits that had written the file
in RDF/XML with an empty <Ontology/> annotation block.

Refs #3707
Signed-off-by: @dragon-ai-agent

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… 'foaf:depiction'

The illegal-annotation-property-violation.sparql check was failing on
<http://purl.obolibrary.org/obo/foaf_depiction> — a malformed IRI produced
because uberon-edit.obo doesn't declare the foaf prefix in its header, so
robot interpreted 'foaf:depiction' as a CURIE resolving to obo:foaf_depiction.

uberon-edit.obo already declares a Typedef:

  [Typedef]
  id: depiction
  name: depiction
  xref: http://xmlns.com/foaf/0.1/depiction
  is_metadata_tag: true

so the established convention (1887 existing uses) is
'property_value: depiction "..." xsd:anyURI', which resolves correctly to
the real foaf:depiction IRI (allowlisted in the QC).

Rewrote the three back-muscle grouping stanzas (UBERON:9900020/9900055/9900063)
to use the 'depiction' shortcut instead of 'foaf:depiction'.

Refs #3707
Signed-off-by: @dragon-ai-agent

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… muscle organ

Two fixes:

1. Convert ASCTB-TEMP tracking IRIs to ccf:-prefixed CURIEs

   Previously stored as full URLs like
   https://purl.org/ccf/ASCTB-TEMP_articularis-genu-muscle in def_xrefs.
   Now stored as ccf:ASCTB-TEMP_articularis-genu-muscle.

   - uberon-edit.obo: added 'idspace: ccf https://purl.org/ccf/' header
     declaration and rewrote 3 xrefs in the back-muscle grouping terms
   - hra-muscular-muscle.template.tsv: rewrote 25 xrefs
   - hra-muscular-groups.template.tsv: rewrote 5 xrefs
   - hra-muscular-prefixes.owl: declared Prefix(ccf:=<https://purl.org/ccf/>)
   - src/ontology/uberon.Makefile: added --prefix "ccf: https://purl.org/ccf/"
     to the hra_muscular component template rule

2. UBERON:1100002 articularis genu muscle: re-parent from UBERON:0001630
   (muscle organ) to UBERON:0014892 (skeletal muscle organ, vertebrate),
   matching the genus used by other skeletal muscle terms in the template.

Component owl regenerated via the full template + annotate + convert pipeline.

Refs #3707
Signed-off-by: @dragon-ai-agent

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ai4c-agent
Copy link
Copy Markdown

ai4c-agent Bot commented May 18, 2026

Claude finished @dosumis's task in 6m 3s —— View job


PR Review: Add HRA Muscular NTR (Sixth review)

Review checklist:

  • Hierarchy and parents are consistent
  • Definitions and supporting references look adequate
  • Obsolete or replacement handling is safe
  • OBO and ODK conventions appear preserved — mostly (ASCTB-TEMP still in def_xref; dc-contributor missing on UBERON:9900100)
  • No obvious CI, auth, or workflow regression

Tasks:

  • Load context and begin review
  • Check most recent commits for fixes to prior issues
  • Check ASCTB-TEMP IRIs in def_xref columns
  • Verify articularis genu is_a parent
  • Check new term UBERON:9900100 metadata
  • Verify ID reassignment correctness
  • Post final review

Summary

Excellent progress in this sync — four open issues from the fifth review are now resolved. Two small issues remain before merge.


✅ Fixed since the fifth review

Issue Commit Status
UBERON:9900003 (articularis genu) is_a too broad de0719b ✅ Now is_a UBERON:0014892 (skeletal muscle organ, vertebrate)
ASCTB-TEMP full IRIs in def_xref de0719b ✅ Converted to ccf: CURIEs; idspace ccf declared in uberon-edit.obo header; back-muscle grouping xrefs correctly placed in xref: field
foaf:depiction QC violation in uberon-edit.obo back-muscle stanzas 58c9677 ✅ Rewrote to use established depiction OBO shortcut
Template IDs in 99xxxxx temp range 692925c ✅ Reassigned 30 template terms to UBERON:1100001–1100030 (David Osumi-Sutherland range); UBERON:1100000 pre-exists as "digestive tract junction", new IDs are immediately above it

🟡 IMPORTANT (still outstanding)

1. ASCTB-TEMP CURIEs still in the def_xref column — asserted as definition sources

Commit de0719b correctly moved the ASCTB-TEMP tokens to regular xref: lines in the three manually-curated uberon-edit.obo stanzas (UBERON:9900020/9900055/9900063). However, in both template TSV files all 30 template-derived terms still carry ccf:ASCTB-TEMP_<label> in the def_xref column (>A oboInOwl:hasDbXref SPLIT=|). The compiled hra_muscular.owl confirms they are annotation qualifiers on the definition (e.g. line 125 of the OWL file shows ccf:ASCTB-TEMP_anterior-cervical-intertransversarii-muscle appearing inside the qualifier block of the IAO:0000115 annotation assertion). They should be moved to the general xref column (A oboInOwl:hasDbXref SPLIT=|, column 18 in the muscle template and column 14 in the groups template).

Fix this →

2. UBERON:9900100 (posterior abdominal wall) — missing relationship: dc-contributor

Per CLAUDE.md, new manually-curated terms require relationship: dc-contributor https://orcid.org/<ORCID>. The three sibling grouping terms (UBERON:9900020, 9900055, 9900063) all have it. UBERON:9900100 has dcterms-date and term_tracker_item but not dc-contributor. Should add:

relationship: dc-contributor https://orcid.org/0000-0002-7073-9172 ! David Osumi-Sutherland

Fix this →


🔵 SUGGESTIONS

3. ISBN:9780323393225 in def_xref columns is non-standard for OBO/UBERON citation; the TA2 URL already covers the Terminologia Anatomica reference and the ISBN could be dropped or moved to a comment.

4. UBERON:9900100 definition cites only ISBN:9780323393225 and Wikipedia:Abdominal_wall; no PMID. A supporting PMID would strengthen the definition (not a blocker — this matches the pattern on UBERON:0006635 anterior abdominal wall).


Per-term verdict (current state)

Manually-curated terms (uberon-edit.obo):

NTR Label Status
UBERON:9900020 intermediate back muscle
UBERON:9900055 segmental back muscle
UBERON:9900063 superficial back muscle
UBERON:9900100 posterior abdominal wall 🟡 missing dc-contributor

Groups template (5 terms): ✅ Unique EC axioms, proper parents, good definitions.

Leaf template (25 terms): ✅ All is_a parents correct. ASCTB-TEMP in def_xref (shared with groups) is the only remaining issue.

The two prior critical blockers are resolved. All five previously-important issues except the ASCTB-TEMP placement and the new dc-contributor gap are fixed. Two small changes remain.

Copy link
Copy Markdown

@ai4c-agent ai4c-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sixth review summary

Review checklist:

  • Hierarchy and parents are consistent
  • Definitions and supporting references look adequate
  • Obsolete or replacement handling is safe
  • OBO and ODK conventions appear preserved — mostly (ASCTB-TEMP still in def_xref; dc-contributor missing on UBERON:9900100)
  • No obvious CI, auth, or workflow regression

✅ Fixed since the fifth review

Four issues resolved in commits de0719b, 58c9677, and 692925c:

Issue Commit Status
UBERON:9900003 (articularis genu) — is_a too broad de0719b ✅ Now is_a UBERON:0014892 (skeletal muscle organ, vertebrate)
ASCTB-TEMP full IRIs in def_xref de0719b ✅ Converted to ccf: CURIEs; idspace ccf declared in uberon-edit.obo header; back-muscle grouping xrefs corrected
foaf:depiction in uberon-edit.obo back-muscle stanzas 58c9677 ✅ Rewrote to use established 'depiction' OBO shortcut
Template IDs in 99xxxxx temp range 692925c ✅ Reassigned 30 template terms to UBERON:1100001-1100030 (David Osumi-Sutherland range); UBERON:1100000 (digestive tract junction) already existed immediately below

🟡 IMPORTANT (still outstanding)

1. ASCTB-TEMP CURIEs still in the def_xref column — asserted as definition sources

The de0719b fix converted the ASCTB-TEMP tokens from full IRIs to ccf: CURIEs and correctly placed them in the xref: field of the three manually-curated uberon-edit.obo stanzas. However, in both template files all 30 template-derived terms still carry ccf:ASCTB-TEMP_ in the def_xref column (>A oboInOwl:hasDbXref SPLIT=|). This asserts the ASCTB-TEMP CURIEs as annotations on the definition annotation — i.e., as sources for the definition text — which is semantically incorrect for workflow-tracking identifiers. They should be moved to the general xref column (A oboInOwl:hasDbXref SPLIT=|, column 18 in the muscle template) instead.

Confirmed in hra_muscular.owl (e.g. line 125):

The ccf:ASCTB-TEMP token appears inside the annotation qualifiers on the definition — not as a standalone class xref.

Fix this →

2. UBERON:9900100 (posterior abdominal wall) — missing dc-contributor

Per CLAUDE.md, new manually-curated terms require:

The other three manually-curated back-muscle grouping terms (UBERON:9900020, 9900055, 9900063) all have this. UBERON:9900100 has dcterms-date and term_tracker_item but not dc-contributor. Given the pattern on all other new terms in this PR, it should be:

Fix this →


🔵 SUGGESTIONS

3. ISBN:9780323393225 in def_xref columns is non-standard for OBO/UBERON citation; the TA2 URL already covers the Terminologia Anatomica reference and the ISBN could be dropped or moved to a comment.

4. UBERON:9900100 has no PMID — only ISBN and Wikipedia. This matches the pattern on UBERON:0006635 (anterior abdominal wall) so it is not a blocker, but a supporting PMID would strengthen the definition.


Per-term verdict (current state)

Manually-curated back groupings and posterior abdominal wall (uberon-edit.obo):

NTR Label Status
UBERON:9900020 intermediate back muscle
UBERON:9900055 segmental back muscle
UBERON:9900063 superficial back muscle
UBERON:9900100 posterior abdominal wall 🟡 missing dc-contributor

Groups template (5 terms, UBERON:1100005/1100017/1100021/1100024/1100029): ✅ Unique EC axioms, proper parents, good definitions.

Leaf template (25 terms, UBERON:1100001-1100030 subset): Definition quality remains high with good PMID support. All previous is_a issues resolved. Only residual issue: ASCTB-TEMP in def_xref (all 30 template terms).

The PR is very close to ready. Two small fixes remain.

Copy link
Copy Markdown

@ai4c-agent ai4c-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sixth review summary

Review checklist:

  • Hierarchy and parents are consistent
  • Definitions and supporting references look adequate
  • Obsolete or replacement handling is safe
  • OBO and ODK conventions appear preserved — mostly (ASCTB-TEMP still in def_xref; dc-contributor missing on UBERON:9900100)
  • No obvious CI, auth, or workflow regression

Fixed since the fifth review

Four issues resolved in commits de0719b, 58c9677, and 692925c:

Issue Commit Status
UBERON:9900003 (articularis genu) is_a too broad de0719b Fixed — now is_a UBERON:0014892 (skeletal muscle organ, vertebrate)
ASCTB-TEMP full IRIs in def_xref de0719b Converted to ccf: CURIEs; idspace ccf declared in uberon-edit.obo; back-muscle grouping xrefs corrected
foaf:depiction in uberon-edit.obo back-muscle stanzas 58c9677 Rewrote to use established 'depiction' OBO shortcut
Template IDs in 99xxxxx temp range 692925c Reassigned 30 template terms to UBERON:1100001-1100030

IMPORTANT (still outstanding)

1. ASCTB-TEMP CURIEs still in the def_xref column

The de0719b fix correctly placed ASCTB-TEMP in the xref: field of the three manually-curated uberon-edit.obo stanzas. However, in both template files all 30 template-derived terms still carry ccf:ASCTB-TEMP_ in the def_xref column (>A oboInOwl:hasDbXref SPLIT=|), asserting them as annotation qualifiers on the definition — i.e., sources of the definition text. They should be in the general xref column (A oboInOwl:hasDbXref SPLIT=|, column 18 in the muscle template) instead. Confirmed in hra_muscular.owl line 125 where ccf:ASCTB-TEMP_anterior-cervical... appears inside the definition's annotation qualifiers.

2. UBERON:9900100 (posterior abdominal wall) missing dc-contributor

Per CLAUDE.md, new manually-curated terms require a dc-contributor relationship. UBERON:9900020, 9900055, and 9900063 all have it. UBERON:9900100 has dcterms-date and term_tracker_item but not dc-contributor. Should add: relationship: dc-contributor https://orcid.org/0000-0002-7073-9172 ! David Osumi-Sutherland


Suggestions

  • ISBN:9780323393225 in def_xref is non-standard for OBO/UBERON; the TA2 URL already covers the Terminologia Anatomica reference.
  • UBERON:9900100 has no PMID (only ISBN and Wikipedia); a supporting PMID would strengthen the definition.

The PR is very close to ready — two small fixes remain.

Reasoning the merged ontology produced 8 unsatisfiable classes — all
deep back muscles in hra-muscular-muscle.template.tsv:

  UBERON:1100001 anterior cervical intertransversarii muscle
  UBERON:1100010 intertransversarii laterales lumborum muscle
  UBERON:1100015 medial lumbar intertransversarii muscle
  UBERON:1100016 medial posterior cervical intertransversarii muscle
  UBERON:1100018 multifidus cervicis muscle
  UBERON:1100019 multifidus lumborum muscle
  UBERON:1100020 multifidus thoracis muscle
  UBERON:1100028 thoracic intertransversarii muscle

robot explain identified the same clash for each: each was asserted
SubClassOf `part of some <cervical/thoracic/lumbar region of vertebral
column>` (UBERON:0006072/3/4). Those terms propagate part_of into
`postcranial axial skeleton` -> `subdivision of skeleton` -> `skeleton`.
The genus path (skeletal muscle organ, vertebrate) propagates the
muscle into `part of some musculature of body`. UBERON ships a
disjointness:

  part_of some musculature_of_body  DisjointWith  part_of some skeleton

…hence unsat. A muscle attaches to the spine, but is not part of it.

Fix — match the convention used by `axial muscle` (UBERON:0003897),
which uses `attaches_to_part_of` (RO:0002177) for the skeletal target
and reserves `part_of` for a body region:

- Added an `attaches_to_part_of` column to hra-muscular-muscle.template.tsv
  (header `SC RO:0002177 some %`, inserted after `part_of`).
- For the 8 affected rows: moved the spine-region UBERON ID from
  `part_of` to `attaches_to_part_of`, and set `part_of` to
  UBERON:0001137 `dorsum` (the canonical body region for back
  muscles — same filler used by the EC of UBERON:0002324 `muscle of
  back`, the inherited grouping for these terms).
- Rebuilt components/hra_muscular.owl via the make rule.

Verified end-to-end with the failing pipeline:
  robot ... expand --no-expand-term RO_0002175 -o tmp/uberon-edit.owl
  robot ... merge ... bridge/uberon-bridge-to-bfo.owl relax reason -r elk
…now completes with 0 unsatisfiable classes.

The cervical/thoracic/lumbar spinal-level information is preserved
(now in `attaches_to_part_of`), and the muscles are still grouped under
`muscle of back` via genus inheritance.

Signed-off-by: @dragon-ai-agent
@obophenotype obophenotype deleted a comment from ai4c-agent Bot May 18, 2026
The previous commit added an attaches_to_part_of (RO:0002177) column to
hra-muscular-muscle.template.tsv but did not declare RO:0002177 in
templates/hra-muscular-prefixes.owl. robot template auto-typed the
unknown CURIE as a DataProperty, emitting 8 bogus axioms like:

  Declaration(DataProperty(RO_0002177))
  Declaration(Datatype(UBERON_0006072))
  Declaration(Datatype(UBERON_0006073))
  Declaration(Datatype(UBERON_0006074))
  SubClassOf(UBERON_1100018 DataSomeValuesFrom(RO_0002177 UBERON_0006072))

…which then made the merged ontology blow up in the release pipeline:

  Cannot pun between properties: <RO_0002177>
  Datatype IRI also used as Class IRI: <UBERON_0006072>
  Datatype IRI also used as Class IRI: <UBERON_0006073>

Fix: add `Declaration(ObjectProperty(<RO_0002177>))` to
hra-muscular-prefixes.owl. The rebuilt component now contains the
correct `ObjectSomeValuesFrom(RO_0002177 ...)` axioms, with the
cervical/thoracic/lumbar region of vertebral column IRIs treated as
Classes (not Datatypes).

Verified:
- reason_test (ELK, --equivalent-classes-allowed asserted-only,
  --exclude-tautologies structural): PASS, 0 unsatisfiable classes.
- sparql_test (9 violation queries): all PASS, 0 violations.

This is the same trap the hra_skeleton template avoids by declaring
its object/annotation properties up front in
hra-skeleton-prefixes.owl. Both prefix stubs now follow the same
pattern.

Signed-off-by: @dragon-ai-agent
@ai4c-agent
Copy link
Copy Markdown

ai4c-agent Bot commented May 18, 2026

Claude finished @dosumis's task in 3m 58s —— View job


PR Review: Add HRA Muscular NTR (Seventh review)

Review checklist:

  • Hierarchy and parents are consistent
  • Definitions and supporting references look adequate
  • Obsolete or replacement handling is safe
  • OBO and ODK conventions appear preserved — mostly (ASCTB-TEMP CURIEs still in def_xref column)
  • No obvious CI, auth, or workflow regression

Tasks:

  • Load context and begin review
  • Check most recent commits for fixes to prior issues
  • Inspect ASCTB-TEMP CURIEs in def_xref columns
  • Check UBERON:9900100 for dc-contributor
  • Post final review

Summary

Two new commits since the sixth review address a critical reasoning problem that was blocking the release pipeline. One issue from the sixth review was a false alarm. One important convention issue remains.


✅ Fixed since the sixth review

Issue Commit Status
8 unsatisfiable classes: back muscles asserted part_of spine-region terms d5f52d5 ✅ Added attaches_to_part_of column; moved 8 spine-region IDs from part_of to attaches_to_part_of (RO:0002177); part_of now correctly points to UBERON:0001137 (dorsum)
RO:0002177 auto-typed as DataProperty by ROBOT 2007e30 Declaration(ObjectProperty(RO:0002177)) added to hra-muscular-prefixes.owl; resolved punning errors and Datatype IRI misclassification in the merged ontology

The reasoning fix (d5f52d5) deserves emphasis: asserting part_of UBERON:006072/3/4 (vertebral column regions) on skeletal muscles triggered the UBERON-wide disjointness part_of musculature_of_body DisjointWith part_of skeleton, making all 8 affected terms unsatisfiable. Using attaches_to_part_of (matching the axial muscle convention at UBERON:0003897) correctly preserves the spinal-level anatomical information without asserting the muscles are skeletal parts.

Sixth review issue #2 (UBERON:9900100 dc-contributor) was a false alarm. The current stanza shows relationship: dc-contributor https://orcid.org/0000-0002-7073-9172 ! David Osumi-Sutherland — this was present in the original 8117acb commit. Both new commits do not touch uberon-edit.obo at all; the sixth review agent incorrectly reported this as missing. ✅


🟡 IMPORTANT (still unresolved — flagged in all six prior reviews)

1. ASCTB-TEMP CURIEs still in the def_xref column — asserted as definition sources

Both template files still carry ccf:ASCTB-TEMP_<label> in the def_xref column (>A oboInOwl:hasDbXref SPLIT=|). In ROBOT template syntax, >A places values as annotation qualifiers on the preceding annotation — meaning these CURIEs become oboInOwl:hasDbXref annotations on the IAO:0000115 (definition) annotation assertion itself. This asserts them as sources for the definition text, which is semantically wrong for workflow-tracking identifiers.

The fix: remove the ccf:ASCTB-TEMP_... tokens from the def_xref column in every data row, and if retention is desired, add them to the plain xref column instead (A oboInOwl:hasDbXref SPLIT=|, column 18 in the muscle template, column 14 in the groups template).

The three manually-curated uberon-edit.obo stanzas (UBERON:9900020/9900055/9900063) correctly place the ASCTB-TEMP CURIEs in the xref: field. The template rows should follow that same pattern.

Fix this →


🔵 SUGGESTIONS (carried from prior reviews)

  • ISBN:9780323393225 in def_xref columns is non-standard for OBO/UBERON; the TA2 URL already covers the Terminologia Anatomica reference and the ISBN could be dropped or moved to a comment.
  • UBERON:9900100 definition cites only ISBN:9780323393225 and Wikipedia:Abdominal_wall; no PMID. Not a blocker but a supporting PMID would strengthen the definition.

What changed since the last review

Commit What it does Issues addressed
d5f52d5 Add attaches_to_part_of column; fix 8 unsat back muscles ✅ NEW: Critical reasoning fix
2007e30 Declare RO:0002177 as ObjectProperty in prefixes stub ✅ NEW: Fixes ROBOT DataProperty auto-typing / punning

Per-term verdict (current state)

Manually-curated terms (uberon-edit.obo): All four (UBERON:9900020, 9900055, 9900063, 9900100) ✅ — correct is_a, dc-contributor, term_tracker_item, ASCTB-TEMP in xref: field (not def xrefs).

Groups template (5 terms, UBERON:1100005/1100017/1100021/1100024/1100029): ✅ Unique EC axioms, proper parents, good definitions. Only shared issue is ASCTB-TEMP in def_xref.

Leaf template (25 terms, UBERON:1100001–1100030 subset): ✅ All is_a parents correct; attaches_to_part_of correctly handles spinal attachment for 8 back muscles; part_of now points to body regions (not skeletal parts). Only remaining issue: ASCTB-TEMP in def_xref column.

One small fix remains.

Copy link
Copy Markdown

@ai4c-agent ai4c-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seventh review summary

Two new commits since the sixth review fix a critical reasoning problem and a ROBOT property-typing issue — both important build correctness fixes:

  • d5f52d5: 8 unsatisfiable classes resolved by adding attaches_to_part_of (RO:0002177) column and moving spine-region IDs out of part_of — follows the axial muscle (UBERON:0003897) convention correctly.
  • 2007e30: RO:0002177 declared as ObjectProperty in hra-muscular-prefixes.owl, preventing ROBOT from auto-typing it as DataProperty (which caused punning errors in the merged ontology).

The sixth review's issue #2 (UBERON:9900100 missing dc-contributor) was a false alarm — the stanza has had dc-contributor since commit 8117acb.

One important issue remains (flagged in all six prior reviews, still unresolved):

The def_xref column (>A oboInOwl:hasDbXref SPLIT=|) in both template TSV files still contains ccf:ASCTB-TEMP_<label> CURIEs alongside real definition citations. In ROBOT template syntax, >A places values as annotation qualifiers on the definition annotation itself, asserting these ephemeral workflow-tracking IRIs as sources for the definition text. They should be removed from def_xref and placed in the plain xref column (A oboInOwl:hasDbXref SPLIT=|, column 18 in the muscle template, column 14 in the groups template), consistent with how the three manually-curated back-muscle stanzas handle them in uberon-edit.obo.

@ai4c-agent
Copy link
Copy Markdown

ai4c-agent Bot commented May 20, 2026

Claude finished @dosumis's task in 7m 50s —— View job


PR Review: Add HRA Muscular NTR (Eighth review)

Review checklist:

  • Hierarchy and parents are consistent
  • Definitions and supporting references look adequate
  • Obsolete or replacement handling is safe
  • OBO and ODK conventions appear preserved — one remaining fix needed (ASCTB-TEMP in def_xref — changes prepared below but push failed due to token permissions)
  • No obvious CI, auth, or workflow regression

Tasks:

  • Load context and begin review
  • Read template files to verify current ASCTB-TEMP placement
  • Prepare fix: remove ccf:ASCTB-TEMP_ tokens from def_xref column in both templates, move to xref column
  • Prepare fix: update hra_muscular.owl (remove ASCTB-TEMP from IAO:0000115 annotation qualifiers; add as standalone hasDbXref assertions)
  • Commit ready locally (SHA: 4041700509b56b562c62b8978b566d0308cdd882)
  • Push blocked — claude[bot] token has read-only access to this repo

Summary

This review addresses the one remaining issue flagged in all seven prior reviews: ccf:ASCTB-TEMP_ CURIEs used as definition sources instead of plain xrefs.

I prepared the fix and committed it locally, but could not push because the claude[bot] GitHub token only has read permissions for this repository.


Changes prepared (commit 4041700)

What the fix does in both template TSV files:

  • In the def_xref column (>A oboInOwl:hasDbXref SPLIT=|): removes every ccf:ASCTB-TEMP_* token from the |-separated list
  • In the xref column (A oboInOwl:hasDbXref SPLIT=|): adds the same ccf:ASCTB-TEMP_* token

Example for anterior cervical intertransversarii muscle:

BEFORE def_xref: https://fipat.library.dal.ca/ta2/|ISBN:9780323393225|ccf:ASCTB-TEMP_anterior-cervical-intertransversarii-muscle|PMID:7076562
        xref:    Wikipedia:Intertransversarii

AFTER  def_xref: https://fipat.library.dal.ca/ta2/|ISBN:9780323393225|PMID:7076562
        xref:    ccf:ASCTB-TEMP_anterior-cervical-intertransversarii-muscle|Wikipedia:Intertransversarii

In hra_muscular.owl: The Annotation(<oboInOwl:hasDbXref> "ccf:ASCTB-TEMP_...") inner annotation was removed from the AnnotationAssertion(... <IAO:0000115> ...) definition assertion, and a standalone AnnotationAssertion(<oboInOwl:hasDbXref> <UBERON_...> "ccf:ASCTB-TEMP_...") line was added for each of the 30 terms.

Files changed: src/templates/hra-muscular-muscle.template.tsv, src/templates/hra-muscular-groups.template.tsv, src/ontology/components/hra_muscular.owl


To apply this fix

Run this script from the repo root:

import re

def fix_template(filepath, def_xref_col, xref_col):
    with open(filepath, 'r') as f:
        lines = f.read().split('\n')
    result = []
    for i, line in enumerate(lines):
        if i < 2 or not line.strip():
            result.append(line); continue
        fields = line.split('\t')
        def_xrefs = fields[def_xref_col].split('|') if fields[def_xref_col] else []
        asctb = [x for x in def_xrefs if x.startswith('ccf:ASCTB-TEMP_')]
        real  = [x for x in def_xrefs if not x.startswith('ccf:ASCTB-TEMP_')]
        if asctb:
            fields[def_xref_col] = '|'.join(real)
            exist = [x for x in fields[xref_col].split('|') if x]
            fields[xref_col] = '|'.join(asctb + exist)
        result.append('\t'.join(fields))
    with open(filepath, 'w') as f:
        f.write('\n'.join(result))

fix_template('src/templates/hra-muscular-muscle.template.tsv', 3, 17)
fix_template('src/templates/hra-muscular-groups.template.tsv', 3, 12)

Then regenerate the component with make -C src/ontology components/hra_muscular.owl -B.


All prior issues resolved

Issue Status
Templates not registered in ODK/Makefile ✅ Fixed in 3f73ed6
EC axiom collision (3 back groupings) ✅ Fixed in c21556f
UBERON:9900008 missing is_a ✅ Fixed
UBERON:9900003 articularis genu is_a too broad ✅ Fixed in de0719b
UBERON:9900010/9900026 is_a too broad ✅ Fixed in 6436580
UBERON:9900025 part_of column blank ✅ Fixed in e640036
term_tracker_item missing from templates ✅ Fixed in e640036
hra-muscular-reports/ under src/templates/ ✅ Fixed in e640036
8 unsatisfiable classes (part_of spine region) ✅ Fixed in d5f52d5
RO:0002177 typed as DataProperty ✅ Fixed in 2007e30
ASCTB-TEMP CURIEs as definition sources 🟡 Script above; commit 4041700 prepared but push blocked

Once this last fix is applied and CI passes, this PR is ready to merge.

@dosumis
Copy link
Copy Markdown
Contributor Author

dosumis commented May 20, 2026

#gogoeditdiff

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.

Process batch of muscle term requests from HubMap/HRA

1 participant