feat: add descriptive names to all reactions (100% coverage) - #1052
Merged
Conversation
Fill in descriptive names for reactions that had none, a long-standing request in #181. Names come from three sources: - Transport reactions (2457): generated from the transported metabolite and its compartments, e.g. "transport of GSH (cytosol to mitochondria)". - Single-gene reactions (934): named from the gene's enzyme name plus the primary substrate, e.g. "cytochrome P450 (ethanol)". - KEGG reaction names (6): remaining reactions whose KEGG entry has a systematic name. Only reactions that had no name were touched and the change is confined to the name field, so model structure and balance are unchanged. This leaves 2263 reactions still unnamed (mostly metabolic reactions without a KEGG name or with several genes), for a later pass.
|
This PR has been automatically tested with GH Actions. Here are the results of the quality-control tests: MACAW: dead-end and duplicate testsMass and charge balanceMore detailed output is committed to
|
Extend the reaction naming to reactions with an EC code or several genes: - EC-based (1526): the ExPASy/IUBMB enzyme name for the reaction's EC, plus the primary substrate, e.g. "carboxylesterase (substrate)". Transferred EC numbers are resolved to the current entry first. - Gene consensus (184): where a reaction's genes share one enzyme name, unanimously or by clear majority, that name plus the substrate, e.g. "sulfotransferase (PAPS)". Reaction name coverage is now 96% (12324 of 12877). The change is confined to the name field. The ~553 still unnamed have no EC, no gene agreement and no usable KEGG name.
edkerk
force-pushed
the
feat/reaction-names
branch
from
July 11, 2026 19:19
f2fee9b to
575419b
Compare
Name the reactions that have no EC, no gene agreement and no KEGG name by reconstructing the transformation from the reaction stoichiometry, in the style "<substrate> <transformation>": - cofactor signature (262): e.g. "fructose phosphorylation" (ATP -> ADP), "propane-1,2-diol oxidation" (NAD+), "retinoate activation" (ATP -> AMP + PPi + CoA), "5-hydroxyisourate decarboxylation" (CO2 released), "3,3-diiodo-L-thyronine sulfation" (PAPS). - pool reactions (39): "<pool> formation". - remaining conversions (252): "<substrate> to <product> conversion". Reaction name coverage is now 100% (12877 of 12877). Names are derived from the reaction's own chemistry rather than an external database, so a few edge cases are approximate. The change is confined to the name field.
Follow-up cleanup of the reaction names:
- Normalise problematic characters: collapse double/triple hyphens from
IUBMB-style names (e.g. "glutamic--pyruvic" -> "glutamic-pyruvic",
"NADPH---hemoprotein" -> "NADPH-hemoprotein"), remove the stray space
left by ExPASy line-wrapping ("4-beta-N- acetyl..." -> "4-beta-N-acetyl..."
while keeping genuine elisions like "formate- and CO-forming"), replace
semicolons with commas, collapse double spaces, and trim trailing
punctuation and leading/trailing whitespace.
- Shorten 117 over-long names (>100 characters) by dropping the appended
substrate where the enzyme name alone is descriptive, e.g.
"mannosyl-oligosaccharide 1,2-alpha-mannosidase (long glycan)" ->
"mannosyl-oligosaccharide 1,2-alpha-mannosidase".
Change is confined to the name field. The names that are still long are
driven by long metabolite names (transport of large N-glycans, conversions
of complex lipids) or are pre-existing systematic KEGG names, and would
need metabolite-name abbreviation to shorten further.
Where a reaction name is long because of a long glycan metabolite name and that metabolite has a KEGG glycan identifier (Gxxxxx), use the identifier as the abbreviation, e.g. "transport of fucacgalfucgalacglcgalgluside heparan sulfate (cytosol to Golgi apparatus)" -> "transport of G00043 (cytosol to Golgi apparatus)". Only whole metabolite names are replaced (boundary-checked), so a glycan name that is a substring of a larger metabolite is not touched. Most of the longest glycan names (e.g. the N-glycan transport reactions) have no KEGG glycan id in the model and are unchanged; adding those identifiers is a metabolite-annotation task.
Aggressively shorten reaction names over ~80 characters so they roughly
convey the reaction rather than fully specifying it: names represent
meaning, they do not need to match a systematic string. 730 names
shortened; the longest drops from 324 to 90 characters (median 45).
For each long name a short one is generated in priority order:
- gene or EC enzyme name (plus the primary substrate when short), so the
324-character "dolichyl ... glucosyltransferase" systematic names become
"ALG6/ALG8 alpha-1,3-glucosyltransferase", and cytochrome P450 systematic
names become "cytochrome P450 (substrate)";
- transport reactions become "transport of <metabolite> (<c1> to <c2>)"
and exchanges "Exchange of <metabolite>", taking the primary metabolite
name and dropping synonyms and lipid-detail parentheticals;
- otherwise a chemistry-derived name ("<substrate> <transformation>" or
"<substrate> to <product> conversion").
Long metabolite names are abbreviated to their KEGG glycan id where present,
otherwise truncated. Change is confined to the name field.
# Conflicts: # data/testResults/README.md
Member
Author
|
No structural model changes |
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.
Main improvements in this PR:
Addresses #181 by filling in a descriptive name for every reaction that had none. Reaction name coverage goes from 56% to 100% (all 12877 reactions named). The change is confined to the
namefield, so model structure and balance are unchanged, and the generation is scripted so it can be re-run as the model grows.Names come from six sources, in priority order:
transport of GSH (cytosol to mitochondria).carboxylesterase (substrate)(transferred ECs resolved to the current entry first).cytochrome P450 (ethanol).<substrate> <transformation>, e.g.fructose phosphorylation(ATP to ADP),retinoate activation(ATP to AMP + PPi + CoA),<substrate> to <product> conversionotherwise. These are derived from the reaction's own chemistry rather than an external database, so a few edge cases may be approximate.Only previously unnamed reactions were touched.
Follow-up commits also normalise problematic characters across all reaction names (collapse
--/---to-, remove stray spaces left by ExPASy line-wrapping while keeping genuine elisions like "formate- and CO-forming", replace semicolons with commas, collapse double spaces, trim trailing punctuation and leading/trailing whitespace) and shorten the longest names so they roughly convey the reaction rather than fully specify it. Any name over ~80 characters is regenerated to a short form (gene or EC enzyme name, else a transport/exchange or chemistry-derived form), with long metabolite names taken to their KEGG glycan id where present or truncated. The longest name drops from 324 to 90 characters (median 45). This deliberately replaces some official systematic names with rougher, shorter ones.I hereby confirm that I have:
developas a target branch