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

Models input order affect metabolites flux and biomass. #41

Open
Shlomit840 opened this issue Aug 30, 2023 · 7 comments
Open

Models input order affect metabolites flux and biomass. #41

Shlomit840 opened this issue Aug 30, 2023 · 7 comments

Comments

@Shlomit840
Copy link

Shlomit840 commented Aug 30, 2023

When the order of models input to COBRA and then to COMETS changes, the results are changed.
cobra.io.read_sbml_model(model_1)
cobra.io.read_sbml_model(model_2)
has different results from:
cobra.io.read_sbml_model(model_2)
cobra.io.read_sbml_model(model_1)

Why is that?
How can it be eliminated?
I use
COBRA version 0.22.1
COMETSpy version 0.4.16
Python version 3.9.7

@dukovski
Copy link
Contributor

The order does make difference only if a cell has very low nutrient that will be completely consumed in a single time step. In other words, the first model will take all of the nutrient, so there is none left for the second. We do randomize the order of uptakes, but if your time step size is very high, there will be a difference. Lower the time step and you will lower the effect.

@jeremymchacon
Copy link
Collaborator

@dukovski I'm not sure that's the case anymore, I think by default COMETS does simultaneous updating now with the "two-step" process @djbajic and I put together. @Shlomit840 can you share the rest of your script? Also, is there any chance both models have the same id?

@Shlomit840
Copy link
Author

Hi
I have a folder with 17 different models, in alphabetical order. The script in the attached file shows how I load them.
When we change the models' order, the results are different.
Attached is a comparison plot of one compound, using the different orders. it is clearly different. This is true for all compounds.

comparison
for_git_file_order.txt

@Shlomit840
Copy link
Author

Can you fix the problem?

@dukovski
Copy link
Contributor

Can you fix the problem?

Yes, let me try to work on it this week and I'll get back to you.

@jeremymchacon
Copy link
Collaborator

jeremymchacon commented Sep 19, 2023 via email

@jeremymchacon
Copy link
Collaborator

jeremymchacon commented Sep 19, 2023 via email

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

3 participants