Order heatmap columns by how widely each vocabulary is shared - #60
Conversation
Review of #60 found the list of prefixes that name a paper rather than a concept written down twice, in scripts that cannot see each other: build_subsets.py skipped them with a literal tuple so they get no record lists, and build_data.py declared its own copy to pin them to the right of the heatmap. Adding a third prefix to one would have left the other sorting it to the far left on Mech count with no record total to break the tie, which is the failure the pin exists to prevent. Both now import CITATION from roots.py, which already owned the other shared fact about the corpora. build_data.py also stops redeclaring ORDER, which roots.py has derived from RECORD_GLOBS since #40. fleet_data.json rebuilds byte-identical, so this changes no published number. Closes #61 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BXHrBTSU8fU4Zg7HfaMKs9
|
Adversarial review done, read-only, against Checked the thing most likely to be wrong here, that the sort mixes two metrics: Mech count comes from the prefix census (occurrences) while the tie-break comes from the record subsets. Those could disagree, so I checked every pair in Also verified that nothing else reads the column order. The page takes it from One assumption worth stating: "sort by Mech count" is read as descending, so the most widely shared vocabulary is leftmost. Say the word if you want it the other way round. Addressed here: #61, the duplicated citation-prefix list, now a single Left filed: #62, a |
The 22 columns were in the order they were first written down, so the table said nothing by its shape: a vocabulary every Mech uses sat next to one only ProteinTraitsMech has. They now sort left to right by the number of Mechs that ground anything in the vocabulary, ties broken by the total records citing it across the fleet, then by name so the order is stable when a vocabulary appears in no records at all. PMID and DOI are pinned to the right end instead of sorted. Every Mech cites literature, so both would rank first on Mech count and crowd out the vocabularies that actually say what the fleet shares; they also have no record counts to rank by, since build_subsets.py skips citation prefixes. The result runs NCBITaxon and ChEBI at nine Mechs each, through GO at six and a five-Mech tier of UniProt, ENVO and UBERON, down to RHEA, MIBiG, NPAtlas and GTDB at one. The order is computed in build_data.py, so a corpus refresh re-derives it rather than leaving the columns stale. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BXHrBTSU8fU4Zg7HfaMKs9
Review of #60 found the list of prefixes that name a paper rather than a concept written down twice, in scripts that cannot see each other: build_subsets.py skipped them with a literal tuple so they get no record lists, and build_data.py declared its own copy to pin them to the right of the heatmap. Adding a third prefix to one would have left the other sorting it to the far left on Mech count with no record total to break the tie, which is the failure the pin exists to prevent. Both now import CITATION from roots.py, which already owned the other shared fact about the corpora. build_data.py also stops redeclaring ORDER, which roots.py has derived from RECORD_GLOBS since #40. fleet_data.json rebuilds byte-identical, so this changes no published number. Closes #61 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BXHrBTSU8fU4Zg7HfaMKs9
b5652ed to
c2312ce
Compare
|
Rebased onto main after #71 and #72 landed. One conflict, in the heatmap note: main had added a caveat that the census predates the September 15 refresh and does not cover TaxonMech, while this PR was adding the sentence explaining the column order. Kept both. Re-checked against the new gates on main, which did not exist when this PR was opened:
The ordering still derives from the nine-Mech census, and main's new assembler validates that the census order is a subset of fleet membership, which nine of ten satisfies. TaxonMech has no vocabulary census yet, and the note now says so. Findings from the original review stand: #61 addressed here, #62 left filed. |
The Shared vocabulary columns were in the order someone first typed them, so the shape of the table carried no information. They now sort left to right by the number of Mechs that ground anything in the vocabulary, ties broken by the total records citing it across the fleet, then by name so the order is stable for a vocabulary with no record counts.
PMID and DOI are pinned to the right rather than sorted. Every Mech cites literature, so both would tie for first on Mech count and push the vocabularies that actually distinguish the Mechs off the left edge. They also have nothing to break the tie with:
build_subsets.pyskips citation prefixes, so neither has record counts.The resulting order:
The sort lives in
build_data.py, so a corpus refresh re-derives it instead of leaving the columns stale. The prose and the note under the table now say what the order means: the left edge is the fleet's common ground, the right edge is what one Mech needs alone.Verified in Chrome on a local harness: 22 columns render in the order above and the card still has zero horizontal overflow at the default width.
🤖 Generated with Claude Code
https://claude.ai/code/session_01BXHrBTSU8fU4Zg7HfaMKs9