cameo.strain_design.deterministic package¶
Submodules¶
cameo.strain_design.deterministic.flux_variability_based module¶
-
class
cameo.strain_design.deterministic.flux_variability_based.
DifferentialFVA
(design_space_model, objective, variables=None, reference_model=None, exclude=(), normalize_ranges_by=None, points=10)[source]¶ Bases:
cameo.core.strain_design.StrainDesignMethod
Differential flux variability analysis.
Compares flux ranges of a reference model to a set of models that have been parameterized 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).
production ^ |---------. * reference_model | . . . . .\ . design_space_model | . . . . . | . . . . . . | . . . . . . o--------------*- > growth
Overexpression, downregulation, knockout, flux-reversal and other strain engineering targets can be inferred from the resulting comparison.
Parameters: - design_space_model (SolverBasedModel) – A model whose flux ranges will be scanned.
- objective (str or Reaction or Metabolite) – A reaction whose flux or a metabolite whose production should be maximized.
- variables (iterable, optional) – A iterable of n reactions (or IDs) to be scanned (defaults to current objective in design_space_model).
- reference_model (SolverBasedModel, optional) – A model whose flux ranges represent the reference state and all calculated flux ranges will be compared to. Defaults to design_space_model constrained to its maximum objective value.
- exclude (iterable) – An iterable of reactions (or IDs) to be excluded in the analysis (exchange reactions will not be analyzed automatically).
- normalize_ranges_by (str or Reaction, optional) – A reaction ID that specifies a flux by whom all calculated flux ranges will be normalized by.
- points (int, optional) – Number of points to lay on the surface of the n-dimensional production envelope (defaults to 10).
Examples
>>> from cameo import models >>> from cameo.strain_design.deterministic import DifferentialFVA >>> model = models.bigg.e_coli_core >>> reference_model = model.copy() >>> reference_model.reactions.Biomass_Ecoli_core_w_GAM.lower_bound = reference_model.solve().objective_value >>> diffFVA = DifferentialFVA(design_space_model=model, reference_model=reference_model, objective=model.reactions.EX_succ_e, variables=[model.reactions.Biomass_Ecoli_core_w_GAM], normalize_ranges_by=model.reactions.Biomass_Ecoli_core_w_GAM, points=10) >>> result = diffFVA.run(surface_only=True) >>> result.plot()
Methods
-
run
(surface_only=True, improvements_only=True, progress=True, view=None)[source]¶ Run the differential flux variability analysis.
Parameters: - surface_only (bool, optional) – If only the surface of the n-dimensional production envelope should be scanned (defaults to True).
- improvements_only (bool, optional) – If only grid points should should be scanned that constitute and improvement in production over the reference state (defaults to True).
- progress (bool, optional) – If a progress bar should be shown.
- view (SequentialView or MultiprocessingView or ipython.cluster.DirectView, optional) – A parallelization view (defaults to SequentialView).
Returns: A pandas Panel containing a results DataFrame for every grid point scanned.
Return type: pandas.Panel
-
class
cameo.strain_design.deterministic.flux_variability_based.
FSEOF
(model, primary_objective=None, *args, **kwargs)[source]¶ Bases:
cameo.core.strain_design.StrainDesignMethod
Performs a Flux Scanning based on Enforced Objective Flux (FSEOF) analysis.
Parameters: - model (SolverBasedModel) –
- enforced_reaction (Reaction) – The flux that will be enforced. Reaction object or reaction id string.
- primary_objective (Reaction) – The primary objective flux (defaults to model.objective).
References
[R8] - Choi, S. Y. Lee, T. Y. Kim, and H. M. Woo, ‘In silico identification of gene amplification targets
for improvement of lycopene production.,’ Appl Environ Microbiol, vol. 76, no. 10, pp. 3097–3105, May 2010.
Methods
-
run
(target=None, max_enforced_flux=0.9, number_of_results=10, exclude=(), simulation_method=<function fba>, simulation_kwargs=None)[source]¶ Performs a Flux Scanning based on Enforced Objective Flux (FSEOF) analysis.
Parameters: - target (str, Reaction, Metabolite) – The target for optimization.
- max_enforced_flux (float, optional) – The maximal flux of secondary_objective that will be enforced, relative to the theoretical maximum ( defaults to 0.9).
- number_of_results (int, optional) – The number of enforced flux levels (defaults to 10).
- exclude (Iterable of reactions or reaction ids that will not be included in the output.) –
Returns: An object containing the identified reactions and the used parameters.
Return type: FseofResult
References
[R9] - Choi, S. Y. Lee, T. Y. Kim, and H. M. Woo, ‘In silico identification of gene amplification targets
for improvement of lycopene production.,’ Appl Environ Microbiol, vol. 76, no. 10, pp. 3097–3105, May 2010.
cameo.strain_design.deterministic.linear_programming module¶
-
class
cameo.strain_design.deterministic.linear_programming.
OptKnock
(model, exclude_reactions=None, remove_blocked=True, fraction_of_optimum=0.1, exclude_non_gene_reactions=True, use_nullspace_simplification=True, *args, **kwargs)[source]¶ Bases:
cameo.core.strain_design.StrainDesignMethod
OptKnock.
OptKnock solves a bi-level optimization problem, finding the set of knockouts that allows maximal target production under optimal growth.
Parameters: - model (SolverBasedModel) – A model to be used for finding optimal knockouts. Always set a non-zero lower bound on biomass reaction before using OptKnock.
- exclude_reactions (iterable of str or Reaction objects) – Reactions that will not be knocked out. Excluding reactions can give more realistic results and decrease running time. Essential reactions and exchanges are always excluded.
- remove_blocked (boolean (default True)) – If True, reactions that cannot carry flux (determined by FVA) will be removed from the model. This reduces running time significantly.
- fraction_of_optimum (If not None, this value will be used to constrain the inner objective (e.g. growth) to) – a fraction of the optimal inner objective value. If inner objective is not constrained manually this argument should be used. (Default: None)
- exclude_non_gene_reactions (If True (default), reactions that are not associated with genes will not be) – knocked out. This results in more practically relevant solutions as well as shorter running times.
- use_nullspace_simplification (Boolean (default True)) – Use a basis for the nullspace to find groups of reactions whose fluxes are multiples of each other. From each of these groups only 1 reaction will be included as a possible knockout
Examples
>>> from cameo import models >>> from cameo.strain_design.deterministic import OptKnock >>> model = models.bigg.e_coli_core >>> model.reactions.Biomass_Ecoli_core_w_GAM.lower_bound = 0.1 >>> model.solver = "cplex" # Using cplex is recommended >>> optknock = OptKnock(model) >>> result = optknock.run(k=2, target="EX_ac_e", max_results=3)
Methods
-
run
(max_knockouts=5, biomass=None, target=None, max_results=1, *args, **kwargs)[source]¶ Perform the OptKnock simulation
Parameters: - target (str, Metabolite or Reaction) – The design target
- biomass (str, Metabolite or Reaction) – The biomass definition in the model
- max_knockouts (int) – Max number of knockouts allowed
- max_results (int) – Max number of different designs to return if found
Returns: Return type: OptKnockResult