#!/usr/bin/env python # coding: utf-8 # Quick Start # ====== # # # # cameo - **c**omputer **a**ssistend **m**etabolic **e**ngineering and **o**ptimization # # # Step 1: Load a model # ------------------- # # Loading a model is easy. From the cameo package you can import the *load_model* function. # In[1]: from cameo import load_model # In[2]: print(load_model.__doc__) # In[3]: model = load_model("iJO1366") # In[4]: model # In[19]: print(model.objective) # Step 2: Optmize the mathematical problem (solve the model) # ------------------------------------------------------ # # The current objective can be optmized by calling the *solve()* or *optimize()* methods. # solve() will raise a ***SolveException*** when the problem is infeasible. # # The sense of the problem (or direction) is described the objective itself. # In[7]: solution = model.solve() # In[8]: solution # Step 3: The metabolic model # -------------------------- # # The **SolverBasedModel** object allows to explore directly explore certain properties of the metabolic model: # # * *reactions*: the reactions contained in the model (it supports tab-complete; with some minor limitations...) # # In[9]: model.reactions # In[10]: model.reactions.E4PD # * *exchanges*: reactions that allow the exchange of metabolites between the environment and the model # In[11]: model.exchanges # * *metabolites*: the metabolic species present in the model (also supports tab-complete) # In[12]: model.metabolites.get_by_id("12dgr140_p") # In[13]: model.metabolites.glc_dsh_D_c # * *medium*: the current limites for exchange rates (other then 0 to 0) # In[14]: model.medium() # * *genes*: the genes (if present) associated with the reactions in the model # In[15]: model.genes # * *essential_reactions*: reactions that cannot be knocked-out using the current constraints to achieve current objective # In[16]: model.essential_reactions() # * *essential_genes*: genes that cannot be knocked-out using the current constraints to achieve the current objective # In[17]: model.essential_genes() # In[ ]: