Simulate models

cameo uses and extends the model data structures defined by cobrapy, our favorite COnstraints-Based Reconstruction and Analysis tool for Python. cameo is thus 100% compatible with cobrapy. For efficiency reasons, however, cameo implements its own simulation methods that take advantage of a more advanced solver interface.

Primer: Constraint-Based Modeling

Constraint-based modeling is a powerful modeling framework for analyzing metabolism on the genome scale (McCloskey et al., 2013). For a model that encompasses n reactions that involve m metabolites, S is a matrix of dimension m×n that encodes the stoichiometry of the metabolic reaction system; it is usually referred to as stoichiometric matrix. Assuming that the system is in a steady state—the concentration of metabolites are constant—the system of flux-balances can be formulated as

Sv=0,

where v is the vector of flux rates. With the addition of a biologically meaningful objective, flux capacity constraints, information about the reversibility of reactions under physiological conditions, an optimization problem can be formulated that can easily be solved using linear programming.

, e.g., maximimization of biomass production,Given the maximization of growth rate as one potential biological objective vbiomass, i.e., the flux of an artificial reaction that consumes biomass components in empirically determined proportions, and assuming that the cell is evolutionary optimized to achieve that objective, and incorporating knowledge about reaction reversibility, uptake and secretion rates, and maximum flux capacities in the form of lower and uppers bounds (vlb and vub) on the flux variables v, one can formulate and solve an optimization problem to identify an optimal set of flux rates using flux balance analysis (FBA):

Max  Zobj=cTvs.t.  Sv=0  vlbvvub.

Flux Balance Analysis

Load a model.

from cameo import load_model
model = load_model('iJO1366')

In cameo, flux balance analysis can be performed with the function fba.

from cameo import fba
%time fba_result = fba(model)
CPU times: user 348 ms, sys: 5.36 ms, total: 353 ms
Wall time: 378 ms

Basically, fba calls model.solve() and wraps the optimization solution in a FluxDistributionResult object. The maximum objective values (corresponding to a maximum growth rate) can obtained throug result.objective_value.

fba_result.data_frame
flux
DM_4crsol_c 0.000219
DM_5drib_c 0.000221
DM_aacald_c 0.000000
DM_amob_c 0.000002
DM_mththf_c 0.000440
DM_oxam_c 0.000000
BIOMASS_Ec_iJO1366_WT_53p95M 0.000000
... ...
XYLt2pp 0.000000
XYLtex 0.000000
ZN2abcpp 0.000000
ZN2t3pp 0.000000
ZN2tpp 0.000335
ZNabcpp 0.000000
Zn2tex 0.000335

2583 rows × 1 columns

Flux distributions can be visualized using *escher* :

