cameo.flux_analysis package¶
Submodules¶
cameo.flux_analysis.analysis module¶

cameo.flux_analysis.analysis.
find_blocked_reactions
(model)[source]¶ Determine reactions that cannot carry steadystate flux.
 Parameters
model (cobra.Model) –
 Returns
A list of reactions.
 Return type

cameo.flux_analysis.analysis.
flux_variability_analysis
(model, reactions=None, fraction_of_optimum=0.0, pfba_factor=None, remove_cycles=False, view=None)[source]¶ Flux variability analysis.
 Parameters
model (cobra.Model) –
reactions (None or iterable) – The list of reaction whose lower and upper bounds should be determined. If
None
, all reactions inmodel
will be assessed.fraction_of_optimum (float) – Fix the objective of the model to a fraction of it’s max. Expected to be within [0;1]. Lower values increase variability.
pfba_factor (float) – If not None, fix the total sum of reaction fluxes to its minimum times a factor. Expected to be within [ 1;inf]. Higher factors increase flux variability to a certain point since the bound for the objective is still fixed.
remove_cycles (bool) – If true, apply the CycleFreeFlux algorithm to remove loops from each simulated flux distribution.
view (cameo.parallel.SequentialView or cameo.parallel.MultiprocessingView or ipython.cluster.DirectView) – A parallelization view.
 Returns
Pandas DataFrame containing the results of the flux variability analysis.
 Return type
pandas.DataFrame

cameo.flux_analysis.analysis.
phenotypic_phase_plane
(model, variables, objective=None, source=None, points=20, view=None)[source]¶ Phenotypic phase plane analysis [1].
Implements a phenotypic phase plan analysis with interpretation same as that presented in [1] but calculated by optimizing the model for all steps of the indicated variables (instead of using shadow prices).
 Parameters
model (cobra.Model) –
variables (str or reaction or iterable) – A reaction ID, reaction, or list of reactions to be varied.
objective (str or reaction or optlang.Objective or Metabolite, optional) – An objective, a reaction’s flux, or a metabolite’s production to be minimized/maximized (defaults to the current model objective).
source (Reaction or reaction identifier) – The reaction to use as the source when calculating mass and carbon yield. Set to the medium reaction with the highest input carbon flux if left None.
points (int or iterable) – Number of points to be interspersed between the variable bounds. A list of same same dimensions as
variables
can be used to specify variable specific numbers of points.view (SequentialView or MultiprocessingView or ipython.cluster.DirectView) – A parallelization view.
 Returns
The phenotypic phase plane with flux, mol carbon input / mol carbon output, gram input / gram output
 Return type
PhenotypicPhasePlaneResult
References
 [1] Edwards, J. S., Ramakrishna, R. and Palsson, B. O. (2002). Characterizing the metabolic phenotype: a phenotype
phase plane analysis. Biotechnology and Bioengineering, 77(1), 27–36. doi:10.1002/bit.10047

cameo.flux_analysis.analysis.
flux_balance_impact_degree
(model, knockouts, view=<cameo.parallel.SequentialView object at 0x2b6191f39be0>, method='fva')[source]¶ Flux balance impact degree by Zhao et al 2013
 Parameters
 Returns
FluxBalanceImpactDegreeResult – The changes in reachable reactions (reactions that can carry flux)
 Return type
perturbation
cameo.flux_analysis.simulation module¶
Methods for simulating flux distributions. Currently implements: * fba  Flux Balance Analysis * pfba  Parsimonious Flux Balance Analysis * lmoma  (Linear) Minimization of Metabolic Adjustment * room  Regulatory On/Off Minimization

cameo.flux_analysis.simulation.
fba
(model, objective=None, reactions=None, *args, **kwargs)[source]¶ Flux Balance Analysis.
 Parameters
model (cobra.Model) –
objective (a valid objective  see SolverBaseModel.objective (optional)) –
 Returns
Contains the result of the linear solver.
 Return type
FluxDistributionResult

cameo.flux_analysis.simulation.
pfba
(model, objective=None, reactions=None, fraction_of_optimum=1, *args, **kwargs)[source]¶ Parsimonious Enzyme Usage Flux Balance Analysis [1].
 Parameters
