optimModels.utils package¶
Submodules¶
optimModels.utils.configurations module¶
-
class
optimModels.utils.configurations.
KineticConfigurations
¶ Bases:
object
-
SOLVER
= 'odespy'¶
-
SOLVER_METHOD
= 1¶
-
SOLVER_TIMEOUT
= 6000¶
-
STEADY_STATE_TIME
= 1000000000.0¶
-
optimModels.utils.constantes module¶
-
class
optimModels.utils.constantes.
optimType
¶ Bases:
object
-
COMPOSITION
= 9¶
-
GENE_KO
= 3¶
-
GENE_UO
= 4¶
-
MEDIUM
= 5¶
-
MEDIUM_LEVELS
= 6¶
-
MEDIUM_REACTION_KO
= 7¶
-
MEDIUM_REACTION_UO
= 8¶
-
PROTEIN_KO
= 10¶
-
PROTEIN_UO
= 11¶
-
REACTION_KO
= 1¶
-
REACTION_UO
= 2¶
-
get_optim_type_name
(id)¶
-
types
= {1: 'Reaction Knockouts', 2: 'Reaction Under/Over expression', 3: 'Gene Knockouts', 4: 'Gene Under/Over expression', 5: 'Medium compositions', 6: 'Medium compositions with levels', 7: 'Medium with Reaction Knockouts', 8: 'Medium with Reaction Under/Over expression', 9: 'Community Composition', 10: 'Protein knockouts', 11: 'Protein Under/Over expression'}¶
-
-
class
optimModels.utils.constantes.
solverMethod
¶ Bases:
object
-
AdamsBashMoulton2
= 14¶
-
AdamsBashforth2
= 13¶
-
DORMAN_PRINCE
= 7¶
-
Dop853
= 10¶
-
Dopri5
= 9¶
-
EULER
= 5¶
-
HEUN
= 4¶
-
LSODA
= 1¶
-
LSODAR
= 2¶
-
LSODE
= 3¶
-
RK4
= 6¶
-
RKFehlberg
= 8¶
-
Radau5
= 12¶
-
Vode
= 11¶
-
get_solver_method_name
(id)¶
-
methods
= {1: 'LSODA', 2: 'LSODAR', 3: 'LSODE', 4: 'HEUN', 5: 'EULER', 6: 'Range Kutta 4', 7: 'DORMAN PRINCE', 8: 'RKFehlberg', 9: 'Dopri5', 10: 'Dop853', 11: 'Vode', 12: 'Radau5', 13: 'AdamsBashforth2', 14: 'AdamsBashMoulton2'}¶
-
optimModels.utils.utils module¶
-
class
optimModels.utils.utils.
MyPool
(processes=None, initializer=None, initargs=(), maxtasksperchild=None, context=None)¶ Bases:
multiprocessing.pool.Pool
Note : sub-class multiprocessing.pool.Pool instead of multiprocessing.Pool because the latter is only a wrapper function, not a proper class.
-
Process
¶ alias of
NoDaemonProcess
-
-
class
optimModels.utils.utils.
MyTree
(name='root', children=None)¶ Bases:
object
Class to implement a generic tree.
-
add_child
(node)¶
-
-
class
optimModels.utils.utils.
NoDaemonProcess
(group=None, target=None, name=None, args=(), kwargs={}, *, daemon=None)¶ Bases:
multiprocessing.context.Process
Extension of class multiprocessing.Process which make ‘daemon’ attribute always return False
-
daemon
¶
-
-
optimModels.utils.utils.
fix_exchange_reactions_model
(model)¶ Convert the exchange reactions for the uptake reactions have negative fluxes and excretion reactions have positive fluxes. :param model: Metabolic model
Returns: a new copy of model where all exchange reactions are in the format ” A <—> “
-
optimModels.utils.utils.
get_order_nodes
(tree)¶ Returns the order of nodes
Parameters: tree (instance of MyTree) –
-
optimModels.utils.utils.
merge_two_dicts
(x, y)¶