Repository navigation
MicrobeDecoder curation gap: 5,224 distinct labels unmapped #650
Description
Follow-up from PR #648 (and post-encoding-fix PR #649). Live `kg transform -s microbedecoder` against the real `database.csv` (27,010 rows) surfaces a curation gap, not a transform bug: ~5,224 distinct labels across the metabolism / trait / substrate axes fall through to `kgmicrobe.` placeholders because they aren't in the shared canonical mapping tables (`mappings/canonical/.tsv`, unified chemical mappings, METPO ROBOT template).
Live-run breakdown:
| Placeholder prefix | Distinct labels | Edges emitted |
|---|---|---|
| `kgmicrobe.pathway:` | 90 | 61,614 |
| `kgmicrobe.compound:` | 73 | 393 |
| `kgmicrobe.trait:` | 5,061 | 360,435 |
| total unique | 5,224 | 422,442 |
Total distinct unmapped labels = total nodes emitted by MicrobeDecoder.
Highest-frequency unmapped pathway labels (each column value counted across all strain rows):
| count | label |
|---|---|
| 10,493 | chemoheterotrophy |
| 7,875 | aerobic_chemoheterotrophy |
| 5,647 | other |
| 5,391 | phototrophy |
| 5,327 | photoautotrophy |
| 5,221 | oxygenic_photoautotrophy |
| 5,221 | photosynthetic_cyanobacteria |
| 4,819 | fermentation |
| 1,450 | nitrate_reduction |
| 802 | animal_parasites_or_symbionts |
Every entry here is a FAPROTAX or Bergey `Type_of_metabolism` label that should map to a METPO class. `fermentation` in particular has an obvious METPO home (`METPO:2000011`).
Highest-frequency unmapped trait labels are the wide BacDive_* snapshot values × per-strain combinatorial, dominated by common phenotype tokens (`rod_shaped`, `aerobe`, `catalase`, `negative`, `0`, `1`, etc.). Many belong in `kgmicrobe.trait` yaml or existing METPO/PATO IDs.
Highest-frequency unmapped compound labels are compound / medium names that the unified chemical mappings didn't recognise (`pyg` = 114× — a growth medium; `h2_co2` = 100× — a gas mixture; assorted `X_yeast_extract` combined-medium names).
Suggested next steps
- METPO alias column: Open an upstream PR against `berkeleybop/metpo` adding a `"microbedecoder synonym"` column to `src/templates/metpo_sheet.tsv`. Pre-populate the 10-15 highest-frequency `Type_of_metabolism` labels above.
- Chemical mappings: Add the compound / medium labels to `mappings/canonical/chemical_mappings.tsv` (or `mappings/canonical/special_chemical_mappings.tsv`) with target CHEBI / mediadive.medium CURIEs. `pyg` and `h2_co2` may need entries in `mappings/canonical/pathway_mappings.tsv` too.
- Trait vocabulary: The 5,061 distinct trait labels are the largest bucket — many are per-strain literal values (numeric temperatures, textual phenotype descriptions). Some subset (top ~50 canonical tokens) should map to METPO / PATO; the long tail is genuinely per-strain data that belongs in `kgmicrobe.trait` yaml.
- Once the MicrobeDecoder transform emits an `unmapped_labels.tsv` (tracking issue for that landing separately), it will be the canonical priority queue for this curation work.
Not a transform bug — the transform is doing exactly what the add-transform skill says: try the canonical mapping tables, fall back to a facet-typed `kgmicrobe.*` placeholder. This issue tracks the curation work.
Activity
feat(microbedecoder): emit unmapped_labels.tsv curation queue (#652)
realmarcin commentedon Aug 3, 2026
Resolved-partially by #652: MicrobeDecoder now emits a per-run
data/transformed/microbedecoder/unmapped_labels.tsvsorted by occurrence descending. Live run produces 5,224 rows — the curation priority queue for this issue. Top pathway placeholders (chemoheterotrophy10K×,fermentation4.8K×,phototrophy5.4K×) are the highest-leverage METPO alias additions.realmarcin commentedon Aug 3, 2026
PR #653 wires up the full postprocess pipeline for the unmapped-labels report:
scripts/dump_unmapped_microbedecoder_labels.pyreduces the per-run report intomappings/microbedecoder_unmapped_labels_to_curate.tsv(tracked). Split by facet with--prefix pathway|compound|trait, threshold with--min-occurrences.scripts/generate_coverage_report.py -s microbedecodergives mapping-rate stats.docs/MICROBEDECODER_TRANSFORM_RUNBOOK.mddocuments the per-facet curator workflow.kg-postprocess-reportskill now knows about the outputs.Curators can start on the top 451 rows (occurrences ≥ 100) at
mappings/microbedecoder_unmapped_labels_to_curate.tsv.realmarcin commentedon Sep 28, 2026
Reviewed implementation and current scientific scope
Merged #1217 (shared GO checkpoint fix) and #1218 (source-specific curation),
after independent adversarial review and green Python 3.10/3.11/3.12 CI on each
exact PR head. Final master is
bc7c6e73a13e90ddadd201d938530c59288aeeea, withthe same Git tree as the independently reviewed and tested integrated head.
Both topic branches are deleted locally and remotely; commits and review
evidence remain preserved. Review issues #1212–#1216 are closed.
The integrated head passed full pytest (4,356 passed, 10 skipped) and all
six tox environments (including the same full test count), plus lock/config
checks. The bounded native/source replay, combined finalization/reuse diagnostic,
and independent Git-tree review also passed. Post-merge
master QC
is green on all three Python versions, and
documentation deployment
passed on the same final commit. Production raw data, MicrobeDecoder TSVs,
merged archive and pinned unified export retain their original checksums.
This is not a production rebuild or release acceptance.
The curation implementation is evidence- and source-field-scoped:
tartateobservation is corrected to tartrate; no global chemical alias, consolidated mapping or MIM pin is changed.Independent adversarial review produced #1212–#1216: GO final-byte checkpointing, blank scientific endpoints, fallback relation validation, explicit chemical-category contradictions, and native METPO process categorization. Each was reproduced, fixed, and independently re-reviewed.
The bounded post-review rebuild produces 20,364 MicrobeDecoder nodes and 521,217 edges, byte-identical to the earlier accepted continuation candidate. The native METPO producer changes exactly 18 categories to BiologicalProcess using asserted native ancestry. All 44 protected files are unchanged; production data and merged artifacts have not been replaced.
Remaining work (keep #650 open)
sugarobservations must retain their evidence boundaries.The historical 5,224-label total is not a verified current backlog count or acceptance target. This issue remains the durable follow-up for these scientific interpretation tasks; code merge alone is not a release claim.
Curate MicrobeDecoder traits, process meanings, and material contexts (…
realmarcin commentedon Sep 29, 2026
The bounded curation and review work in #1220 is now merged as
66f3a03c7ecf12d982ef14bacc1157b93e59bc55; its local and remote topic branchesare deleted. Review issues #1219, #1221, #1222 and #1223 are closed.
Final checks on the exact reviewed head passed:
poetry run pytestand thepytest stage of
poetry run toxeach report 4,671 passed / 22 skipped;all other tox stages, lock check and merge-config generation check passed.
Python 3.10/3.11/3.12 CI is green. The merge tree equals the tested tree.
This adds the reviewed source Attribute types, all 61 remaining process-label
dispositions, and the complete bounded material-context catalogue. The actual
isolated replay verified intentional changes and byte-identical preservation
of 479,829 unaffected edges; it is not a production merge acceptance.
Keep #650 open for production rebuild/acceptance. Source-path review found
preexisting crosswalk contradictions, tracked separately in #1224. The user
approved evidence-preserving quarantine of authority-contradicted links only.
Independent complete-cohort review supports an initial finite set of 10,066
specific NCBI/GOLD claims across 5,033 records; remaining candidates are not
automatically rejected. The separate containment implementation is underway.
Corroborated assembly links and other source observations are preserved.
No production graph or mapping pin was changed, and this is not a release-ready
claim. Local evidence and final gate receipts are under
data/curation-goal-20260928.LFUKxk/; quarantine work is underdata/issue1224-quarantine-20260929.xjuS9H/.realmarcin commentedon Sep 29, 2026
The approved finite crosswalk quarantine is now shipped in PR #1228, squash
6c8f360242fd483537c24af3cce2f5743e7b487f, following independent adversarial review and all-green Python 3.10/3.11/3.12 CI. The merged tree matches the tested candidate exactly; the branch was deleted locally/remotely while retaining its detached evidence worktree.Actual isolated producer/finalizer replay and full-row comparison establish exactly 10,066 reviewed NCBI/GOLD claims quarantined with complete original evidence retained; all 511,151 surviving edge rows and 17,855 retained node rows are unchanged. Strict inventory and modeling review passed. The source-only orphan result remains explicit: the complete configured-supplier scan leaves exactly the same 18,374 external IMG IDs as the prior review, not a new loss or a blanket clean merged-path claim.
Local gates: 4,761 pytest passed / 56 skipped; tox, lock, generated-config checks passed; 34 additional targeted schema tests passed with the existing pinned local schema. Full evidence:
data/issue1224-quarantine-20260929.xjuS9H/SHIPPED.mdand linked receipts.This issue remains open for actual production rebuild/acceptance. The existing production archive and user statistics remain byte-identical and have not been replaced. The full 15-source rebuild and separate candidate merge are next, followed by source-to-merge preservation, CAS reconciliation, complete graph reviews and immutable quarantine evidence companion. A pre-launch helper safety review found #1232; it will be fixed and retested before execution. No release-readiness claim is made.
realmarcin commentedon Sep 29, 2026
Reopening this umbrella: PR #1256 landed its finite corrections, but the fresh
all-source rebuild and candidate KG/model/path acceptance remain outstanding.
GitHub interpreted a closing keyword inside a negated sentence in the PR body
as an automatic closure directive. The body has been corrected to explicitly
state that this umbrella remains OPEN. This was a tracking correction, not
completed production acceptance.
PR #1256 passed independent review, full local gate phases plus a verified
format-only continuation, and exact-head CI on all three Python versions. The
actual MediaDive comparison preserved all 225 audit rows. Follow-up #1259 repairs
an inherited malformed KEGG annotation before the final rebuild. The current
canonical merged archive has not been replaced or declared release-ready.
realmarcin commentedon Sep 30, 2026
The fresh all-15 transform batch at
1408e7099d039026d7611c240938d8e177753406is complete, and its finite pre-merge source checks have passed. The separately guarded candidate-only merge is now running after successful freshness and production source-admission checks.Fresh-source results:
The source-only quarantine result (
6d5a28f2cecbd3cb0049b01c29e39be4bc220d80dd1c21b1898f6ce2363c6170) and independent acceptance report (c3f045c1802711fc13a411743e9f66dd2b09f41c1ab1b113c13ca7e4e3e4fbb9) are underdata/issue1224-quarantine-20260929.xjuS9H/fresh-source-acceptance-1408/. Original failed checks and their corrected, independently reviewed successors remain preserved; no source evidence was rewritten to satisfy them.Actual merge attempt:
data/issue1224-quarantine-20260929.xjuS9H/production-rebuild/merge-attempt-9faxocfp/. This is a new candidate destination; the canonical archive and user-maintained statistics remain protected.Still pending: settled merge completion; complete archive framing/projection/metadata/CAS checks; native-evidence reconciliation; full KG/model/path reviews and triage; evidence companion retention. #650, #286, #1265, #1267 and #1268 remain open. No release or exact identity for unresolved materials is claimed.
realmarcin commentedon Sep 30, 2026
The fresh-production and candidate-acceptance gates listed in comments 5886356144 and 5903022047 are now complete. Closing #650 for the documented current-data interpretation, conservative representation, quarantine, and candidate acceptance scope—not as universal grounding of all historical labels or release approval.
Production code is
1408e7099d039026d7611c240938d8e177753406. The all-15-source rebuild passed source admission and the isolated candidate merge completed: 3,354,500 nodes / 17,637,435 edges, archive SHA-256158e7131025c7941ae98d70af5ca14d6efb69857ed019f7f61fa9b44279b2345. Its literal manifest commit remains1408e7099-dirty, not a substituted clean-commit assertion.Actual acceptance:
REVIEW_REQUIREDresult remains unchanged.Strict KGX is still nonconformant. Its 76,611,293 callbacks include installed-profile missing-ID/type/prefix requirements; the count is not a count of distinct bad assertions. The exact MediaDive +290 callback change is explained, but residual MicrobeDecoder and GO contributor-level attribution limits remain documented. Neither the original strict status nor the native-baseline drift marker was rewritten. This closure does not waive strict/profile findings, approve every chemical identity, or authorize publication.
The byte-exact evidence companion completed with
RETENTION_VERIFIED_ONLY: 56 retained roles / 56 content-addressed objects, 60 guarded input identities. Manifest SHA-256e13b939e9af0201f45ef552ab31fe816b494e75149e6a8ec8840a05b3f3bfc65; original attempt SHA-2565728d058196a0b4d34fd103a848cb8c42c2ae9baf3c8e98f846894623998ecfa. Archive/raw data are hash-bound, not copied, and not every linked review dependency is embedded. Retention does not grant execution identity, scientific acceptance, or release authority.Project-relative evidence root:
data/issue1224-quarantine-20260929.xjuS9H/fresh-source-acceptance-1408/.FINAL-KG-MODEL-PATH-REVIEW-02.md, SHA-256c79fdf30e9b8a0b39c6ad8a9aa717f3597cc0b5d207177cd458ccd6fdc811d22.category-union-projector-review/actual-candidate-9faxocfp-01/result.json, SHA-256288e162012d19281041f814a64eff731688cf3bf0e5cc01597439323bc9c5f48.source-projection-02/result.json, SHA-256c5526e13ab4b72ceab168baeac3c4310d440b96585cbf596ef5f3b29ccde0ce9.NATIVE-FINITE-SCIENTIFIC-DISPOSITION.md, SHA-256c1650e7c41ee27cdc29cffd2fcdec4ffb1b23d21398c303259320f3a6e7f611f.evidence-companion-01/; observed execution receiptevidence-companion-execution-01.json, SHA-2560dc9f3b4d167902b35016a25f0ac1becb6f3681eb8463f825d68c1f69718726f.COMPANION02-TERMINAL-INDEPENDENT-READBACK.md, SHA-256519b3e837e0b90890ce483bd0b05db8846ee7986904afdbbc97b1605fd97693a. All 60 original inputs and 56 retained objects were independently rehashed; the bounded MicrobeDecoder curation gap: 5,224 distinct labels unmapped #650 closure was reviewed and supported.The production changes have landed at the commit named above; local HEAD and origin/master match it. Acceptance-checker findings #1265 and #1267–#1274 were corrected, independently reviewed, exercised against the actual candidate, and independently confirmed closed in a final live GitHub check; original failures remain retained. No additional production edits were needed in final synthesis/retention.
#286 remains open for separate broader historical chemical curation. The canonical archive and user-owned statistics remain unchanged. This candidate has not replaced the canonical graph and has not been released.