model (cobra.Model) – The model to perform pFBA with
objective (str or reaction or optlang.Objective) – An objective to be minimized/maximized for
reactions (list) – list of reactions to get results for. Getting fluxes from solution can be time consuming so if not all are needed it may be faster to request specific reactions.
fraction_of_optimum (float) – Fix the value of the current objective to a fraction of is maximum.
 Returns
Contains the result of the linear solver.
 Return type
FluxDistributionResult
References
 1
Lewis, N. E., Hixson, K. K., Conrad, T. M., Lerman, J. A., Charusanti, P., Polpitiya, A. D., … Palsson, B. Ø. (2010). Omic data from evolved E. coli are consistent with computed optimal growth from genomescale models. Molecular Systems Biology, 6, 390. doi:10.1038/msb.2010.47

cameo.flux_analysis.simulation.
moma
(model, reference=None, cache=None, reactions=None, *args, **kwargs)[source]¶ Minimization of Metabolic Adjustment[1]
 Parameters
model (cobra.Model) –
reference (FluxDistributionResult, dict) –
cache (ProblemCache) –
reactions (list) –
 Returns
Contains the result of the solver.
 Return type
FluxDistributionResult
References
 1
Segrè, D., Vitkup, D., & Church, G. M. (2002). Analysis of optimality in natural and perturbed metabolic networks. Proceedings of the National Academy of Sciences of the United States of America, 99(23), 15112–7. doi:10.1073/pnas.232349399

cameo.flux_analysis.simulation.
lmoma
(model, reference=None, cache=None, reactions=None, *args, **kwargs)[source]¶ Linear Minimization Of Metabolic Adjustment [1].
 Parameters
model (cobra.Model) –
reference (FluxDistributionResult, dict) –
cache (ProblemCache) –
reactions (list) –
 Returns
Contains the result of the solver.
 Return type
FluxDistributionResult
References
 1
Becker, S. A., Feist, A. M., Mo, M. L., Hannum, G., Palsson, B. Ø., & Herrgard, M. J. (2007). Quantitative prediction of cellular metabolism with constraintbased models: the COBRA Toolbox. Nature Protocols, 2(3), 727–38. doi:10.1038/nprot.2007.99

cameo.flux_analysis.simulation.
room
(model, reference=None, cache=None, delta=0.03, epsilon=0.001, reactions=None, *args, **kwargs)[source]¶ Regulatory On/Off Minimization [1].
 Parameters
model (cobra.Model) –
reference (FluxDistributionResult, dict) –
delta (float) –
epsilon (float) –
cache (ProblemCache) –
 Returns
Contains the result of the linear solver.
 Return type
FluxDistributionResult
References
 1
Tomer Shlomi, Omer Berkman and Eytan Ruppin, “Regulatory on/off minimization of metabolic flux changes after genetic perturbations”, PNAS 2005 102 (21) 76957700; doi:10.1073/pnas.0406346102
cameo.flux_analysis.structural module¶
Methods for stoichiometric analaysis

cameo.flux_analysis.structural.
find_dead_end_reactions
(model)[source]¶ Identify reactions that are structurally prevented from carrying flux (dead ends).
cameo.flux_analysis.util module¶

cameo.flux_analysis.util.
remove_infeasible_cycles
(model, fluxes, fix=())[source]¶ Remove thermodynamically infeasible cycles from a flux distribution.
 Parameters
model (cobra.Model) – The model that generated the flux distribution.
fluxes (dict) – The flux distribution containing infeasible loops.
 Returns
A cycle free flux distribution.
 Return type
References
 1
A. A. Desouki, F. Jarre, G. GeliusDietrich, and M. J. Lercher, “CycleFreeFlux: efficient removal of thermodynamically infeasible loops from flux distributions.”

cameo.flux_analysis.util.
fix_pfba_as_constraint
(model, multiplier=1, fraction_of_optimum=1)[source]¶ Fix the pFBA optimum as a constraint
Useful when setting other objectives, like the maximum flux through given reaction may be more realistic if all other fluxes are not allowed to reach their full upper bounds, but collectively constrained to max sum.
 Parameters
model (cobra.Model) – The model to add the pfba constraint to
multiplier (float) – The multiplier of the minimal sum of all reaction fluxes to use as the constraint.
fraction_of_optimum (float) – The fraction of the objective value’s optimum to use as constraint when getting the pFBA objective’s minimum
Module contents¶
This package provides methods for simulating and analyzing models.