micom-dev / micom

Python package to study microbial communities using metabolic modeling.
https://micom-dev.github.io/micom
Apache License 2.0
82 stars 17 forks source link

Adjust active demands when loading models #56

Closed cdiener closed 2 years ago

cdiener commented 2 years ago

Problem description

Custom models and some models from AGORA have active demand reactions for instance for biotin. This can make MICOM fail due to infeasible models in low nutrient settings.

Code Sample

See https://github.com/micom-dev/media/issues/2 .

Suggested fix

Adjust those demands so that the zero flux solution is included. Raise a warning or info in the logger if that is the case.

nigiord commented 2 years ago

Hi @cdiener,

I encountered the same issue when using AGORA, and I'm glad MICOM will be able to handle it in the future. Thank you for your work!

In fact I thought it was an AGORA bug and wrote an issue there but I never got an answer. I would be happy to have your opinion on this: is it something usual in metabolic models to have those kind of demand reactions (with a lower bound >0) or would you consider it a bug?

To avoid the issue, I forked the AGORA database and set the lower bound of those reactions to 0, but maybe I shouldn't have if they have any biological meaning.

Cheers, Nils

cdiener commented 2 years ago

I wouldn't call it a bug but it makes modeling very complicated. In particular, the particular demand will always be required even if the growth rate is zero which is not intuitive to me. Why should a dead organism have a biotin requirement for instance? So I would personally require those in the biomass function and my argument would be that the newly formed biomass forms a new cell that would have the same demand for the co-factor, thus the co-factor should be part of the biomass reaction. This also fixes the zero growth rate demand. Adding demands is pretty popular because it allows you to fit growth data very well without fixing any of the underlying issues (demands that are hard to model or missing pathways). So I think they mostly make sense if you are modeling one particular growth rate in a specific environment and want to get the best flux estimates.

The AGORA repository and vmh.life don't seem to be maintained but you could contact the Thiele group as they probably know more.

cdiener commented 2 years ago

Fixed in v0.26.0