SysBioChalmers / GECKO

Toolbox for including enzyme constraints on a genome-scale model.
http://sysbiochalmers.github.io/GECKO/
MIT License
67 stars 51 forks source link

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

Open Caseses100 opened 8 months ago

Caseses100 commented 8 months ago

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

I hereby confirm that:

edkerk commented 8 months ago

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

Caseses100 commented 8 months ago

I used the ecYeastGEM.xml model that I retrieved via this link: https://github.com/SysBioChalmers/ecModels/blob/d0e2ebf0c440e81f777b069fd52af037e006ea3d/ecYeastGEM/model/ecYeastGEM.xml

From: Eduard Kerkhoven @.> Sent: maandag 18 maart 2024 10:58 To: SysBioChalmers/GECKO @.> Cc: Effie Leijten @.>; Author @.> Subject: Re: [SysBioChalmers/GECKO] Bug detected: model.summary does not match expected phenotype for ecYeastGEM.xml for different carbon sources (Issue #368)

You don't often get email from @.*** Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification

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

— Reply to this email directly, view it on GitHubhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSysBioChalmers%2FGECKO%2Fissues%2F368%23issuecomment-2003399684&data=05%7C02%7Ce.m.leijten%40tudelft.nl%7Cbf7c9993eb3147179c0d08dc4731e8c3%7C096e524d692940308cd38ab42de0887b%7C0%7C0%7C638463526873917109%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=7n8%2Bqm5L%2FpZzpXTR0MgNz62WQerdUoFi%2FfHHNV9OnMk%3D&reserved=0, or unsubscribehttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FBHB645L6NMFGP5FL43L6Z6LYY23C3AVCNFSM6AAAAABE3HAY62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBTGM4TSNRYGQ&data=05%7C02%7Ce.m.leijten%40tudelft.nl%7Cbf7c9993eb3147179c0d08dc4731e8c3%7C096e524d692940308cd38ab42de0887b%7C0%7C0%7C638463526873917109%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=OKO1HX3ZWgBDGxZXhX%2FouLsBB8giy18jkNe2SjhsK%2Fs%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>