You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The newest model of Human-GEM gives 0% Stoichiometric Consistency when running MEMOTE #837
The following are the results of running the latest version of MEMOTE (0.17.0) on the latest version of the Human-GEM.xml (v1.19.0 commit "chore: new version"):
Citing the paper An atlas of human metabolism:
"The quality of Human1 was evaluated using Memote, a communitymaintained framework for assessing GEMs with a standardized set of tests and metrics (22). In terms of consistency, Human1 exhibited excellent performance with 100% stoichiometric consistency, 99.4% mass-balanced reactions, and 98.2% charge-balanced reactions (fig. S3)."
I was wondering if you could give me some insight into why this discrepancy between the text and my results might be happening.
From the release of Human1 to Human-GEM 1.19, the model has changed a lot. Although we have tried to correct the Stoichiometric Consistency in #814 and #813 , it seems to be still failed from the the results you provided. The report shows we got 4410 Unconserved Metabolites in Human-GEM. It's terrible. We need some time to test what's wrong with Human-GEM. Will get back soon.
Even though it shows a ton of unconserved metabolites and a very low stoichiometric consistency, it could be as simple as one reaction being unbalanced. I would recommend taking a look at which reactions have changed since the drop in consistency score, and trying find any that may have become mass-unbalanced.
Yeah. I will take a look at mass-unbalanced reactions. But I remember that Human-GEM is consistency after #814 and #813 . Perhaps there have been some issues with recent PRs. Anyway, it doesn't look like it will be too hard to resolve.
This reaction could be balanced after remove FAD in reactants and FADH2 in products. Although this reaction was already detected in #813 , it was not successfully modified in Human-GEM due to my negligence. It will be curated in a new PR in soon.
Here is the report index.zip
Indeed, I did not generate the memote report directly because it would take a long time to run during this check. The check_stoichiometric_consistency function in memote can be used directly to get the results faster.
import memote.support.consistency
model = read_sbml_model('Human-GEM.xml')
memote.support.consistency.check_stoichiometric_consistency(model)
If we add this code to the check tasks after every PR merge, Human-GEM will not have this problem in the future.
But the current problem with this code is that the Human-GEM.xml cannot be read by cobrapy. It reported the error as below after using validate_sbml_model function as cobrapy recommend to check model's problem.
What did I done is to add prefix of 'M_' for mets id and 'R_' for rxns id in xml format of Human-GEM so that it could be read by cobrapy. I don't know whether this is reasonable, but if it is, we need to modify the code of the model output XML format.
As shown in the memote workflow referred to in the previous comment, cobrapy can read the Human-GEM.yml file directly with model = cobra.io.load_yaml_model("model/Human-GEM.yml").
At the same time, on my PC (cobrapy 0.29) there seems no problem with loading the XML file. validate_sbml_model only throws a warning:
(<ModelHumanGEMat0x7fbe64166b00>,
{'COBRA_CHECK': [],
'COBRA_ERROR': [],
'COBRA_FATAL': [],
'COBRA_WARNING': [],
'SBML_ERROR': [],
'SBML_FATAL': [],
'SBML_SCHEMA_ERROR': [],
'SBML_WARNING': ['E0 (Warning): General SBML conformance (core, L3); RDF ''does not contain valid ModelHistory; LibSBML expected to ''read the annotation into a ModelHistory object. ''Unfortunately, some attributes were not present or correct ''and the resulting ModelHistory object will not correctly ''produce the annotation. This functionality will be ''improved in later versions of libSBML. \n''Reference: L3V1 Section 6.3\n'' An invalid ModelHistory element has been stored.\n',
'E1 (Warning): General SBML conformance (core, L3); RDF ''does not contain valid ModelHistory; LibSBML expected to ''read the annotation into a ModelHistory object. ''Unfortunately, some attributes were not present or correct ''and the resulting ModelHistory object will not correctly ''produce the annotation. This functionality will be ''improved in later versions of libSBML. \n''Reference: L3V1 Section 6.3\n'' An invalid ModelHistory element has been stored.\n']})
And this warning is a result of Human-GEM still being exported with RAVEN from SysBioChalmers/RAVEN#353, as an artifact of not having fully resolved that PR yet. It is also just a warning, so does not preclude loading the model. The latest merge commit from develop to that branch in RAVEN should also already have resolved the issue of this warning.
Yes, after I updated cobrapy to 0.29.0 in my conda environment, there is no error for loading Human-GEM.xml through read_sbml_model. Thank you very much.
Anyway, as mentioned above, MAM01802x (FAD) and MAM01803x (FADH2) in MAR12372 should be removed for Stoichiometric Consistency of Human-GEM. I will fix this right away. However, this reaction has been modified in the develop, and Human-GEM in the main will be consistent when the next version released.
The cause was MAR12372, as found above. It is now balanced, written as a peroxisomal acyl-CoA oxidase (O2 → H2O2), and no longer appears among the imbalanced reactions.
The full MEMOTE suite now gives 100% stoichiometric consistency, both on develop and on the current pull requests.
Every pull request now runs a model quality check that flags any increase in mass- or charge-imbalanced reactions. A reaction like MAR12372 would be caught before merging. The full MEMOTE suite, including the stoichiometric consistency test, can be run on a pull request with /run memote.
Both Human-GEM.xml (cobrapy ≥ 0.29) and Human-GEM.yml load in cobrapy.
Closing; please reopen if you still see this with the current release.
Reopening: my previous comment was wrong. The committed MEMOTE summary shows a test's raw metric, which for this test is 1 when the model is inconsistent. I read its "100%" as a score. The full MEMOTE result of 2026-09-25 (the model on develop plus one reaction) says:
energy-generating cycles found for ATP, CTP, GTP, UTP, ITP, acetyl-CoA and L-glutamate. The tests for NADH, NADPH, FADH2 and FMNH2 pass, and 5 cofactors were skipped.
So Human-GEM is still stoichiometrically inconsistent, and MAR12372 was not the only cause. The summary is being fixed to show scores rather than raw metrics, and to leave out skipped tests. The next step is to find the reactions responsible.
Where the inconsistency comes from, and what is being fixed.
MEMOTE's own check is unreliable on this model. It gave different answers for the same set of reactions depending on the order in which they were added. It also reported a "leak" that relied on fluxes around ±1000 cancelling almost exactly. The analysis below uses exact arithmetic and elemental balance instead.
A real, exact leak. Fifteen reactions with small whole-number fluxes together make H+ from nothing. The only unbalanced reaction among them is MAR20189 ("Reduction of alpha-tocopheryl quinone by Complex III"). It reduced both the quinone and cytochrome c, so electrons appeared from nowhere. PMID:16569397 reports that the quinone is reduced at the Qi site of complex III, where the electrons come from ubiquinol oxidised at the Qo site. The reaction becomes: alpha-tocopheryl quinone + 2 ubiquinol + 2 ferricytochrome c + 2 H+[m] → alpha-tocopheryl hydroquinone + 2 ubiquinone + 2 ferrocytochrome c + 4 H+[i]
How consistency can be shown. If every internal reaction except the artificial pool and biomass reactions is elementally balanced, each metabolite's formula weight is a valid mass, and the model is consistent. With the artificial reactions and the 78 elementally unbalanced internal reactions removed, the model is indeed consistent. So the task is to balance those 78.
Fixed now (78 → 62 unbalanced):
MAR20189, as above.
The thiamine-diphosphate intermediates of the 2-oxo acid dehydrogenases, MAM20077m–MAM20081m, had malformed formulas (listed in Curate remaining metabolite structure, formula and identity inconsistencies #1085). They are recalculated from the E1 reaction that forms them, e.g. MAM20078m C16H25N4O8N4P2S2- → C16H24N4O8P2S. S-propanoyldihydrolipoamide (MAM20082m) had 2 H too many. This balances MAR03800, MAR04599, MAR06416, MAR06419, MAR06421 and MAR20173–MAR20178 without changing their stoichiometry.
The H-protein lipoylation and glycine-cleavage cycle mixed the protein-bound lipoyl forms with free lipoamide, leaving the whole protein unbalanced. The apo H-protein ([protein]-L-lysine) is added as the substrate of octanoyl transfer (MAR06402) and a product of LIPT1 (MAR20168). A protein-bound aminomethyl intermediate replaces the free S-aminomethyldihydrolipoamide in MAR08433/MAR08434. In MAR20168 the E2 lysine that receives the lipoate is represented by NH3, because E2-bound lipoate is modelled as free lipoamide.
Remaining: 58 reactions whose imbalance involves R/X placeholder groups (lipid and acyl pools, protein and glycan placeholders), plus MAR07601, MAR10061, MAR07197 and MAR07282, whose C/H imbalances come from how their placeholder groups are written. MEMOTE still reports the full model as inconsistent after these fixes.
Follow-up to #1099 (glycine cleavage H-protein cycle and LIPT1): #1105 corrects the cross-references and names that did not follow the new reactions.
Cross-references of the glycine cleavage steps.#1099 rewrote MAR08433 and MAR08434 as the P-protein and T-protein half-reactions, but they kept the ids of other steps:
Reaction
Now
BiGG / Recon3D before -> after
MetaNetX
MAR08433
lipoyl-H protein + glycine + H+ -> aminomethyl-dihydrolipoyl-H protein + CO2 (GLDC and GCSH)
GCCam and GCCbim are the BiGG reactions with the same equations (P-protein decarboxylation, T-protein aminomethyl transfer). The old MetaNetX ids belonged to the old BiGG ids and are removed; no replacement was added.
MAM20087m is named "[glycine cleavage system H protein]-L-lysine" instead of the generic "[protein]-L-lysine", and gets CHEBI:29969 (L-lysinium residue). KEGG C02188 was not added because it already stands on other model metabolites.
MAM20082m (free S-propanoyldihydrolipoamide) loses KEGG C21018 and MNXM164758, which describe the protein-bound form.
LIPT1 reaction. MAR20168 was named "MAR20168" and filed under Miscellaneous. It is now "lipoyl transfer from H protein to E2 (LIPT1)" in Lipoic acid metabolism. The equation is unchanged: it still uses NH3 and free lipoamide as stand-ins for the E2 lysine and lipoyl-E2 (RHEA:16413; LIPT1 transfers the lipoyl group from H protein to E2, PMID:29987032). Writing it with protein-bound E2 is left for #1102.
Also left open: MAR08433/MAR08434 are still named "dihydrolipoyl dehydrogenase" and carry EC 1.8.1.4 (with 2.1.2.10); the correct names/ECs would be glycine dehydrogenase (aminomethyl-transferring), EC 1.4.4.2, and aminomethyltransferase, EC 2.1.2.10.
Activity
JHL-452b commentedon Aug 13, 2024
Sorry to see this.
From the release of Human1 to Human-GEM 1.19, the model has changed a lot. Although we have tried to correct the Stoichiometric Consistency in #814 and #813 , it seems to be still failed from the the results you provided. The report shows we got 4410
Unconserved Metabolitesin Human-GEM. It's terrible. We need some time to test what's wrong with Human-GEM. Will get back soon.JonathanRob commentedon Aug 13, 2024
Even though it shows a ton of unconserved metabolites and a very low stoichiometric consistency, it could be as simple as one reaction being unbalanced. I would recommend taking a look at which reactions have changed since the drop in consistency score, and trying find any that may have become mass-unbalanced.
JHL-452b commentedon Aug 13, 2024
Yeah. I will take a look at mass-unbalanced reactions. But I remember that Human-GEM is consistency after #814 and #813 . Perhaps there have been some issues with recent PRs. Anyway, it doesn't look like it will be too hard to resolve.
JHL-452b commentedon Aug 17, 2024
Hi. By checking the unbalanced reactions one by one, I found Human-GEM could be consistent after turn
MAR12372into balance.MAR12372This reaction could be balanced after remove FAD in reactants and FADH2 in products. Although this reaction was already detected in #813 , it was not successfully modified in Human-GEM due to my negligence. It will be curated in a new PR in soon.
Here is the report index.zip
JHL-452b commentedon Aug 17, 2024
Indeed, I did not generate the memote report directly because it would take a long time to run during this check. The
check_stoichiometric_consistencyfunction in memote can be used directly to get the results faster.If we add this code to the check tasks after every PR merge, Human-GEM will not have this problem in the future.
But the current problem with this code is that the Human-GEM.xml cannot be read by cobrapy. It reported the error as below after using
validate_sbml_modelfunction as cobrapy recommend to check model's problem.What did I done is to add prefix of 'M_' for mets id and 'R_' for rxns id in xml format of Human-GEM so that it could be read by cobrapy. I don't know whether this is reasonable, but if it is, we need to modify the code of the model output XML format.
mihai-sysbio commentedon Aug 27, 2024
There is a lot more history regarding the renaming of metabolites and reactions, see SysBioChalmers/RAVEN#353
There is a way to run memote directly on the yml here, thus avoiding the xml issue above.
edkerk commentedon Sep 18, 2024
As shown in the memote workflow referred to in the previous comment, cobrapy can read the
Human-GEM.ymlfile directly withmodel = cobra.io.load_yaml_model("model/Human-GEM.yml").At the same time, on my PC (cobrapy 0.29) there seems no problem with loading the XML file.
validate_sbml_modelonly throws a warning:And this warning is a result of Human-GEM still being exported with RAVEN from SysBioChalmers/RAVEN#353, as an artifact of not having fully resolved that PR yet. It is also just a warning, so does not preclude loading the model. The latest merge commit from
developto that branch in RAVEN should also already have resolved the issue of this warning.JHL-452b commentedon Oct 7, 2024
Yes, after I updated
cobrapyto 0.29.0 in my conda environment, there is no error for loadingHuman-GEM.xmlthroughread_sbml_model. Thank you very much.Anyway, as mentioned above,
MAM01802x(FAD) andMAM01803x(FADH2) inMAR12372should be removed for Stoichiometric Consistency of Human-GEM.I will fix this right away.However, this reaction has been modified in thedevelop, and Human-GEM in themainwill be consistent when the next version released.remove FAD & FADH from MAR12372 in line with SysBioChalmers#837, SysB…
edkerk commentedon Sep 25, 2026
This is resolved in Human-GEM 2.0.0 and later.
/run memote.Human-GEM.xml(cobrapy ≥ 0.29) andHuman-GEM.ymlload in cobrapy.Closing; please reopen if you still see this with the current release.
edkerk commentedon Sep 25, 2026
Reopening: my previous comment was wrong. The committed MEMOTE summary shows a test's raw metric, which for this test is 1 when the model is inconsistent. I read its "100%" as a score. The full MEMOTE result of 2026-09-25 (the model on develop plus one reaction) says:
So Human-GEM is still stoichiometrically inconsistent, and MAR12372 was not the only cause. The summary is being fixed to show scores rather than raw metrics, and to leave out skipped tests. The next step is to find the reactions responsible.
edkerk commentedon Sep 25, 2026
Where the inconsistency comes from, and what is being fixed.
MEMOTE's own check is unreliable on this model. It gave different answers for the same set of reactions depending on the order in which they were added. It also reported a "leak" that relied on fluxes around ±1000 cancelling almost exactly. The analysis below uses exact arithmetic and elemental balance instead.
A real, exact leak. Fifteen reactions with small whole-number fluxes together make H+ from nothing. The only unbalanced reaction among them is MAR20189 ("Reduction of alpha-tocopheryl quinone by Complex III"). It reduced both the quinone and cytochrome c, so electrons appeared from nowhere. PMID:16569397 reports that the quinone is reduced at the Qi site of complex III, where the electrons come from ubiquinol oxidised at the Qo site. The reaction becomes:
alpha-tocopheryl quinone + 2 ubiquinol + 2 ferricytochrome c + 2 H+[m] → alpha-tocopheryl hydroquinone + 2 ubiquinone + 2 ferrocytochrome c + 4 H+[i]How consistency can be shown. If every internal reaction except the artificial pool and biomass reactions is elementally balanced, each metabolite's formula weight is a valid mass, and the model is consistent. With the artificial reactions and the 78 elementally unbalanced internal reactions removed, the model is indeed consistent. So the task is to balance those 78.
Fixed now (78 → 62 unbalanced):
C16H25N4O8N4P2S2-→C16H24N4O8P2S. S-propanoyldihydrolipoamide (MAM20082m) had 2 H too many. This balances MAR03800, MAR04599, MAR06416, MAR06419, MAR06421 and MAR20173–MAR20178 without changing their stoichiometry.[protein]-L-lysine) is added as the substrate of octanoyl transfer (MAR06402) and a product of LIPT1 (MAR20168). A protein-bound aminomethyl intermediate replaces the free S-aminomethyldihydrolipoamide in MAR08433/MAR08434. In MAR20168 the E2 lysine that receives the lipoate is represented by NH3, because E2-bound lipoate is modelled as free lipoamide.Remaining: 58 reactions whose imbalance involves R/X placeholder groups (lipid and acyl pools, protein and glycan placeholders), plus MAR07601, MAR10061, MAR07197 and MAR07282, whose C/H imbalances come from how their placeholder groups are written. MEMOTE still reports the full model as inconsistent after these fixes.
edkerk commentedon Sep 27, 2026
Follow-up to #1099 (glycine cleavage H-protein cycle and LIPT1): #1105 corrects the cross-references and names that did not follow the new reactions.
Cross-references of the glycine cleavage steps. #1099 rewrote MAR08433 and MAR08434 as the P-protein and T-protein half-reactions, but they kept the ids of other steps:
GCCam and GCCbim are the BiGG reactions with the same equations (P-protein decarboxylation, T-protein aminomethyl transfer). The old MetaNetX ids belonged to the old BiGG ids and are removed; no replacement was added.
H-protein metabolites.
metRetired.LIPT1 reaction. MAR20168 was named "MAR20168" and filed under Miscellaneous. It is now "lipoyl transfer from H protein to E2 (LIPT1)" in Lipoic acid metabolism. The equation is unchanged: it still uses NH3 and free lipoamide as stand-ins for the E2 lysine and lipoyl-E2 (RHEA:16413; LIPT1 transfers the lipoyl group from H protein to E2, PMID:29987032). Writing it with protein-bound E2 is left for #1102.
Also left open: MAR08433/MAR08434 are still named "dihydrolipoyl dehydrogenase" and carry EC 1.8.1.4 (with 2.1.2.10); the correct names/ECs would be glycine dehydrogenase (aminomethyl-transferring), EC 1.4.4.2, and aminomethyltransferase, EC 2.1.2.10.
edkerk commentedon Oct 5, 2026
Fixed in Human 2.1.0.