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

Bug detected: model.summary does not match expected phenotype for ecYeastGEM.xml for different carbon sources #368

Open
3 tasks done
Caseses100 opened this issue Mar 18, 2024 · 2 comments
Labels

Comments

@Caseses100
Copy link

Caseses100 commented Mar 18, 2024

Description of the bug:

For my research I'm using the ecYeastGEM model to evaluate what happens to fluxes if I incorporate certain knockouts or gene insertions in S. cerevisiae. As certain knockouts completely stop certain fluxes of the 'central carbon metabolism' I need to run the model in altered media with different carbon sources (i.e. with a medium with altered medium exchanges). To check that this medium alteration step works, I've been running the ecYeastGEM model (without any genetic modifications implemented) on glucose and on ethanol. For glucose, I expect to see a secretion of ethanol and carbon dioxide (crabtree effect). For ethanol, I expect only carbon dioxide. I use the model.summary() to evaluate the model's outputs.

However, I do not get this as outputs.

For growth on glucose, I get a 100% carbon dioxide secretion as output.

Secretion

Metabolite Reaction Flux C-Number C-Flux
s_0458[e] r_1672 -2.413 1 100.00%
s_0776[e] r_1814 -5.578E-06 2 0.00%
s_0805[e] r_2100 -3.92 0 0.00%
s_0450[c] r_2111 -0.08797 0 0.00%

For growth on ethanol, I also get 100% carbon dioxide secretion as output.

Secretion

Metabolite Reaction Flux C-Number C-Flux
s_0458[e] r_1672 -690.5 1 100.00%
s_0776[e] r_1814 -0.002075 2 0.00%
s_0805[e] r_2100 -2241 0 0.00%
s_0450[c] r_2111 -32.11 0 0.00%

Reproducing these results:

# Import relevant libraries
import cobra
from cobra.io import load_model
from cobra.flux_analysis import (
    single_gene_deletion, single_reaction_deletion, double_gene_deletion,
    double_reaction_deletion)
import cobra.flux_analysis.deletion as deletion
from pathlib import Path
from cobra.io import load_json_model, save_json_model, load_matlab_model, save_matlab_model, read_sbml_model, write_sbml_model
import logging
import copy


# Defining correct path to retreive data
data_dir = r"M:\tnw\bt\imb\imb-shared\imb-current\Effie\Modelling work\Yeast-GEM"
print(data_dir)

# Retreive model from XML-based standard format
# From ecYeastGEM_batch xml

model = read_sbml_model(str(data_dir+r"\ecYeastGEM.xml"))

# Find the glucose transport reaction
glucose_transport_reaction = model.reactions.get_by_id("r_1166")

# Print the constraints of the ethanol transport reaction
print("Glucose transport reaction ID:", glucose_transport_reaction.id)
print("Glucose transport reaction lower bound:", glucose_transport_reaction.lower_bound)
print("Glucose transport reaction upper bound:", glucose_transport_reaction.upper_bound)

# Running FBA
solution = model.optimize()
print(solution)

# Analyzing FBA solutions
print(model.summary())

# Now new model with altered medium exchanges
model_new =  read_sbml_model(str(data_dir+r"\ecYeastGEM.xml"))
medium_new = model_new.medium  # Create a copy of the medium

# Switch off glucose exchange
#medium_new["r_1714"] = 0
medium_new["r_1714_REV"] = 0
# Switch on ethanol exchange
medium_new["r_1761"]=1000

# Re-add the medium to the model
model_new.medium = medium_new
print(model_new.medium)

# Find the ethanol transport reaction
ethanol_transport_reaction = model_new.reactions.get_by_id("r_1762")

# Print the constraints of the ethanol transport reaction
print("Ethanol transport reaction ID:", ethanol_transport_reaction.id)
print("Ethanol transport reaction lower bound:", ethanol_transport_reaction.lower_bound)
print("Ethanol transport reaction upper bound:", ethanol_transport_reaction.upper_bound)

# Running FBA
solution2 = model_new.optimize()
print(solution2)

print(model_new.summary())

System information

  • Operating system: Windows
  • Python version: Python 3.8
  • GECKO version: GECKO 3.0
  • Solver: Cobra

I hereby confirm that:

  • My GECKO installation met all requirements.
  • This bug occurs in the main branch of the repository.
  • A similar issue does not already exist.
@Caseses100 Caseses100 added the bug label Mar 18, 2024
@edkerk
Copy link
Member

edkerk commented Mar 18, 2024

Could you please specify (or link) which model file you exactly used?

@Caseses100
Copy link
Author

Caseses100 commented Mar 18, 2024 via email

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

No branches or pull requests

2 participants