Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sign changes when performing EFM analysis on network with fixed-direction reactions #13

Closed
danolson1 opened this issue Feb 28, 2020 · 2 comments

Comments

@danolson1
Copy link

Describe the bug
When I run a model where all of the fluxes are constrained to be either positive or negative (i.e. bounds from -1000 to 0, or 0 to 1000, but not -1000 to 1000), the fluxes constrained to be negative show up as positive values.

To Reproduce
Create a model and set some bounds to -1000 to 0, and some to 0 to 1000.

Expected behavior
I would expect fluxes that are constrained to -1000 to 0 to have negative fluxes in the elementary mode solution. Note, if I set my flux bounds as -1000 to 1000, the fluxes have the correct signs.

Screenshots
n/a

Additional context
I'm using cobamp version 0.1.5. I'd be happy to share my Jupyter Notebook if you want to see how to reproduce it.

@vvvieira
Copy link
Collaborator

Hello @danolson1. Thanks for pointing this out.

I think this is a problem concerning the behaviour of the IrreversibleLinearSystem class. When the bounds are preprocessed, reactions with upper bound below 0 have their stoichiometric coefficients inversed. This results in the behaviour you have just specified (reactions carrying flux strictly in the backwards sense appear with positive flux).

You're right in saying this is indeed misleading. I will address this in the next release but I am 99.99% sure the results themselves can be trusted, as long as you either make all reactions reversible or with bounds such as 0-1000. Alternatively, you can also identify backwards irreversible reactions and flip the resulting fluxes.

Nevertheless, this will be changed in the future!

Please let me know if you have any further questions!

@danolson1
Copy link
Author

Thanks. Yeah, it's not a huge problem (since we know the correct flux direction, which was used as an input to change the reaction bounds), but simplifies the subsequent analysis.

I'm using this for the Metabolic Engineering course I'm teaching. I recently switched from Matlab to Python, so I also switched from using EFMtool to cobamp. So far it works great. Thanks for making the library.

-Dan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants