In [1]:
import time
print "Last access date & time \n" + time.strftime("%c")
In [2]:
from cameo import load_model
from cameo.flux_analysis.simulation import lmoma, room, pfba
from cameo.parallel import MultiprocessingView, SequentialView
from cameo.flux_analysis.analysis import flux_variability_analysis as fva
from cobra.manipulation.delete import find_gene_knockout_reactions
import escher
import pandas as pd
from multiprocessing import Pool
from functools import partial
import numpy as np
In [3]:
iJO = load_model('../../Models/E.coli/iJO1366_20141021.xml')
# iJO.solver.configuration.timeout = 120
# iJO.solver = "cplex"
In [4]:
modelB = iJO.copy()
rxnBound = {\
"EX_glc_lp_e_rp_": [-10.40965107, -10.4503385],
"GLCptspp": [10.40965107, 10.4503385],
"PGI": [7.35860489, 7.57227387],
"PFK": [8.55935864, 8.67982514],
"FBA": [8.55935864, 8.67982514],
"TPI": [8.55935864, 8.67982514],
"GAPD": [17.6426579, 17.9288571],
"PGK": [-17.6426579, -17.9288571],
"PGM": [-16.1968513, -16.6751711],
"ENO": [16.1968513, 16.6751711],
"PYK": [2.38209727, 3.27936931],
"G6PDH2r": [2.69451749, 2.91458006],
"GND": [2.55020801, 2.76522246],
"RPE": [1.11581183, 1.30394817],
"RPI": [-1.40202146, -1.49203236],
"EDD": [0.112780633, 0.183211294],
"EDA": [0.112780633, 0.183211294],
"PDH": [11.2978803, 12.4997292],
"CS": [1.84921814, 2.11797838],
"ACONTa": [1.84921814, 2.11797838],
"ACONTb": [1.84921814, 2.11797838],
"ICDHyr": [1.56538655, 1.89717528],
"AKGDH": [0.747454477, 1.027061917],
"SUCOAS": [-0.379703107, -0.652958677],
"SUCDi": [1.04795425, 1.23205418],
"FUM": [1.32620579, 1.53493095],
"MDH": [0.976218796, 1.28807371],
"ICL": [0.182467635, 0.325904124],
"MALS": [0.182467635, 0.325904124],
"ME2": [0.000000001043, 0.697007696],
"ME1": [0.000000001043, 0.697009782],
"PPC": [2.54537892, 2.92150558],
"PPCK": [0.0367090108, 0.290508876],
"GLUDy": [-4.74501377, -5.51393423],
# "GLNS": [0.489188903, 0.568338001],
# "ASPTA": [-1.32957468, -1.56318582],
"ALATA_L": [-0.353665655, -0.410886721],
# "PGCD": [0.799934065, 0.934983791],
# "PSERT": [0.799934065, 0.934983791],
# "PSP_L": [0.80311, 0.9387],
"EX_ac_lp_e_rp_": [6.49789, 8.28142],
"EX_co2_lp_e_rp_": [16.13521, 17.29294],
"EX_o2_lp_e_rp_": [-14.20566, -15.62414],
# "EX_nh4_lp_e_rp_": [-5.04812, -5.86166],
"EX_so4_lp_e_rp_": [-0.16688, -0.19817]
}
for rxn, bounds in rxnBound.iteritems():
if bounds[0] < bounds[1]: # to fix the issue with negaive values above
modelB.reactions.get_by_id(rxn).lower_bound = bounds[0]
modelB.reactions.get_by_id(rxn).upper_bound = bounds[1]
else:
modelB.reactions.get_by_id(rxn).upper_bound = bounds[0]
modelB.reactions.get_by_id(rxn).lower_bound = bounds[1]
modelB.solve().f
Out[4]: