The image includes the COBRAme and ECOLIme Python packages to get you started quickly. The docker image includes a prebuild version of the E. coli ME model iLE1678 at at me_models/iLE1678.pickle.
If you need more info about the construction process you can find it in the build_ME_model.ipynb notebook.
In [1]:
import pickle
with open("me_models/iLE1678.pickle", "rb") as model_file:
ecoli = pickle.load(model_file)
This will read the saved model into the variable ecoli.
In [2]:
print(ecoli)
print("Reactions:", len(ecoli.reactions))
print("Metabolites:", len(ecoli.metabolites))
We can now run the optimization for the model. This will take around 10 minutes.
In [3]:
from cobrame.solve.algorithms import binary_search
%time binary_search(ecoli, min_mu=0.1, max_mu=1.0, debug=True, mu_accuracy=1e-2)
Out[3]:
If we want to we could also visualize the model fluxes on a map of the E. coli central carbon metabolism obtained from iJO1366.
In [5]:
import escher
view = escher.Builder("iJO1366.Central metabolism")
view.reaction_data = ecoli.get_metabolic_flux()
view.display_in_notebook()
Out[5]:
In [ ]: