biochemical-identifier-crosswalk
Skill1 starsChanged 53 days agoMITView on GitHub
Life sciences / Biochemistry — Reconcile reactions, compounds, proteins, and taxa across Rhea, ChEBI (via EBI OLS4), MetaNetX, and UniProt into one one-to-many identifier crosswalk without collapsing chemical or mapping ambiguity. Config-driven: entities are declarative YAML records, so adding a reaction, compound, or enzyme means adding a record rather than editing code. Resolves reaction direction from the retrieved equation text rather than the Rhea LR/RL label, verifies mass and net-charge balance against an independently retrieved ChEBI formula and charge table, and never treats name similarity or a shared EC number alone as proof of identity. WHEN: "map Rhea to ChEBI, UniProt, or MetaNetX", "identifier crosswalk", "reaction identifier reconciliation", "resolve reaction direction", "preserve isoenzyme ambiguity", "is this the same reaction or compound", "mass and charge balance check", "currency metabolite vs generic compound".
- Installs packages
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- alphafold-structure-provenanceSkill
- biocyc-network-contextSkill
- brenda-enzyme-dataSkill
- build-research-paperSkill
- chat-session-experimentalSkill
- discovery-add-agentsSkill
- discovery-clarify-projectSkill
- discovery-dashboardSkill
- discovery-design-tasksSkill
- discovery-project-storySkill
- discovery-token-usageSkill
- engine-chat-experimentalSkill
- osti-literature-searchSkill
- sabio-rk-kineticsSkill
- scientific-database-accessSkill
- scientific-evidence-qcSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 58
Do NOT trigger for:
- Very specific: line 73
Direction comes from the equation, never the LR/RL label: Every reaction record must carry direction_evidence.resolved_from: equation_text …
- Very specific: line 119
Resolve access before claiming a source is unavailable: Check references/sources.md for the verified recipe/gating status per source (Rhea …
- Very specific: line 152
Report unresolved items as unresolved: If a mapping/direction/ isoenzyme assignment genuinely cannot be determined from the sources queried …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
biochemical-identifier-crosswalk
Reconcile a reaction/compound/protein/taxon across model-native,
Rhea, ChEBI, EC, UniProt, NCBI Taxonomy, BioCyc/CyanoCyc, SABIO-RK, BRENDA
ligand, KEGG, and MetaNetX namespaces into one
identifier-crosswalk.schema.json-conformant record — while deliberately
preserving every ambiguity that a naive "one canonical ID per entity"
crosswalk would silently destroy.
Dependencies
This skill is not standard-library only. gh skill install and plugin
install do not install Python packages, so install these before first use:
python3 -m pip install -r requirements.txt # PyYAML, jsonschemascripts/build_crosswalk.py needs PyYAML to read the declarative entity
configs; scripts/validate_crosswalk.py needs jsonschema.
scripts/formula_parser.py is standard-library only and works without either.
When to use
Trigger when the user asks anything like:
- "Map this Rhea/ChEBI ID to UniProt / MetaNetX / KEGG"
- "Is this really the same reaction/compound as that one?"
- "Build an identifier crosswalk for these reactions"
- "Resolve which direction this reaction actually runs"
- "This reaction has isoenzymes / paralogs — keep them separate"
- "Check mass and charge balance for this reaction"
- "Is a locus tag the same thing as a reaction ID?" (no)
Do NOT trigger for:
- Retrieving raw kinetic parameters (
sabio-rk-kinetics,brenda-enzyme-data) or gene→pathway network context (biocyc-network-context) — this skill reconciles identifiers, not parameter values or network structure. Those skills are natural upstream/downstream neighbors: crosswalk entries carryevidence_ref/upstream_taskspointers into that other evidence, they don't replace it. - General database access/authorization triage — see
scientific-database-accessfirst if a source's reachability itself is in question.
Hard rules (enforced by the scripts, not just documented)
- Direction comes from the equation, never the LR/RL label. Every
reaction record must carry
direction_evidence.resolved_from: equation_textplus the actual retrieved equation string.scripts/build_crosswalk.pyrefuses to build a reaction record missing this or attempting to justify direction any other way. Readreferences/ambiguity-taxonomy.md#directionbefore assuming an LR entry is "the forward direction" — it frequently is not. - Mass/charge balance uses an independently retrieved ChEBI
properties table, never numbers derived from the reaction equation
itself.
scripts/validate_crosswalk.pysums per-element atom counts and net charge across substrates vs. products and reports any mismatch as an error. - A real formula parser, not a formula regex.
scripts/formula_parser.pyhandles nested brackets and hydrate/adduct separators, validates every token against the real IUPAC element table, and rejects (rather than silently mis-parses) R-groups, wildcards, unbalanced brackets, and unknown symbols. Seereferences/formula-grammar.mdfor the accept/reject table. - Name similarity and shared EC numbers are never sole proof of
identity.
scripts/build_crosswalk.pyflags any entry whose onlypresent-state cross-source evidence issmiles_structure_match/ec_number_matchas identity-unconfirmed. Seereferences/identity-checks.md. - Five ambiguity dimensions stay explicit, never collapsed:
direction, protonation, compartment, generic-compound, isoenzyme (see
references/ambiguity-taxonomy.md). Preserve one-to-many mappings (one Rhea master → up to 4 directional IDs; one EC class → multiple isoenzyme accessions) rather than picking a "canonical" one. generic_compoundambiguity ≠ currency-metabolite caveat. A compound that is chemically underspecified (R-group, unresolved stereochemistry) isgeneric_compound.applies: true. A compound that is fully specified but universally shared (water, CO₂, H⁺, Pi, ATP/ADP, NAD(P)(H), CoA) is arole_class: currencyparticipant — distinct, tracked separately, and never itself sufficient to confirm a reaction match.scripts/build_crosswalk.pyrequires every stoichiometry participant to declarerole_class: currency|generic|specificand rejects configs that mix the two concepts up.- A locus tag is a gene identifier, not a model-native reaction
ID. Reusing one for a reaction/enzyme's
model_nativemapping is fine (method: locus_tag_reuse) only when explicitly labeled as such in the record'snote— never presented as though a real SBML/whole-cell-model reaction ID artifact exists when it does not.
Workflow
- Resolve access before claiming a source is unavailable. Check
references/sources.mdfor the verified recipe/gating status per source (Rhea bulk mirror, ChEBI via OLS4 REST, MetaNetX bulk xref-only, UniProt REST, KEGG-via-Rhea-only, CyanoCyc/BRENDA SOAP/SABIO-RK confirmed gated as of their last verification date). Re-verify gating rather than assuming an old note is still current. - Retrieve the actual equation text for every reaction, not just
its Rhea ID — you need it to resolve direction (rule 1 above) and to
populate
stoichiometryfrom the authoritative source, never from the entity's name. - Author one YAML config record per entity (reaction/compound/
gene/enzyme) under a project-appropriate config path — see
fixtures/configs/*.yamlfor two complete worked examples (a non-Calvin-cycle reaction; an ambiguous isoenzyme pair). Do not write Python literals for new entities; that reintroduces the hand-assembled-builder problem this skill replaces. - Build:
Fix anypython3 scripts/build_crosswalk.py <config1.yaml> [<config2.yaml> ...] \ -o <output.json> --generated-at "$(date -u +%Y-%m-%dT%H:%M:%SZ)"ConfigError(a hard rule violation) before proceeding; review any printed build-time warnings (identity-strength, currency-metabolite caveats) even though the build still succeeds. - Validate:
This must exit 0 (schema conformance + mass/charge balance + EC-consistency + ChEBI-identity-collision + namespace-coverage report) before the crosswalk is considered usable.python3 scripts/validate_crosswalk.py <output.json> \ --schema <path-to-identifier-crosswalk.schema.json> \ --chebi-props <path-to-an-independent-ChEBI-properties-file.json> - Report unresolved items as unresolved. If a mapping/direction/
isoenzyme assignment genuinely cannot be determined from the sources
queried in this pass, record it as
unknown/unavailable_sourcewith a note explaining what was tried — never fill the gap with a guess "for completeness."
Fixtures
fixtures/configs/synthetic-non-calvin-citrate-synthase.yaml— a non-Calvin-cycle (TCA-cycle-style) reaction fixture, illustratingdirection_evidence, the currency-metaboliterole_class, and thatgeneric_compoundneed not apply when every participant is fully specified. Synthetic: every identifier is a deliberately out-of-range placeholder (RHEA:990010,CHEBI:99000x) — never treat these as real cross-references.fixtures/configs/synthetic-ambiguous-isoenzyme-pfk.yaml— a two-paralog isoenzyme fixture (same shape as the project's already -verified GAPDH gap1/gap2 case), illustratingambiguity.isoenzyme,alternatives, and the identity-strength warning forec_number_match-only evidence. Synthetic placeholder pending a real PFK isoenzyme case from workstream 3 — swap this fixture for that evidence once it lands, per theTODO(workstream-3)note in the file.fixtures/expected/synthetic-fixtures-built.json+fixtures/expected/synthetic-chebi-properties.json— the verified output of building the two configs above and validating them end-to-end (0 schema errors, 0 balance errors) — a regression baseline for anyone editing the scripts.
Do not generalize
- The GAPDH gap1/gap2 isoenzyme ambiguity and the RuBisCO/PGK direction-reversal examples above are real, project-verified findings for Prochlorococcus marinus MED4 — cited here as worked illustrations of the general rules (read the equation; don't guess isoenzymes), not as claims that apply to other organisms or reactions.
- A source confirmed
unavailable_sourceon a pastretrieved_atdate is not permanent — re-check before repeating that conclusion in a new task.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

