:py:mod:`cobra.flux_analysis.reaction` ====================================== .. py:module:: cobra.flux_analysis.reaction .. autoapi-nested-parse:: Provide functions for analyzing / creating objective functions. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: cobra.flux_analysis.reaction.assess cobra.flux_analysis.reaction.assess_component cobra.flux_analysis.reaction._optimize_or_value cobra.flux_analysis.reaction.assess_precursors cobra.flux_analysis.reaction.assess_products .. py:function:: assess(model: cobra.Model, reaction: Union[cobra.core.Reaction, str], flux_coefficient_cutoff: float = 0.001, solver: str = None) -> Union[bool, Dict] Assess production capacity. Assess 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 `flux_coefficient_cutoff`. .. deprecated:: 0.10.0a1 `solver` argument will be removed in cobrapy 1.0.0, it is replaced by globally setting the solver via cobra.Configuration . :param model: The cobra model to assess production capacity for. :type model: cobra.Model :param reaction: The reaction to assess. :type reaction: str or cobra.Reaction :param flux_coefficient_cutoff: The minimum flux that reaction must carry to be considered active (default 0.001). :type flux_coefficient_cutoff: float, optional :param solver: The solver name. If None, the default solver will be used (default None). :type solver: str, optional :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. :rtype: bool or dict .. py:function:: assess_component(model: cobra.Model, reaction: Union[cobra.core.Reaction, str], side: str, flux_coefficient_cutoff: float = 0.001, solver: str = None) -> Union[bool, Dict] Assess production capacity of components. Assess the ability of the `model` to provide sufficient precursors, or absorb products, for a `reaction` operating at, or beyond, the specified `flux_coefficient_cutoff`. .. deprecated:: 0.10.0a1 `solver` argument will be removed in cobrapy 1.0.0, it is replaced by globally setting the solver via cobra.Configuration . :param model: The cobra model to assess production capacity for. :type model: cobra.Model :param reaction: The reaction to assess. :type reaction: str or cobra.Reaction :param side: The side of the reaction to assess. :type side: {"products", "reactants"} :param flux_coefficient_cutoff: The minimum flux that reaction must carry to be considered active (default 0.001). :type flux_coefficient_cutoff: float, optional :param solver: The solver name. If None, the default solver will be used (default None). :type solver: str, optional :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. :rtype: bool or dict .. py:function:: _optimize_or_value(model: cobra.Model, value: float = 0.0) -> float Perform quick optimization and return the objective value. The objective value is returned at `value` error value. .. deprecated:: 0.22.0 `_optimize_or_value` will be removed in cobrapy 1.0.0, its functionality can be achieved by using `cobra.Model.slim_optimize`. :param model: The model to optimize. :type model: cobra.Model :param value: The error value to consider. :type value: float :returns: The optimized value of the model's objective. :rtype: float .. py:function:: assess_precursors(model: cobra.Model, reaction: cobra.core.Reaction, flux_coefficient_cutoff: float = 0.001, solver: str = None) -> Union[bool, Dict] Assess production capacity of precursors. Assess the ability of the model to provide sufficient precursors for a reaction operating at, or beyond, the `flux_coefficient_cutoff`. .. deprecated:: 0.7.0 `assess_precursors` will be removed in cobrapy 1.0.0, it is replaced by `assess_component`. :param model: The cobra model to assess production capacity for. :type model: cobra.Model :param reaction: The reaction to assess. :type reaction: str or cobra.Reaction :param flux_coefficient_cutoff: The minimum flux that reaction must carry to be considered active (default 0.001). :type flux_coefficient_cutoff: float, optional :param solver: The solver name. If None, the default solver will be used (default None). :type solver: str, optional :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. :rtype: bool or dict .. py:function:: assess_products(model: cobra.Model, reaction: cobra.core.Reaction, flux_coefficient_cutoff: float = 0.001, solver: str = None) -> Union[bool, Dict] Assesses absorption capacity of products. Assess the ability of the model to 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:: 0.7.0 `assess_products` will be removed in cobrapy 1.0.0, it is replaced by `assess_component`. :param model: The cobra model to assess production capacity for. :type model: cobra.Model :param reaction: The reaction to assess. :type reaction: str or cobra.Reaction :param flux_coefficient_cutoff: The minimum flux that reaction must carry to be considered active (default 0.001). :type flux_coefficient_cutoff: float, optional :param solver: The solver name. If None, the default solver will be used (default None). :type solver: str, optional :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. :rtype: bool or dict