Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .claude/skills/gap-issue-filing/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@ how many logged gaps still lack a tracking issue.

- `reports/gaps.tsv` — the source rows. Columns: `soulcap_abbreviation`,
`soulcap_full_name`, `gap_type`, `description`, `related_cl_ids`,
`evidence`, `status` (`open` / `filed_as_issue`), `repo_issue`,
`date_logged`.
`evidence`, `status` (`open` / `filed_as_issue` / `draft_for_review` /
`on_hold`), `repo_issue`, `date_logged`. `draft_for_review` rows are CL
issue drafts waiting for Alex (and sometimes Dr. Diehl) to approve them;
change them to `open` only after that approval. `on_hold` rows wait on an
open question named in their description. Never file either directly.
`withdrawn` (the proposal was dropped) and `not_a_cl_issue` (the problem
turned out not to be in CL) are closed: never file them.
- `.github/ISSUE_TEMPLATE/mapping_gap.yml` — the template whose fields map
directly onto `gaps.tsv` columns: `soulcap_abbreviation` → title, `gap_type`
→ the dropdown, `description` + `related_cl_ids` + `evidence` → the
Expand All @@ -38,7 +43,7 @@ how many logged gaps still lack a tracking issue.
## Step 1 — find what's actually unfiled

Read `reports/gaps.tsv` and list every row where `status` is `open` (not
`filed_as_issue`). Note two rows sharing a `soulcap_abbreviation` group (e.g.
`filed_as_issue`, `draft_for_review`, `on_hold`, `withdrawn` or `not_a_cl_issue`). Note two rows sharing a `soulcap_abbreviation` group (e.g.
`NK1 / NK3`) file as **one** issue, matching how the row itself is structured
— don't split a single row into multiple issues.

Expand Down
20 changes: 16 additions & 4 deletions .claude/skills/mapping-audit/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,22 @@ is to question it, not just print it — for each row, ask:
fixes changes the term's markers/definition/label out from under a mapping
made before the fix landed.
3. **Does literature actually back a species-specific claim the mapping
relies on?** Cross-check against `reports/pro_marker_species_support.tsv`
— if a mapping leans on a marker that TSV records as
`insufficient_evidence` or a different species than SOULCAP's row assumes,
that's a real finding, not noise.
relies on?** Cross-check against `reports/pro_marker_species_support.tsv`,
using `human_status` (SOULCAP rows are human). The four values mean
different things, so report them separately and never merge them:
- `contradicted`: a real finding. Evidence goes against the CL assertion
(`soulcap-audit` raises `species_marker_contradicted`).
- `no_evidence_found`: searched, nothing found. Note it as an evidence gap,
**not** a contradiction.
- `not_applicable`: the species question doesn't apply (term or protein
limited to the other species, or a human-only marker such as HLA-DRA or
NCAM1/CD56 on the mouse side). **Never a failure.**
- blank / `not_assessed`: not checked yet; say so.

Use `pro_species_support.species_status(row, "human")` to read a row: it
fills a blank with `not_applicable` when a rule applies and never
overrides a recorded value. The legacy `species_support` column
(`insufficient_evidence` etc.) is superseded by these columns.
4. **Was it marked `uncertain` for a reason that's since been resolved (or
gotten worse)?** Re-read the `note` field and check whether the ambiguity
it describes is still accurate.
Expand Down
44 changes: 40 additions & 4 deletions .claude/skills/pro-marker-species-support/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,16 @@ own discipline here.

`reports/pro_marker_species_support.tsv` has one row per directly asserted
(CL term, PRO marker) pair for every CL term in
`mappings/curated_mappings.tsv` (87 pairs as of 2026-09-28). The question is
`mappings/curated_mappings.tsv` (87 pairs as of 2026-09-28), plus every term
under group 1 ILC (`CL:0001067`, NK cells included) from the October 2026 NK
audit (`audit_batch = nk_2026-10`; see `reports/nk_marker_audit_2026-10.md`).
Extra terms can be added the same way: scope them from Ubergraph and pull
their labels from `cl_pro_relationships.tsv`. The question is
Dr. Diehl's: **is each marker, as CL asserts it, valid in human, mouse, or
both?**