fba_result.display_on_map("iJO1366.Central metabolism")
Malate dehydrogenaseMDH 4.83Nitrite Reductase (Ubiquinole-8, periplasm)NTRIR3pp (nd)3223NADPH Quinone Reductase (2-Demethylmenaquinone-8)NADPHQR4 (nd)NADH dehydrogenase (menaquinone-8 & 3 protons) (periplasm)NADH17pp (nd)43L-malate transport out via proton antiport (periplasm)MALt3pp (nd)D-lactate transport via proton symport (periplasm)D_LACt2pp (nd)Glucose-1-phosphataseG1PPpp (nd)Trans-aconitate methyltransferaseACONMT (nd)Acetaldehyde transport via diffusion (extracellular to periplasm)ACALDtex (nd)Glycolate oxidaseGLYCTO3 (nd)Aconitate isomerase (spontaneous)ACONIs (nd)Cytochrome oxidase bd (menaquinol-8: 2 protons) (periplasm)CYTBD2pp (nd)20.52Phosphoenolpyruvate carboxylasePPC 2.91Fructose 6-phosphate transport via diffusion (extracellular to periplasm)F6Ptex (nd)Malate synthaseMALS 0.000657Hydrogenase (Demethylmenaquinone-8: 2 protons) (periplasm)HYD3pp (nd)22Sedoheptulose 1,7-bisphosphate D-glyceraldehyde-3-phosphate-lyaseFBA3 (nd)Ethanol reversible transport via diffusion (periplasm)ETOHtrpp (nd)Cytochrome oxidase bd (ubiquinol-8: 2 protons) (periplasm)CYTBDpp (nd)20.52Fumarate transport via proton symport (2 H) (periplasm)FUMt2_2pp (nd)22Glycogen phosphorylaseGLCP (nd)Nitrate reductase (Menaquinol-8) (periplasm)NO3R2bpp (nd)NADH dehydrogenase (demethylmenaquinone-8 & 3 protons) (periplasm)NADH18pp (nd)43DsbA protein reoxidation reaction (aerobic)DSBAO1 (nd)Trimethylamine N-oxide reductase (demethylmenaquinol 8) (periplasm)TMAOR2pp (nd)Citrate synthaseCS 4.86Glucose-1-phosphate adenylyltransferaseGLGC (nd)Glycerol transport via channel (periplasm)GLYCtpp (nd)Glycolate oxidaseGLYCTO4 0.000657Glucose-6-phosphate isomerasePGI 5.92Glycerol transport via diffusion (extracellular to periplasm)GLYCtex (nd)Quinol monooxygenase (menaquinol 8)QMO3 (nd)222Hydroxyacylglutathione hydrolaseGLYOX (nd)Phosphoglycerate kinasePGK -16.3Fumarate transport via diffusion (extracellular to periplasm)FUMtex (nd)CatalaseCAT (nd)22Ethanol transport via diffusion (extracellular to periplasm)ETOHtex (nd)Hydrogen transport diffusion (periplasm)H2tpp (nd)Superoxide dismutaseSPODMpp (nd)22Glycerol-3-phosphate dehydrogenase (ubiquinone-8)G3PD5 (nd)PhosphoglucomutasePGMT (nd)Glucose 6-phosphate dehydrogenaseG6PDH2r 4.08Acetyl-CoA synthetaseACS 0.572Glycerol kinaseGLYK (nd)2-oxoglutarate reversible transport via symport (periplasm)AKGt2rpp (nd)Malate transport via proton symport (2 H) (periplasm)MALt2_2pp (nd)226-phosphogluconolactonasePGL 4.08(R)-Propane-1,2-diol facilitated transport (periplasm)12PPDRtpp (nd)Dimethyl sulfoxide transport via diffusion (periplasm)DMSOtpp (nd)ATP synthase (four protons for one ATP) (periplasm)ATPS4rpp 55.843NADH dehydrogenase (ubiquinone-8 & 3 protons) (periplasm)NADH16pp 31.043Acetate kinaseACKr (nd)Glycogen debranching enzyme (bglycogen -> glycogen)GLDBRAN2 (nd)Ribose-5-phosphate isomeraseRPI -2.08D-xylose transport in via proton symport (periplasm)XYLt2pp (nd)D-glucose 1-phosphate transport via diffusionG1Ptex (nd)Malate transport via diffusion (extracellular to periplasm)MALtex (nd)Cytochrome oxidase bo3 (ubiquinol-8: 4 protons) (periplasm)CYTBO3_4pp 35.10.544Dimethyl sulfoxide reductase (Menaquinol 8) (periplasm)DMSOR1pp (nd)D-fructose transport via PEP:Pyr PTS (periplasm)FRUptspp (nd)Polyphosphate kinasePPK2r (nd)L-Lactate dehydrogenase (ubiquinone)L_LACD2 (nd)Pyruvate kinasePYK (nd)Quinol monooxygenase (Ubiquinol-8)QMO2 (nd)222L-lactate reversible transport via proton symport (periplasm)L_LACt2rpp (nd)NADH dehydrogenase (menaquinone-8 & 0 protons)NADH10 (nd)Glycerol dehydrogenaseGLYCDx (nd)Malate transport via proton symport (3 H) (periplasm)MALt2_3pp (nd)33Dihydroxyacetone phosphotransferaseDHAPT 0.865CO2 transport via diffusion (extracellular to periplasm)CO2tex -19.7Nitrate reductase (Ubiquinol-8)NO3R1bpp (nd)DsbA protein reoxidation reaction (anaerobic)DSBAO2 (nd)Sn-Glycerol 3-phosphate transport via ABC system (periplasm)GLYC3Pabcpp (nd)Phosphoenolpyruvate carboxykinasePPCK (nd)L-lactate transport via diffusion (extracellular to periplasm)L_LACtex (nd)Pyruvate dehydrogenasePDH 7.97Malic enzyme (NADP)ME2 (nd)Acetaldehyde reversible transport (periplasm)ACALDtpp (nd)D-fructose transport via diffusion (extracellular to periplasm)FRUtex (nd)D-xylose transport via ABC system (periplasm)XYLabcpp (nd)Fumarate reductaseFRD3 0.000657Inorganic triphosphatasePPA2 (nd)Acetate reversible transport via proton symport (periplasm)ACt2rpp -0.00511Hydrogenase (menaquinone8: 2 protons) (periplasm)HYD2pp (nd)22Pyruvate oxidasePOX (nd)NADPH Quinone Reductase (Ubiquinone-8)NADPHQR2 (nd)Aconitase (half-reaction B, Isocitrate hydro-lyase)ACONTb 4.86Citrate transport via diffusion (extracellular to periplasm)CITtex (nd)D-ribose transport via ABC system (periplasm)RIBabcpp (nd)FumaraseFUM 4.832-dehydro-3-deoxy-phosphogluconate aldolaseEDA (nd)Pyruvate formate lyasePFL (nd)Inorganic diphosphatasePPA (nd)2Nitrate reductase (Ubiquinol-8) (periplasm)NO3R1pp (nd)22Glycogen phosphorylaseGLCP2 (nd)Trimethylamine N-oxide reductase (menaquinol 8) (periplasm)TMAOR1pp (nd)NADH dehydrogenase (ubiquinone-8 )NADH5 (nd)D-lactate dehydrogenaseLDH_D (nd)Lacaldehyde reductase (R-propane-1,2-diol forming)LCARR (nd)Phosphoglycerate mutasePGM -14.6Ribulose 5-phosphate 3-epimeraseRPE 1.96Fumarate reductaseFRD2 (nd)NADPH Quinone Reductase (Menaquinone-8)NADPHQR3 (nd)Glycerol-3-phosphate transport via diffusion (extracellular to periplasm)GLYC3Ptex (nd)Phosphoenolpyruvate synthasePPS (nd)21,4-alpha-glucan branching enzyme (glycogen -> bglycogen)GLBRAN2 (nd)Glycerol-3-phosphate dehydrogenase (demethylmenaquinone-8)G3PD7 (nd)D-glucose transport via PEP:Pyr PTS (periplasm)GLCptspp 10.0Trimethylamine N-oxide reductase (demethylmenaquinol 8)TMAOR2 (nd)Formate Dehydrogenase (menaquinone-8) (periplasm)FDH5pp (nd)2Superoxide dismutaseSPODM (nd)22Succinate transport via proton symport (2 H) (periplasm)SUCCt2_2pp (nd)22Succintate transport via proton symport (3 H) (periplasm)SUCCt2_3pp (nd)33Fructose-bisphosphataseFBP (nd)Hydrogenase (ubiquinone-8: 2 protons) (periplasm)HYD1pp (nd)22Triose-phosphate isomeraseTPI 7.65(R)-Propane-1,2-diol transport via diffusion (extracellular to periplasm)12PPDRtex (nd)Isocitrate lyaseICL (nd)Isocitrate dehydrogenase (NADP)ICDHyr 4.86D-lactate transport via diffusion (extracellular to periplasm)D_LACtex (nd)Malate dehydrogenase (menaquinone 8 as acceptor)MDH3 (nd)Formate transport via diffusion (extracellular to periplasm)FORtex (nd)EnolaseENO 14.6L-Lactate dehydrogenase (menaquinone)L_LACD3 (nd)Glycerol-3-phosphataseG3PT (nd)Glucose dehydrogenase (ubiquinone-8 as acceptor) (periplasm)GLCDpp (nd)D-glucose transport in via proton symport (periplasm)GLCt2pp (nd)RibokinaseRBK (nd)PhosphotransacetylasePTAr (nd)Glyceraldehyde-3-phosphate dehydrogenaseGAPD 16.3Citrate transport out via proton antiport (periplasm)CITt3pp (nd)Succinyl-CoA synthetase (ADP-forming)SUCOAS -3.29Hydrogen transport via diffusion (extracellular to periplasm)H2tex (nd)Aconitase (half-reaction A, Citrate hydro-lyase)ACONTa 4.86PhosphofructokinasePFK 6.92D-Lactaldehyde:NAD+ 1-oxidoreductaseLALDO2x (nd)Acetate transport via diffusion (extracellular to periplasm)ACtex (nd)ATP maintenance requirementATPM 3.15Phosphofructokinase (s7p)PFK_3 (nd)Methylglyoxal synthaseMGSA (nd)NADH dehydrogenase (demethylmenaquinone-8 & 0 protons)NADH9 (nd)Fructose-6-phosphate transport via phosphate antiport (periplasm)F6Pt6_2pp (nd)22Nitrite Reductase (NADH)NTRIR2x (nd)3532Citrate transport via succinate antiport (periplasm)CITt7pp (nd)Fructose 6-phosphate aldolaseF6PA 0.865Malate dehydrogenase (ubiquinone 8 as acceptor)MDH2 (nd)Glycerol-3-phosphate : phosphate antiporter (periplasm)GLYC3Pt6pp (nd)Pyruvate reversible transport via proton symport (periplasm)PYRt2rpp (nd)Glycolate oxidaseGLYCTO2 (nd)TransketolaseTKT1 1.17NAD(P) transhydrogenase (periplasm)THD2pp (nd)22Succinate transport out via proton antiport (periplasm)SUCCt3pp (nd)Polyphosphate kinasePPKr -4.01Alcohol dehydrogenase (ethanol)ALCD2x (nd)Succinate transport via diffusion (extracellular to periplasm)SUCCtex (nd)Dimethyl sulfoxide reductase (Demethylmenaquinol 8)DMSOR2 (nd)Aldehyde dehydrogenase (acetaldehyde, NAD)ALDD2x (nd)2Glycerol-3-phosphate dehydrogenase (NADP)G3PD2 -0.137Xylose isomeraseXYLI1 (nd)Nitrite Reductase (Menaquinole-8, periplasm)NTRIR4pp (nd)2332Citrate lyaseCITL (nd)Formate transport via proton symport (uptake only, periplasm)FORt2pp (nd)Glucose transport via diffusion (extracellular to periplasm)GLCtex_copy1 10.0Pyruvate transport via diffusion (extracellular to periplasm)PYRtex (nd)Succinate dehydrogenase (irreversible)SUCDi 3.80Formate transport via diffusion (cytoplasm to periplasm)FORtppi (nd)TransaldolaseTALA 1.17TransketolaseTKT2 0.792D-xylose transport via diffusion (extracellular to periplasm)XYLtex (nd)2-Oxogluterate dehydrogenaseAKGDH 3.80Alpha-ketoglutarate transport via diffusion (extracellular to periplasm)AKGtex (nd)Nitrate reductase (Menaquinol-8) (periplasm)NO3R2pp (nd)22Lactoylglutathione lyaseLGTHL (nd)Aldehyde dehydrogenase (acetaldehyde, NADP)ALDD2y (nd)26-phosphogluconate dehydrataseEDD (nd)Fructose-1-phosphate kinaseFRUK (nd)Formate dehydrogenase (quinone-8) (periplasm)FDH4pp (nd)2Malate oxidaseMOX 0.00160CO2 transporter via diffusion (periplasm)CO2tpp -19.7Malic enzyme (NAD)ME1 (nd)XylulokinaseXYLK (nd)Glucose-6-phosphate transport via phosphate antiport (periplasm)G6Pt6_2pp (nd)22NAD transhydrogenaseNADTRHD (nd)Glycerol-3-phosphate dehydrogenase (menaquinone-8)G3PD6 (nd)Phosphogluconate dehydrogenaseGND 4.08Hexokinase (D-glucose:ATP)HEX1 (nd)Dimethyl sulfoxide reductase (Menaquinol 8)DMSOR1 (nd)Fumarate transport via proton symport (3 H) (periplasm)FUMt2_3pp (nd)33Trimethylamine N-oxide reductase (menaquinol 8)TMAOR1 (nd)Fructose-bisphosphate aldolaseFBA 6.92Glucose-6-phosphate phosphataseG6PP (nd)Ribose transport via diffusion (extracellular to periplasm)RIBtex (nd)Fructose transport via PEP:Pyr PTS (f6p generating) (periplasm)FRUpts2pp (nd)Acetaldehyde dehydrogenase (acetylating)ACALD (nd)HCO3 equilibration reactionHCO3E 0.517Formate-hydrogen lyaseFHL (nd)Glycogen synthase (ADPGlc)GLCS1 (nd)Glucose 6-phosphate transport via diffusion (extracellular to periplasm)G6Ptex (nd)Oxaloacetate decarboxylaseOAADC (nd)Dimethyl sulfoxide reductase (Demethylmenaquinol 8) (periplasm)DMSOR2pp (nd)D-lactate dehydrogenaseLDH_D2 (nd)D-lactate dehydrogenaseLDH_D2 (nd)L-Lactate dehydrogenase (ubiquinone)L_LACD2 (nd)D-glucose transport via PEP:Pyr PTS (periplasm)GLCptspp 10.0L-Lactate dehydrogenase (menaquinone)L_LACD3 (nd)mal__L_cL-Malatenad_cNicotinamide adenine dinucleotidenadh_cNicotinamide adenine dinucleotide - reducedh_cH+oaa_cOxaloacetateq8h2_cUbiquinol-8no2_pNitriteh_pH+h2o_pH2Oq8_cUbiquinone-8nh4_pAmmonium2dmmq8_c2-Demethylmenaquinone 8h_cH+nadph_cNicotinamide adenine dinucleotide phosphate - reduced2dmmql8_c2-Demethylmenaquinol 8nadp_cNicotinamide adenine dinucleotide phosphatenadh_cNicotinamide adenine dinucleotide - reducedh_cH+mqn8_cMenaquinone 8nad_cNicotinamide adenine dinucleotideh_pH+mql8_cMenaquinol 8h_pH+h_cH+mal__L_pL-Malatelac__D_pD-Lactateh_pH+lac__D_cD-Lactateh_cH+g1p_pD-Glucose 1-phosphateh2o_pH2Opi_pPhosphateglc__D_pD-Glucoseacon_T_cTrans-Aconitateamet_cS-Adenosyl-L-methionineahcys_cS-Adenosyl-L-homocysteineaconm_cE-3-carboxy-2-pentenedioate 6-methyl esteracald_eAcetaldehydeacald_pAcetaldehydeglyclt_cGlycolateglx_cGlyoxylateacon_C_cCis-Aconitateh_cH+o2_cO2h2o_cH2Oh_pH+pep_cPhosphoenolpyruvateh2o_cH2Oco2_cCO2h_cH+pi_cPhosphatef6p_eD-Fructose 6-phosphatef6p_pD-Fructose 6-phosphateh2o_cH2Oaccoa_cAcetyl-CoAglx_cGlyoxylateh_cH+coa_cCoenzyme Ah2_cH2h_cH+h_pH+s17bp_cSedoheptulose 1,7-bisphosphatee4p_cD-Erythrose 4-phosphatedhap_cDihydroxyacetone phosphateetoh_pEthanoletoh_cEthanolh_cH+o2_cO2h2o_cH2Oh_pH+h_pH+fum_pFumarateh_cH+fum_cFumaratepi_cPhosphateglycogen_cGlycogeng1p_cD-Glucose 1-phosphateno3_pNitrateno2_pNitriteh2o_pH2Oh_cH+nadh_cNicotinamide adenine dinucleotide - reducedh_pH+nad_cNicotinamide adenine dinucleotidedsbard_pPeriplasmic protein disulfide isomerase I (reduced)dsbaox_pPeriplasmic protein disulfide isomerase I (oxidized)tmao_pTrimethylamine N-oxideh_pH+h2o_pH2Otma_pTrimethylamineaccoa_cAcetyl-CoAh2o_cH2Ocit_cCitrateh_cH+coa_cCoenzyme Aatp_cATPh_cH+ppi_cDiphosphateadpglc_cADPglucoseglyc_cGlycerolglyc_pGlycerolglyclt_cGlycolateglx_cGlyoxylateg6p_cD-Glucose 6-phosphatef6p_cD-Fructose 6-phosphateglyc_eGlycerolo2_cO2h_cH+o2s_cSuperoxide anionh2o_cH2Olgt__S_c(R)-S-Lactoylglutathioneh_cH+gthrd_cReduced glutathioneatp_cATP3pg_c3-Phospho-D-glycerateadp_cADP13dpg_c3-Phospho-D-glyceroyl phosphatefum_eFumarateh2o2_cHydrogen peroxideh2o_cH2Oo2_cO2etoh_eEthanolh2_pH2h2_cH2h_pH+o2s_pSuperoxide anionh2o2_pHydrogen peroxideo2_pO2glyc3p_cGlycerol 3-phosphatedhap_cDihydroxyacetone phosphatenadp_cNicotinamide adenine dinucleotide phosphatenadph_cNicotinamide adenine dinucleotide phosphate - reduced6pgl_c6-phospho-D-glucono-1,5-lactoneh_cH+ac_cAcetateatp_cATPcoa_cCoenzyme Aamp_cAMPppi_cDiphosphateatp_cATPh_cH+glyc3p_cGlycerol 3-phosphateadp_cADPh_pH+akg_p2-Oxoglutarateh_cH+akg_c2-Oxoglutarateh_pH+h_cH+h2o_cH2O6pgc_c6-Phospho-D-gluconateh_cH+12ppd__R_p(R)-Propane-1,2-diol12ppd__R_c(R)-Propane-1,2-dioldmso_pDimethyl sulfoxidedmso_cDimethyl sulfoxideh_pH+adp_cADPpi_cPhosphateh_cH+atp_cATPh2o_cH2Onadh_cNicotinamide adenine dinucleotide - reducedh_cH+nad_cNicotinamide adenine dinucleotideh_pH+atp_cATPadp_cADPactp_cAcetyl phosphatebglycogen_cBranching glycogenr5p_cAlpha-D-Ribose 5-phosphateru5p__D_cD-Ribulose 5-phosphateh_pH+xyl__D_pD-Xylosexyl__D_cD-Xyloseh_cH+g1p_eD-Glucose 1-phosphatemal__L_eL-Malateo2_cO2h_cH+h2o_cH2Oh_pH+dmso_pDimethyl sulfoxideh2o_pH2Odms_pDimethyl sulfidepep_cPhosphoenolpyruvatefru_pD-Fructosef1p_cD-Fructose 1-phosphatepyr_cPyruvateatp_cATPppi_cDiphosphatepppi_cInorganic triphosphateadp_cADPlac__L_cL-Lactateq8_cUbiquinone-8q8h2_cUbiquinol-8adp_cADPh_cH+atp_cATPo2_cO2o2s_cSuperoxide anionh_cH+h_pH+lac__L_pL-Lactateh_cH+nadh_cNicotinamide adenine dinucleotide - reducedh_cH+nad_cNicotinamide adenine dinucleotidenad_cNicotinamide adenine dinucleotidedha_cDihydroxyacetonenadh_cNicotinamide adenine dinucleotide - reducedh_cH+h_pH+h_cH+pep_cPhosphoenolpyruvatepyr_cPyruvateco2_eCO2co2_pCO2no3_pNitrateh2o_pH2Ono2_pNitritedsbard_pPeriplasmic protein disulfide isomerase I (reduced)dsbaox_pPeriplasmic protein disulfide isomerase I (oxidized)h2o_cH2Oglyc3p_pGlycerol 3-phosphateatp_cATPh_cH+pi_cPhosphateadp_cADPatp_cATPco2_cCO2adp_cADPlac__L_eL-Lactatenad_cNicotinamide adenine dinucleotidecoa_cCoenzyme Anadh_cNicotinamide adenine dinucleotide - reducedco2_cCO2nadp_cNicotinamide adenine dinucleotide phosphateco2_cCO2nadph_cNicotinamide adenine dinucleotide phosphate - reducedacald_cAcetaldehydefru_eD-Fructoseh2o_cH2Oatp_cATPadp_cADPpi_cPhosphateh_cH+2dmmql8_c2-Demethylmenaquinol 8succ_cSuccinate2dmmq8_c2-Demethylmenaquinone 8h2o_cH2Oh_cH+pi_cPhosphateh_pH+ac_pAcetateh_cH+h2_cH2h_cH+h_pH+pyr_cPyruvateh2o_cH2Oco2_cCO2ac_cAcetatenadph_cNicotinamide adenine dinucleotide phosphate - reducedh_cH+nadp_cNicotinamide adenine dinucleotide phosphateh2o_cH2Oicit_cIsocitratecit_eCitratecit_pCitraterib__D_pD-Riboseh2o_cH2Oatp_cATPpi_cPhosphateadp_cADPrib__D_cD-Riboseh_cH+h2o_cH2O2ddg6p_c2-Dehydro-3-deoxy-D-gluconate 6-phosphateg3p_cGlyceraldehyde 3-phosphatecoa_cCoenzyme Afor_cFormateh2o_cH2Oh_cH+pi_cPhosphateno3_cNitrateh_cH+h_pH+no2_cNitriteh2o_cH2Opi_cPhosphateh_pH+tmao_pTrimethylamine N-oxidetma_pTrimethylamineh2o_pH2Onadh_cNicotinamide adenine dinucleotide - reducedh_cH+nad_cNicotinamide adenine dinucleotidenad_cNicotinamide adenine dinucleotideh_cH+nadh_cNicotinamide adenine dinucleotide - reducedh_cH+nadh_cNicotinamide adenine dinucleotide - reducedlald__D_cD-Lactaldehydenad_cNicotinamide adenine dinucleotide2pg_cD-Glycerate 2-phosphatexu5p__D_cD-Xylulose 5-phosphatemql8_cMenaquinol 8mqn8_cMenaquinone 8nadph_cNicotinamide adenine dinucleotide phosphate - reducedh_cH+nadp_cNicotinamide adenine dinucleotide phosphateglyc3p_eGlycerol 3-phosphateatp_cATPh2o_cH2Oamp_cAMPpi_cPhosphateh_cH+glyc3p_cGlycerol 3-phosphatedhap_cDihydroxyacetone phosphatepep_cPhosphoenolpyruvatepyr_cPyruvatetmao_cTrimethylamine N-oxideh_cH+h2o_cH2Otma_cTrimethylaminefor_pFormateh_cH+co2_pCO2h_pH+o2s_cSuperoxide anionh_cH+h2o2_cHydrogen peroxideo2_cO2succ_pSuccinateh_pH+h_cH+h_pH+h_cH+fdp_cD-Fructose 1,6-bisphosphateh2o_cH2Opi_cPhosphateh2_cH2h_cH+h_pH+12ppd__R_e(R)-Propane-1,2-diolnadp_cNicotinamide adenine dinucleotide phosphateco2_cCO2nadph_cNicotinamide adenine dinucleotide phosphate - reducedlac__D_eD-Lactatemqn8_cMenaquinone 8mql8_cMenaquinol 8for_eFormatefor_pFormateh2o_cH2Oh2o_cH2Opi_cPhosphateglc__D_pD-Glucoseh2o_pH2Oh_pH+glcn_pD-Gluconateh_pH+h_cH+glc__D_cD-Glucoseatp_cATPadp_cADPh_cH+pi_cPhosphatecoa_cCoenzyme Api_cPhosphatenad_cNicotinamide adenine dinucleotideh_cH+nadh_cNicotinamide adenine dinucleotide - reducedh_pH+h_cH+coa_cCoenzyme Aatp_cATPpi_cPhosphatesuccoa_cSuccinyl-CoAadp_cADPh2_eH2atp_cATPadp_cADPh_cH+nadh_cNicotinamide adenine dinucleotide - reducedh_cH+mthgxl_cMethylglyoxalnad_cNicotinamide adenine dinucleotideac_eAcetateatp_cATPh2o_cH2Oadp_cADPh_cH+pi_cPhosphateatp_cATPs7p_cSedoheptulose 7-phosphateadp_cADPh_cH+pi_cPhosphatenadh_cNicotinamide adenine dinucleotide - reducedh_cH+nad_cNicotinamide adenine dinucleotidepi_cPhosphatepi_pPhosphatenadh_cNicotinamide adenine dinucleotide - reducedh_cH+no2_cNitritenad_cNicotinamide adenine dinucleotidenh4_cAmmoniumh2o_cH2Olac__L_cL-Lactatepyr_cPyruvatesucc_cSuccinatesucc_pSuccinateq8_cUbiquinone-8q8h2_cUbiquinol-8pi_cPhosphatepi_pPhosphateh_pH+pyr_pPyruvateh_cH+glyclt_cGlycolateglx_cGlyoxylateh_pH+nadh_cNicotinamide adenine dinucleotide - reducednadp_cNicotinamide adenine dinucleotide phosphateh_cH+nad_cNicotinamide adenine dinucleotidenadph_cNicotinamide adenine dinucleotide phosphate - reducedh_pH+h_cH+atp_cATPadp_cADPnad_cNicotinamide adenine dinucleotideh_cH+nadh_cNicotinamide adenine dinucleotide - reducedsucc_eSuccinateh2o_cH2Odms_cDimethyl sulfidenad_cNicotinamide adenine dinucleotideh2o_cH2Onadh_cNicotinamide adenine dinucleotide - reducedh_cH+nadp_cNicotinamide adenine dinucleotide phosphateh_cH+nadph_cNicotinamide adenine dinucleotide phosphate - reducedxylu__D_cD-Xyluloseh_pH+no2_pNitritenh4_pAmmoniumh2o_pH2Oac_cAcetateh_pH+h_cH+glc__D_eD-Glucosepyr_ePyruvateq8_cUbiquinone-8q8h2_cUbiquinol-8xyl__D_eD-Xylosenad_cNicotinamide adenine dinucleotidecoa_cCoenzyme Anadh_cNicotinamide adenine dinucleotide - reducedco2_cCO2akg_e2-Oxoglutarateh_cH+no3_cNitrateh_pH+no2_cNitriteh2o_cH2Onadp_cNicotinamide adenine dinucleotide phosphateh2o_cH2Onadph_cNicotinamide adenine dinucleotide phosphate - reducedh_cH+h2o_cH2Oatp_cATPh_cH+adp_cADPh_cH+for_pFormateco2_pCO2h_pH+o2_cO2h2o2_cHydrogen peroxideco2_cCO2nad_cNicotinamide adenine dinucleotidenadh_cNicotinamide adenine dinucleotide - reducedco2_cCO2atp_cATPh_cH+adp_cADPpi_cPhosphateg6p_pD-Glucose 6-phosphatepi_pPhosphateglyc3p_cGlycerol 3-phosphatedhap_cDihydroxyacetone phosphatenadp_cNicotinamide adenine dinucleotide phosphatenadph_cNicotinamide adenine dinucleotide phosphate - reducedco2_cCO2atp_cATPadp_cADPh_cH+dmso_cDimethyl sulfoxidedms_cDimethyl sulfideh2o_cH2Oh_pH+h_cH+tmao_cTrimethylamine N-oxideh_cH+h2o_cH2Otma_cTrimethylamineh2o_cH2Opi_cPhosphaterib__D_eD-Ribosepep_cPhosphoenolpyruvatepyr_cPyruvatenad_cNicotinamide adenine dinucleotidecoa_cCoenzyme Ah_cH+nadh_cNicotinamide adenine dinucleotide - reducedco2_cCO2h2o_cH2Oh_cH+hco3_cBicarbonateh_cH+co2_cCO2h_cH+adp_cADPg6p_eD-Glucose 6-phosphateh_cH+co2_cCO2h2o_pH2Odms_pDimethyl sulfidepyr_cPyruvatelac__D_cD-Lactateq8h2_cUbiquinol-8q8_cUbiquinone-8pyr_cPyruvatelac__L_cL-Lactateglc__D_pD-Glucoseg6p_cD-Glucose 6-phosphatemqn8_cMenaquinone 8pyr_cPyruvatemql8_cMenaquinol 8Nitrite ReductaseTranshydrogenaseCarbonateMenaquinone Reduction/OxidationATPSynthaseDemethylmenaquinone Reduction/OxidationUbiquinone Reduction/OxidationATP MaintenanceOxidative Stress
Drawing ...

