6.1.1.5.1.2. pytfa.redgem.lumpgem
¶
6.1.1.5.1.2.1. Module Contents¶
6.1.1.5.1.2.1.1. Classes¶
Class to represent a variable attached to a reaction |
|
Class to represent a variable attached to a reaction |
|
Class to represent a variable attached to a reaction |
|
A class encapsulating the LumpGEM algorithm |
6.1.1.5.1.2.1.2. Functions¶
|
Keys are reactions |
6.1.1.5.1.2.1.3. Attributes¶
- exception pytfa.redgem.lumpgem.InfeasibleExcept(status, feasibility)[source]¶
Bases:
Exception
Common base class for all non-exit exceptions.
- exception pytfa.redgem.lumpgem.TimeoutExcept(time_limit)[source]¶
Bases:
Exception
Common base class for all non-exit exceptions.
- class pytfa.redgem.lumpgem.FluxKO(reaction, **kwargs)[source]¶
Bases:
pytfa.optim.variables.ReactionVariable
,pytfa.optim.variables.BinaryVariable
Class to represent a variable attached to a reaction
- class pytfa.redgem.lumpgem.UseOrKOInt(reaction, expr, **kwargs)[source]¶
Bases:
pytfa.optim.constraints.ReactionConstraint
Class to represent a variable attached to a reaction
- class pytfa.redgem.lumpgem.UseOrKOFlux(reaction, expr, **kwargs)[source]¶
Bases:
pytfa.optim.constraints.ReactionConstraint
Class to represent a variable attached to a reaction
- class pytfa.redgem.lumpgem.LumpGEM(tfa_model, additional_core_reactions, params)[source]¶
A class encapsulating the LumpGEM algorithm
- _generate_usage_constraints(self)[source]¶
Generate carbon intake related constraints for each non-core reaction For each reaction rxn : rxn.forward_variable + rxn.reverse_variable + activation_var * C_uptake < C_uptake
- _prepare_sinks(self)[source]¶
For each BBB (reactant of the biomass reactions), generate a sink, i.e an unbalanced reaction BBB -> of which purpose is to enable the BBB to be output of the GEM :return: the dict {BBB: sink} containing every BBB (keys) and their associated sinks
- _generate_objective(self)[source]¶
Generate and add the maximization objective : set as many activation variables as possible to 1 When an activation variable is set to 1, the corresponding non-core reaction is deactivated
- compute_lumps(self, force_solve=False, method='OnePerBBB')[source]¶
For each BBB (reactant of the biomass reaction), add the corresponding sink to the model, then optimize and lump the result into one lumped reaction :param force_solve: Indicates whether the computations must continue when one lumping yields a status “infeasible” :return: The dict {BBB: lump} containing every lumped reactions, associated to their BBBs
- _lump_one_per_bbb(self, met_BBB, sink, force_solve)[source]¶
- Parameters
met_BBB –
sink –
force_solve –
- Returns