#!/usr/bin/env python # coding: utf-8 # # Predict expression modulation targets # # Cameo provides algorithms to search for genes or reactions that can be over- or down-regulated in order to achieve a given biological objective. # In[1]: from cameo import models from cameo.visualization.plotting.with_plotly import PlotlyPlotter # Load the E. coli core model. # In[2]: model = models.bigg.e_coli_core plotter = PlotlyPlotter() # ## Flux Scanning based on Enforced Objective Flux # In[3]: from cameo.strain_design.deterministic.flux_variability_based import FSEOF # In[4]: fseof = FSEOF(model) # In[5]: fseof.run(target=model.reactions.EX_succ_e) # ## Differential flux variability analysis # # Compares flux ranges of a reference model to a set of models that have been parametrized to lie on a grid of evenly spaced points in the *n*-dimensional production envelope (*n* being the number of reaction bounds to be varied). # In[6]: from cameo.flux_analysis.analysis import phenotypic_phase_plane from cameo.strain_design.deterministic import DifferentialFVA # ### Succinate production # The production envelope looks like this. # In[7]: production_envelope = phenotypic_phase_plane(model, variables=[model.reactions.BIOMASS_Ecoli_core_w_GAM], objective=model.metabolites.succ_e) production_envelope.plot(plotter, height=400) # Set up a model that represents a reference state (in this case a model with a constrained growth rate). # In[8]: model.reactions.EX_o2_e.lower_bound = 0 reference_model = model.copy() biomass_rxn = reference_model.reactions.BIOMASS_Ecoli_core_w_GAM biomass_rxn.lower_bound = 0. target = reference_model.metabolites.succ_e # Set up the differential flux variability analysis strain design method. # In[9]: diffFVA = DifferentialFVA(design_space_model=model, reference_model=reference_model, objective=target, variables=[biomass_rxn], normalize_ranges_by=biomass_rxn, points=10) # Run differential flux variability analysis (only on the surface of the production envelope) # In[10]: result = diffFVA.run(surface_only=True) # In[11]: result.solutions # In[14]: result.plot(plotter, 5, variables=['FBP', 'G6PDH2r', 'PGL', 'PGK']) # In[13]: result.display_on_map(2, map_name="iJO1366.Central metabolism")