Parsimonious Flux Balance Analysis

Parsimonious flux balance analysis (Lewis et al., 2010), a variant of FBA, performs FBA in in a first step to determine the maximum objective value Zobj, fixes it in form of an additional model constraint (cTvZobj), and then minimizes in a second optimization the L1 norm of v. The assumption behind pFBA is that cells try to minimize flux magnitude as well in order to keep protein costs low.

Max  |v|s.t.  Sv=0 cTvZobj  vlbvvub.

In cameo, pFBA can be performed with the function pfba.

from cameo import pfba
%time pfba_result = pfba(model)
CPU times: user 382 ms, sys: 15.3 ms, total: 398 ms
Wall time: 494 ms

The objective_function value is |v|

pfba_result.objective_value
699.0222751839442

… which is smaller than flux vector of the original FBA solution.

abs(fba_result.data_frame.flux).sum()
701.81777502444379

Setp 2: Simulate knockouts phenotypes

Although PFBA and FBA can be used to simulate the effect of knockouts, other methods have been proven more valuable for that task: MOMA and ROOM. In cameo we implement a linear version of MOMA.


Simulating knockouts:

  • Manipulate the bounds of the reaction (or use the shorthand method knock_out)
model.reactions.PGI
IdPGI
NameGlucose-6-phosphate isomerase
Stoichiometryg6p_c <=> f6p_c
Lower bound-1000.000000
Upper bound1000.000000
model.reactions.PGI.knock_out()
model.reactions.PGI
IdPGI
NameGlucose-6-phosphate isomerase
Stoichiometryg6p_c --> f6p_c
Lower bound0.000000
Upper bound0.000000
  • Simulate using different methods:
