cobra.flux_analysis.find_cyclic_reactions#
Provides a function to find cyclic reactions in a metabolic model.
Functions#
Create an optimization problem to find cyclic reactions. |
|
|
Find reactions, that can be in a loop in a steady state flux distribution. |
Module Contents#
- cobra.flux_analysis.find_cyclic_reactions._create_find_cyclic_reactions_problem(solver: optlang.interface, s_int: numpy.ndarray, directions_int: numpy.ndarray, zero_cutoff: float, bound: float) Tuple[optlang.interface.Model, List[optlang.interface.Variable]][source]#
Create an optimization problem to find cyclic reactions.
This optimization problem includes only internal reactions, assumes steady-state constraints, and enforces reaction directions.
- cobra.flux_analysis.find_cyclic_reactions.find_cyclic_reactions(model: cobra.Model, zero_cutoff: float | None = None, bound: float = 10000.0, method: str = 'optimized', required_stop_checks_num: int = 3) Tuple[List[str], List[Tuple[bool, bool]]][source]#
Find reactions, that can be in a loop in a steady state flux distribution.
- Parameters:
model (cobra.Model) – The metabolic model to analyze.
zero_cutoff (float, optional) – The cutoff value to consider a flux as zero. The default uses the model.tolerance (default None).
bound (float, optional) – The bound for the reaction fluxes in the optimization problem. (default is 1e4).
method (str, optional) – The method to use for finding cyclic reactions. Options are “optimized” (default) or “basic”. See notes for details.
required_stop_checks_num (int, optional) – This parameter is used only for the “optimized” method. The number of random checks to pass to prove that all cyclic reactions were found. (default is 3).
- Returns:
A list of reaction IDs that can be part of a loop.
A list of tuples indicating the possible directions of reactions from the first list in the loop. Each tuple contains two boolean values: (can_be_negative, can_be_positive).
- Return type:
A tuple containing two lists
Notes
This function considers only the stoichiometric matrix and reaction directions. Any other constraints present in the model are ignored. * If a reaction is identified as cyclic, there may still be no feasible loop
when taking into account all bounds and additional constraints.
However, if a reaction is identified as non-cyclic, it cannot participate in any loop in a steady-state flux distribution.
The “basic” method for each reaction and direction checks if it can be a part of a loop by optimizing linear programming problem.
The “optimized” method uses a faster randomized approach to firstly find all reactions that can be part of a loop and then checks their directions. This method usually works at least 2 times faster than the “basic” method. The required_stop_checks_num parameter is used to descrease the probability of missing some cyclic reactions.