**Never edit the first 10 (legacy) columns** of an existing row. They record
the original human-only check from issue #11. All new work goes in the 7
the original human-only check from issue #11. All new work goes in the
columns after them. **Where the new columns disagree with the legacy
`species_support` value, the new columns take precedence** (e.g. plasmablast
"lacks CD138", where the legacy value still says `human`).
Expand All @@ -134,11 +138,43 @@ columns after them. **Where the new columns disagree with the legacy
|---|---|
| `cl_id`, `cl_label`, `pr_id`, `pr_label`, `cd_synonym` | From `cl_pro_relationships.tsv` — pull them programmatically, don't retype them. |
| `species_support`, `evidence_source`, `citation`, `quote`, `source_ref` | **Legacy** (issue #11 human-only check). Read-only. |
| `species_scope` | `human`, `mouse`, `both` or `unresolved` (blank = not yet assessed). |
| `human_citation`, `human_quote` | Citation (author, year, PMID, PMCID) and an exact quote for the human side. |
| `species_scope` | `human`, `mouse`, `both` or `unresolved` (blank = not yet assessed). Derived from the two status columns. |
| `human_status`, `mouse_status` | One value per species, from the controlled list below. |
| `human_citation`, `human_quote` | Citation (author, year, PMID, PMCID) and an exact quote: the evidence behind `human_status`. For `contradicted`, this is the contradicting quote. |
| `mouse_citation`, `mouse_quote` | The same for mouse. |
| `counter_citation`, `counter_quote` | For a `contradicted` verdict, the strongest quote on the other side (supporting the assertion), so both sides are recorded. Blank if none was found. |
| `note` | Free text explaining the verdict, e.g. "not tested in mouse, no reagent", "ortholog exists but not expressed", "contradicted in mouse", or "species from PRO label". |
| `checked_on` | Date the row was last assessed. |
| `audit_batch` | Which audit last set the row, e.g. `nk_2026-10`. Blank for earlier rows. |

Status values for `human_status` / `mouse_status` (Dr. Diehl, 2026-10-05).
Keep these four apart; they mean different things:

| Value | Meaning |
|---|---|
| `supported` | An exact quote supports the assertion as CL states it. |
| `contradicted` | An exact quote goes against it. Put any supporting quote in `counter_*`. |
| `no_evidence_found` | Searched, found nothing. **Not** a contradiction. Say in `note` what was searched. |
| `not_applicable` | The species question doesn't apply: the CL term is limited to the other species (", human" / ", mouse"), the PRO term is the other species' protein, or the marker is human-only. Human-only markers so far: HLA-DRA (mouse ortholog H2-Ea is a different protein) and NCAM1/CD56 for NK cells. |
| *(blank)* | Not assessed. |

The same vocabulary is in code: `pro_species_support.SPECIES_STATUSES`,
`HUMAN_ONLY_MARKERS`, `not_applicable_reason()`, `species_status()` and
`species_scope()`. `soulcap-audit` uses them. It reports `contradicted` rows
as findings and counts every status per species in `audit_summary.md`. Add
a new human-only marker to `HUMAN_ONLY_MARKERS` (with a test), not only to a
note. `tests/test_pro_species_support.py` checks that every recorded value is
in the vocabulary, that `supported`/`contradicted` have a quote, and that a
species which can't apply is never marked anything but `not_applicable`.

Derive `species_scope` from them: `both` if both are `supported`; `human`
if human is `supported` and mouse is `not_applicable` or `contradicted`
(likewise `mouse`); otherwise `unresolved`.

Lineage-negative markers (lacks CD3/CD19/CD20/CD14 on non-T, non-B,
non-myeloid cells) are generally safe across species (Dr. Diehl), but still
look for mouse evidence and record `no_evidence_found` if there is none. Never
mark them `supported` on expert opinion alone; put the opinion in `note`.

Rules for `species_scope`:

Expand Down
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# The benchmark reserve test hashes these files; keep LF on every OS.
mappings/*.tsv text eol=lf
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ htmlcov/
*.swp
.idea/
.vscode/

# Library copies of paywalled papers, for local quote checks only (never commit)
literature/paywalled/
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ AST in `marker_syntax.py`, compiled/evaluated by `phenotype.py`.
| `pyproject.toml` | Project metadata, deps, and the CLI entry points. |
| `.mcp.json` | MCP servers available in this project (see below). |
| `.env` | `ASTA_API_KEY=...` (gitignored; required for the Asta MCP server). |
| `.gitattributes` | Forces LF line endings on `mappings/*.tsv`, whose hashes `tests/test_benchmark_reserve.py` checks (Windows `core.autocrlf` would otherwise break it). |

When you create a new artifact, put it in the established location and link it
from here and the README so locations stay consistent. Do not scatter
Expand Down
46 changes: 45 additions & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,18 @@ Mgr` tab are covered — B cell, DC, ILC, iNKT, NK cell, T cell, gdT, MAIT
category, not a cell type). Still missing: monocyte, neutrophil, basophil,
mast cell, granulocyte, MDSC.

**Human/mouse marker validity (Dr. Diehl, 2026-09-28 and 2026-10-05):**
[reports/pro_marker_species_support.tsv](reports/pro_marker_species_support.tsv)
records, per CL marker assertion, a `human_status` and `mouse_status`. The
values are `supported` / `contradicted` / `no_evidence_found` /
`not_applicable`, each verdict backed by a quote checked against the paper.
- **Done (2026-10-05):** every marker on the group 1 ILC / NK subtree
(66 pairs on 28 terms) and on plasmablast (4 pairs). See
[nk_marker_audit_2026-10.md](reports/nk_marker_audit_2026-10.md) and
[plasmablast_marker_audit_2026-10.md](reports/plasmablast_marker_audit_2026-10.md).
- **Remaining:** the other pairs on mapped CL terms (blank status =
not assessed).

---

## Milestone 3 — Audit curated CL mappings ⛔ (blocked)
Expand All @@ -163,6 +175,14 @@ against current CL marker axioms and literature, catching drift — without
needing the sheet columns. It cannot capture curator *intent*, so this
milestone stays ⛔ for the full deliverable until the sheet changes.

**Update (2026-10-05):** `soulcap-audit` now keeps `contradicted`,
`no_evidence_found` and `not_applicable` species statuses apart. Only
`contradicted` raises a finding, and human-only markers on the mouse side are
`not_applicable`, not failures. The mapping-audit skill uses the same
vocabulary. 6 contradicted marker assertions are currently in the review
queue ([audit_summary.md](reports/audit_summary.md)). This is still the
evidence half of M3; the blocker above is unchanged.

---

## Milestone 4 — Candidate improved CL mappings 🟡 (80/127 entities with proposals)
Expand All @@ -189,6 +209,14 @@ proposal. The SSSOM export is generated from this registry. All proposals are
`needs_review`, not confirmed equivalences. The gap log includes family-level
entries and is not a one-to-one accounting of the 47 entities without proposals.

**CL structure proposal (2026-10-05, design only):**
[docs/group1_ilc_species_hierarchy_proposal.md](docs/group1_ilc_species_hierarchy_proposal.md)
proposes a parallel human/mouse hierarchy under group 1 ILC → NK.
- 6 new grouping terms, plus 2 recommended (uterine NK, human; group 1 ILC,
human = #14) and 1 optional.
- Awaiting Dr. Diehl's decisions ([docs/diehl_review_2026-10.md](docs/diehl_review_2026-10.md)).
No CL edits are made here; approved changes go to David's team as issues.

---

## CL term corrections
Expand All @@ -201,7 +229,15 @@ upstream to `obophenotype/cell-ontology`.
| Issue | Terms | Status |
|-------|-------|--------|
| [#13 NKT cell naming](https://github.com/Cellular-Semantics/SOULCAP_CL_Mapping/issues/13) | CL:4052055 → "CD56-positive T cell, human"; CL:0000814 → "iNKT cell" | Filed upstream: [CL#3663](https://github.com/obophenotype/cell-ontology/issues/3663), [CL#3664](https://github.com/obophenotype/cell-ontology/issues/3664) |
| [#14 Missing human-specific ILC1 term](https://github.com/Cellular-Semantics/SOULCAP_CL_Mapping/issues/14) | CL:0001067 "group 1 innate lymphoid cell" — no `, human` variant, unlike group 2 (CL:0001081) and group 3 (CL:0001078) | Open — not yet filed upstream |
| [#14 Missing human-specific ILC1 term](https://github.com/Cellular-Semantics/SOULCAP_CL_Mapping/issues/14) | CL:0001067 "group 1 innate lymphoid cell" — no `, human` variant, unlike group 2 (CL:0001081) and group 3 (CL:0001078) | Open — not yet filed upstream. Recommended as NEW:8 in the group 1 ILC hierarchy proposal |
| B1 "lacks HLA-DRA" on CD56-bright/dim NK (draft) | CL:0000938, CL:0000939 | Draft in [reports/gaps.tsv](reports/gaps.tsv), awaiting Dr. Diehl ([review](docs/diehl_review_2026-10.md)) |
| B3a plasmablast "lacks CD138" (draft) | CL:0000980 | Draft, awaiting Dr. Diehl |
| B3b plasmablast markers to a species child (draft) | CL:0000980 | Draft, awaiting Dr. Diehl (human vs mammal-level child) |
| B6a–d smaller fixes (drafts) | CL:0002345 (DX5+); CL:0002348/0002349 (wrong PMID); CL:0002439–0002448 ("T cell" wording); CL:0002343 (galectin-1 relation) | Drafts, awaiting Dr. Diehl |
| C1 liver-resident NK human sentences to a human child (draft) | CL:4047101 | Draft, awaiting Dr. Diehl |
| Pre-NK markers (on hold) | CL:0000937 | On hold pending Dr. Diehl |
| Protégé NCAM1 query returns too few classes | — | Not filed; repro note in [docs/protege_ncam1_query_repro.md](docs/protege_ncam1_query_repro.md) for Dr. Diehl to reproduce |
| ~~Add CD56 to generic NK~~ | CL:0000623 | Withdrawn 2026-10-05 (generic NK keeps only lack statements) |

---

Expand All @@ -214,6 +250,14 @@ upstream to `obophenotype/cell-ontology`.
- **Data hygiene.** The errors in `reports/marker_string_issues.md` (spaced
marker names, unbalanced brackets, etc.) should be fixed in the Google Sheet
before relying on automated parsing for M1/M3/M4.
- **Matcher evaluation fingerprints break on Windows checkouts** (noted
2026-10-05, not fixed yet). `soulcap-evaluate` fingerprints source files by
hashing their raw bytes (`evaluation.py`). With `core.autocrlf=true`, a
Windows checkout has CRLF line endings, so the hashes differ from a Linux
run and the dashboard shows the evaluation as `stale_or_unverified`. The
same problem in `mappings/*.tsv` was fixed with a `.gitattributes` LF rule.
Fix later: normalise line endings before hashing, or extend the LF rule to
the fingerprinted files.
- **Folders to standardise:**
- `marker_mappings/` — curated mapping CSVs (tracked).
- `literature/` — M2 literature reports.
Expand Down
3 changes: 3 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ pages hold the full detail.
| [pipeline.md](pipeline.md) | Each pipeline stage and its command: sheet sync, CL→PRO axioms, candidate matching, OAK lexical search, SSSOM export, ROBOT QC |
| [marker_resolution.md](marker_resolution.md) | Token → PRO resolution rules, policies, lexical cache |
| [matching_and_evaluation.md](matching_and_evaluation.md) | Audit dashboard, matcher evaluation, regression triage and follow-up |
| [diehl_review_2026-10.md](diehl_review_2026-10.md) | CL issue drafts from the October 2026 NK and plasmablast audit, for Dr. Diehl to approve before anything is filed |
| [group1_ilc_species_hierarchy_proposal.md](group1_ilc_species_hierarchy_proposal.md) | Design proposal for a parallel human / mouse hierarchy under group 1 ILC and NK cell (Dr. Diehl, 2026-10-05): before/after trees, new grouping terms, terms to decide. Per-term changes in the matching [.tsv](group1_ilc_species_hierarchy_proposal.tsv) |
| [protege_ncam1_query_repro.md](protege_ncam1_query_repro.md) | Repro note for the Protégé NCAM1 (CD56) query that returned too few classes (Dr. Diehl, 2026-10-05): expected classes, likely causes, what to record |
| [planning/](planning/) | Sprint backlog and semester plan (hand-maintained); agenda for the [12 Oct 2026 meeting](planning/2026-10-12_meeting_summary.md); [human/mouse marker pilot summary](planning/2026-10-02_diehl_summary.md) for Dr. Diehl |

Related specs that live at the top level: [MARKER_SYNTAX.md](../MARKER_SYNTAX.md)
Expand Down
Loading
Loading