https://groups.google.com/forum/#!topic/cobra-pie/-sPHjNsB974
This is definitely doable.
Steps are:
I'm happy to peer review your progress! Perhaps write back with the Ethanol max yield? That is easily doable as the molecule is native and you can skip #2. https://cobrapy.readthedocs.io/en/latest/simulating.html# for the basics.
Good luck! Josh
Hi Björn,
In addition to what Josh said, take a look at the following materials:
https://cobrapy.readthedocs.io/en/latest/phenotype_phase_plane.html
Our general materials for the software carpentry course on cell design: https://biosustain.github.io/cell-factory-design-course/
In particular: https://biosustain.github.io/cell-factory-design-course/08-Predict-heterologous-pathways/
https://biosustain.github.io/cell-factory-design-course/07-Theoretical-maximum-yields/
Also take a look at the documentation for cameo, our strain design library https://cameo.readthedocs.io/en/latest/
Happy to answer any specific question and congrats to your acquiring a very experienced peer reviewer ;)
import cobra
cobra.__version__
'0.15.0'
iMM904 = cobra.io.load_json_model("iMM904.json")
model = iMM904.copy()
print(model.objective)
Maximize 1.0*BIOMASS_SC5_notrace - 1.0*BIOMASS_SC5_notrace_reverse_93090
I have to change the model objective from biomass to ethanol
model.objective = model.reactions.EX_etoh_e
print(model.objective)
Maximize 1.0*EX_etoh_e - 1.0*EX_etoh_e_reverse_cc64f
This optimises the model using fba and parsimonius fba (trying to minimize overall fluxes?).
fba_solution = model.optimize()
pfba_solution = cobra.flux_analysis.pfba(model)
model.summary()
IN FLUXES OUT FLUXES OBJECTIVES --------------- ------------- ------------- glc__D_e 10 etoh_e 20 EX_etoh_e 20 nh4_e 6.33 co2_e 16.8 h_e 6.33 h2o_e 3.17 urea_e 3.17
fba_solution.fluxes.EX_glc__D_e, fba_solution.fluxes.EX_etoh_e
(-10.0, 19.999999999999996)
pfba_solution.fluxes.EX_glc__D_e, pfba_solution.fluxes.EX_etoh_e
(-10.0, 19.999999999999996)
The parsimonius fba solution seems similar to the normal fba. https://cobrapy.readthedocs.io/en/latest/simulating.html
Dividing the ethanol flux by the glucose flux gives the molar yield, expected to be two moles of ethanol for each mole glucose.
molar_yeld = round( (-1. * fba_solution.fluxes.EX_etoh_e) / fba_solution.fluxes.EX_glc__D_e )
molar_yeld
2.0
mw_et, mw_glc = model.metabolites.etoh_e.formula_weight, model.metabolites.glc__D_c.formula_weight
mw_et, mw_glc
(46.06844, 180.15588)
print(f"{molar_yeld * (mw_et/mw_glc)} g ethanol / g glucose")
0.5114286583374353 g ethanol / g glucose
The expected ethanol yield in g etoh per g glucose should be around 0.51 g/g
As can be seen below the fba and pfba solutions are similar but not identical.
fba_solution.fluxes[fba_solution.fluxes.abs() >= 10.0]
ALCD2ir 20.0 CO2t -20.0 ENO 19.0 ETOHt -20.0 EX_co2_e 20.0 EX_etoh_e 20.0 EX_glc__D_e -10.0 G6PI3 10.0 GAPD 19.0 GLCt1 10.0 GLUK 10.0 PGK -19.0 PGM -19.0 PYK 19.0 PYRDC 18.0 Name: fluxes, dtype: float64
pfba_solution.fluxes[pfba_solution.fluxes.abs() >= 10.0]
ALCD2ir 20.0 CO2t -20.0 ENO 20.0 ETOHt -20.0 EX_co2_e 20.0 EX_etoh_e 20.0 EX_glc__D_e -10.0 FBA 10.0 G6PI3 10.0 GAPD 20.0 GLCt1 10.0 GLUK 10.0 PFK 10.0 PGK -20.0 PGM -20.0 PYK 20.0 PYRDC 20.0 TPI 10.0 Name: fluxes, dtype: float64
import escher
reaction_data = pfba_solution.fluxes[pfba_solution.fluxes.abs() > 1E-07].to_dict()
escher.Builder( map_name='iMM904.Central carbon metabolism',
model_name='iMM904',
reaction_data=reaction_data ).display_in_notebook()
model.reactions.HEX1
Reaction identifier | HEX1 |
Name | Hexokinase (D-glucose:ATP) |
Memory address | 0x07fbad5d66b38 |
Stoichiometry |
atp_c + glc__D_c --> adp_c + g6p_c + h_c ATP C10H12N5O13P3 + D-Glucose --> ADP C10H12N5O10P2 + D-Glucose 6-phosphate + H+ |
GPR | YFR053C or YGL253W or YCL040W |
Lower bound | 0.0 |
Upper bound | 999999.0 |
model.reactions.GLUK
Reaction identifier | GLUK |
Name | Glucokinase |
Memory address | 0x07fbad5d7fa90 |
Stoichiometry |
atp_c + glc__D_c --> adp_c + g6p_B_c + h_c ATP C10H12N5O13P3 + D-Glucose --> ADP C10H12N5O10P2 + Beta D glucose 6 phosphate C6H11O9P + H+ |
GPR | YCL040W |
Lower bound | 0.0 |
Upper bound | 999999.0 |
see here for how to overlay solution on metabolic map
pfba_solution.fluxes.HEX1
-5.2240100423130185e-15
pfba_solution.fluxes.GLUK
10.000000000000004
fba_solution.fluxes.HEX1
0.0
fba_solution.fluxes.GLUK
10.0