%time fba_knockout_result = fba(model)
fba_knockout_result[model.reactions.BIOMASS_Ec_iJO1366_core_53p95M]
CPU times: user 257 ms, sys: 6.5 ms, total: 264 ms
Wall time: 359 ms
0.9761293262973523
%time pfba_knockout_result = pfba(model)
pfba_knockout_result[model.reactions.BIOMASS_Ec_iJO1366_core_53p95M]
CPU times: user 664 ms, sys: 21.4 ms, total: 685 ms
Wall time: 1.05 s
0.9761293262947272

MOMA and ROOM relly on a reference (wild-type) flux distribution and we can use the one previously computed.

Parsimonious FBA references seem to produce better results using this methods

from cameo.flux_analysis.simulation import room, lmoma
%time lmoma_result = lmoma(model, reference=pfba_result.fluxes)
lmoma_result[model.reactions.BIOMASS_Ec_iJO1366_core_53p95M]
CPU times: user 8.07 s, sys: 120 ms, total: 8.19 s
Wall time: 8.93 s
0.8724092397035627

ROOM is a dificult computational problem. If the bounds of the system are not large enought, it can take many hours to simulate. To improve the speed of the simulation and the chances of finding a solution, we increase the bounds.

for reaction in model.reactions:
    if reaction.upper_bound == 1000:
        reaction.upper_bound = 99999999
    if reaction.lower_bound == -1000:
        reaction.lower_bound = -99999999
%time room_result = room(model, reference=pfba_result.fluxes)
room_result[model.reactions.BIOMASS_Ec_iJO1366_core_53p95M]
CPU times: user 11.5 s, sys: 83 ms, total: 11.6 s
Wall time: 11.8 s
0.8724092397035627