17.1.1.2.1.10. cobra.flux_analysis.reaction

functions for analyzing / creating objective functions

17.1.1.2.1.10.1. Module Contents

17.1.1.2.1.10.1.1. Functions

assess(model, reaction, flux_coefficient_cutoff=0.001, solver=None)

Assesses production capacity.

assess_component(model, reaction, side, flux_coefficient_cutoff=0.001, solver=None)

Assesses the ability of the model to provide sufficient precursors,

_optimize_or_value(model, value=0.0, solver=None)

assess_precursors(model, reaction, flux_coefficient_cutoff=0.001, solver=None)

Assesses the ability of the model to provide sufficient precursors for

assess_products(model, reaction, flux_coefficient_cutoff=0.001, solver=None)

Assesses whether the model has the capacity to absorb the products of

cobra.flux_analysis.reaction.assess(model, reaction, flux_coefficient_cutoff=0.001, solver=None)[source]

Assesses production capacity.

Assesses the capacity of the model to produce the precursors for the reaction and absorb the production of the reaction while the reaction is operating at, or above, the specified cutoff.

Parameters
  • model (cobra.Model) – The cobra model to assess production capacity for

  • reaction (reaction identifier or cobra.Reaction) – The reaction to assess

  • flux_coefficient_cutoff (float) – The minimum flux that reaction must carry to be considered active.

  • solver (basestring) – Solver name. If None, the default solver will be used.

Returns

True if the model can produce the precursors and absorb the products for the reaction operating at, or above, flux_coefficient_cutoff. Otherwise, a dictionary of {‘precursor’: Status, ‘product’: Status}. Where Status is the results from assess_precursors and assess_products, respectively.

Return type

bool or dict

cobra.flux_analysis.reaction.assess_component(model, reaction, side, flux_coefficient_cutoff=0.001, solver=None)[source]

Assesses the ability of the model to provide sufficient precursors, or absorb products, for a reaction operating at, or beyond, the specified cutoff.

Parameters
  • model (cobra.Model) – The cobra model to assess production capacity for

  • reaction (reaction identifier or cobra.Reaction) – The reaction to assess

  • side (basestring) – Side of the reaction, ‘products’ or ‘reactants’

  • flux_coefficient_cutoff (float) – The minimum flux that reaction must carry to be considered active.

  • solver (basestring) – Solver name. If None, the default solver will be used.

Returns

True if the precursors can be simultaneously produced at the specified cutoff. False, if the model has the capacity to produce each individual precursor at the specified threshold but not all precursors at the required level simultaneously. Otherwise a dictionary of the required and the produced fluxes for each reactant that is not produced in sufficient quantities.

Return type

bool or dict

cobra.flux_analysis.reaction._optimize_or_value(model, value=0.0, solver=None)[source]
cobra.flux_analysis.reaction.assess_precursors(model, reaction, flux_coefficient_cutoff=0.001, solver=None)[source]

Assesses the ability of the model to provide sufficient precursors for a reaction operating at, or beyond, the specified cutoff.

Deprecated: use assess_component instead

Parameters
  • model (cobra.Model) – The cobra model to assess production capacity for

  • reaction (reaction identifier or cobra.Reaction) – The reaction to assess

  • flux_coefficient_cutoff (float) – The minimum flux that reaction must carry to be considered active.

  • solver (basestring) – Solver name. If None, the default solver will be used.

Returns

True if the precursors can be simultaneously produced at the specified cutoff. False, if the model has the capacity to produce each individual precursor at the specified threshold but not all precursors at the required level simultaneously. Otherwise a dictionary of the required and the produced fluxes for each reactant that is not produced in sufficient quantities.

Return type

bool or dict

cobra.flux_analysis.reaction.assess_products(model, reaction, flux_coefficient_cutoff=0.001, solver=None)[source]

Assesses whether the model has the capacity to absorb the products of a reaction at a given flux rate.

Useful for identifying which components might be blocking a reaction from achieving a specific flux rate.

Deprecated: use assess_component instead

Parameters
  • model (cobra.Model) – The cobra model to assess production capacity for

  • reaction (reaction identifier or cobra.Reaction) – The reaction to assess

  • flux_coefficient_cutoff (float) – The minimum flux that reaction must carry to be considered active.

  • solver (basestring) – Solver name. If None, the default solver will be used.

Returns

True if the model has the capacity to absorb all the reaction products being simultaneously given the specified cutoff. False, if the model has the capacity to absorb each individual product but not all products at the required level simultaneously. Otherwise a dictionary of the required and the capacity fluxes for each product that is not absorbed in sufficient quantities.

Return type

bool or dict