Fold every spelling of a registry the census already counts - #244
Merged
Merged
Conversation
This was referenced Sep 25, 2026
This was referenced Sep 25, 2026
The census counted GOLD, BacDive, IMG, DSMZ, KEGG, PubChem, MediaDive, KOMODO, ChEMBL, EC, ChEBI, PDB and PMID under one spelling each and dropped the others. TaxonMech writes lowercase bioregistry prefixes, so 1,492,983 GOLD, 556,160 BacDive, 68,303 IMG and 31,553 DSMZ identifiers were never counted; so were kegg.compound/kegg.drug/KEGG_REACTION, pubchem/pubchem.aid, mediadive.*, komodo.medium, chembl, ec, ChEBI, RCSB_PDB and PubMed/PUBMED elsewhere (#84). build_subsets.py folds the spellings of heatmap columns the same way, so AntibioticMech now has a KEGG cell and a kegg.compound term is the same term as a KEGG one. Rerun at the #120 pins from the same snapshot: revisions and record counts are unchanged; only folded prefixes moved. The vocabulary tile goes from 46 to 48 (ChEMBL and KOMODO were only ever written the uncounted way). Which new namespaces to count stays open on #84. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ured A scan of every census record at the #120 pins found more spellings of counted registries: SwissProt/swissprot/Swissprot/UNIPROT, TAXON, PDBe/pdbe, interpro, KEGG_PATHWAY/kegg.module/kegg.glycan, MeSH and PubChem_Compound (#255). The census and, for heatmap columns, build_subsets.py now fold them; the comment and README say the list covers the spellings measured at the pins, not every spelling there could be. The test comment no longer counts norm's entries (#256). Rerun at the same pins: ProteinTraitsMech UniProt +17, PDB +10, NCBITaxon +5, KEGG +5, InterPro +2 and AntibioticMech KEGG +1; four chords gain one term each; the vocabulary tile stays at 48. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ens allowed The spelling scan skipped hyphenated prefixes, so CAS-RN and Swiss went unmeasured (#270), and the census folded entity-qualified namespaces for some registries but not others (#271). The rule is now written down and applied evenly: every namespace named for or qualified by a counted registry folds into it, as gold.ecosystem and pubchem.compound always did. Added: gtdb.genome, pdb.ligand, pdb-ccd, RHEA-COMP, CAS-RN, uniprot.location, uniprot.ptm, UniProtKB-KW and Swiss. build_subsets.py keeps Rhea compounds and PDB ligand codes in their own term space, so an overlap never pairs a compound with a reaction or a ligand with an entry, while they still count toward their column. Rerun at the #120 pins: TaxonMech GTDB +135,164, ProteinTraitsMech PDB +14,863, RHEA +11,169 and UniProt +617, CellStructureMech UniProt 337 to 993, AntibioticMech PDB 6 to 339, MediaIngredientMech CAS 727 to 1,463; the vocabulary tile stays at 48. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Sep 25, 2026
Closed
…ed hyphens TC: is TCDB's own prefix; ProteinTraitsMech cites 194 transporters that way beside 4,705 TCDB: ones (#278). The rule now names its exception, reference and curator collections such as GO_REF, and no longer says the lowercase spellings come from TaxonMech alone; TERM_SPACE gives its real reason for PDB ligand codes (#279). PrefixListTests unescapes every regex escape, not only dots, and checks that every norm key is a spelling the census matches (#280). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
realmarcin
force-pushed
the
fix/census-prefix-spellings
branch
from
September 25, 2026 23:31
6cd4998 to
360e2eb
Compare
This was referenced Sep 26, 2026
…space
The panel pre-fills its filter with the column ("PDB:"), which PDB-CCD ligand
codes and RHEA-COMP compounds never contain, so a refiltered edge could show
"PDB 140" and list none. Terms now also match the column they count toward,
through a TERM_COLUMN map a test holds equal to build_subsets.COLUMN_OF (#284).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
MSH is MeSH's synonym in GO's db-xrefs registry; ten ProteinTraitsMech records cite MeSH that way, so its MESH count goes from 4 to 14 (#285). Census only: MESH has no heatmap column. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #84 (the spelling half; the inclusion decision stays open there). Closes #255, closes #256, closes #270, closes #271, closes #272, closes #278, closes #279, closes #280, closes #281, closes #282, closes #283, closes #284, closes #285.
The rule
The census counted each registry under one spelling and dropped the rest.
prefix_census.normnow folds every namespace named for, or qualified by, a counted registry into that registry (#271). That covers:gold:andGOLD:;SwissProt:/Swiss:andUniProt:;TAXON:andNCBITaxon:;CAS-RN:andCAS:;TC:andTCDB:;MSH:andMESH:;kegg.compound:,mediadive.medium:,gtdb.genome:,uniprot.location:,RHEA-COMP:.gold.ecosystemandpubchem.compoundwere always folded this way. Reference and curator collections named for a registry are not its terms and stay out:GO_REF:andPO_REF:are literature-like (#84 lists GO_REF as a CITATION candidate), andGOC:is curator attribution, which #84 proposes never to count. Mechs mix lowercase bioregistry spellings with upper-case ones, TaxonMech most heavily.The list was measured by scanning every census record at the #120 pins with a token pattern allowing dots, underscores and hyphens. An earlier scan without hyphens missed
CAS-RN(#270). A spelling a Mech adopts later won't be caught until someone scans again. Each fold was sampled in the pinned records to confirm it is the same registry.goldbacdivegtdb.genomeimg.taxonDSMpdb.ligand,pdb-ccd,RCSB_PDB,PDBe,pdbeRHEA-COMPmediadive.medium/.solution/.ingredientkegg.compound,kegg.drug,kegg.glycan,kegg.module,KEGG_REACTION,KEGG_PATHWAYpubchem,pubchem.aid,PubChem_Compoundkomodo.mediumuniprot.location,uniprot.ptm,UniProtKB-KW,SwissProt,swissprot,Swissprot,Swiss,UNIPROTCAS-RNchemblecChEBIPubMed,PUBMEDTAXONMSH,MeSHinterproTCAbout 66 of the
CAS-RNvalues are EC-list numbers that MediaIngredientMech mislabelled as CAS upstream.Overlaps
build_subsets.pyfolds the same spellings for heatmap columns, so record lists agree with the counts.kegg.compound:C00067is the same term asKEGG:C00067.TERM_SPACE): Rhea compound ids share values with Rhea reaction ids (966 of 2,243), and PDB ligand codes are a different kind of identifier from entries. Both keep their own term keys, so an overlap never pairs a compound with a reaction or shows a ligand as an entry. They still count toward the RHEA and PDB columns and the edge's vocabulary breakdown. The page's term filter matches them under their column too, so filtering an edge by "PDB:" lists the ligand codes (Edge panel's column filter pre-fills 'PDB:', which hides PDB-CCD ligand terms #284).Review history: five internal review rounds, then a Codex review, which found
MSH:(#285). That is folded here too.Rerun
prefix_census.pyandbuild_subsets.pywere rerun at the #120 pins from the same snapshot, followed bybuild_data.pyandassemble_page.py. Against main:assemble_page.py --checkreports current.PrefixListTestsnow unescapes hyphens and checks that every fold is reachable (PrefixListTests' literal_prefix() leaves escaped hyphens in, so its emitted-names set is wrong #280).Terms from free text (#254, #272). Overlaps read terms from free text as well as from structured fields, for every prefix, and some of the new terms come from prose:
This predates the PR, applies to all prefixes, and is filed as #254 for its own methodology change.
Not in this PR
Which namespaces the census should count at all (CATH, CDD, PROSITE, StrainInfo, LPSN, TOGO, UNII and about a hundred more) is the maintainer's decision on #84, with the measured inventory in the latest comment there.
_fleet/README.mdsays so, states the fold rule, and corrects its old claim that adding a census prefix adds a heatmap column.🤖 Generated with Claude Code