algorecell_types Python module¶
This module implements generic types for representing predictions for the control of attractors in Boolean and multivalued networks, with various visualizations.
It accounts for instantaneous, temporary, and permanent perturbations, as well as sequential reprogramming strategies.
Typically, a method computing reprogramming strategies returns an object of
class ReprogrammingStrategies
, from which can be extracted and
visualized the set of identified strategies.
Exemples of projects using the algorecell_types
module:
-
class
_SymbolicType
(*args)[source]¶ Bases:
object
Abstract class of a symbolic type with list of arguments.
Implements a generic repr method.
-
class
_Perturbation
(partial_state)[source]¶ Bases:
algorecell_types._SymbolicType
Abstract class for representing a perturbation.
-
__init__
(partial_state)[source]¶ Parameters: partial_state (dict[str,int]) – effect of the perturbation, which assigns states to components
-
-
class
PermanentPerturbation
(partial_state)[source]¶ Bases:
algorecell_types._Perturbation
A permanent perturbation locks the specified components forever (mutation).
Example:
>>> p = PermanentPerturbation({"a": 1, "b": 0})
-
class
TemporaryPerturbation
(partial_state)[source]¶ Bases:
algorecell_types._Perturbation
A temporary perturbation locks the specified components until having reached an attractor, or until a
ReleasePerturbation
.Example:
>>> p = TemporaryPerturbation({"a": 1, "b": 0})
-
class
ReleasePerturbation
(partial_state)[source]¶ Bases:
algorecell_types._Perturbation
A release perturbation unlocks given components subject to a prior
TemporaryPerturbation
.Example:
>>> p = ReleasePerturbation({"a","b"})
-
class
InstantaneousPerturbation
(partial_state)[source]¶ Bases:
algorecell_types._Perturbation
An instantaneous perturbation modifies the states of the components and is immediatly released.
Example:
>>> p = InstantaneousPerturbation({"a": 1, "b": 0})
-
class
_Strategy
(*args)[source]¶ Bases:
algorecell_types._SymbolicType
-
perturbation_sequence
()[source]¶ Returns the sequence of perturbations encoded by the strategy
Return type: tuple of _Perturbation
objects
-
-
class
FromAny
(perturbation, *seq)[source]¶ Bases:
algorecell_types._Strategy
Reprogramming strategy that can be applied in any state of the network
-
__init__
(perturbation, *seq)[source]¶ Parameters: - perturbation (_Perturbation) – perturbation object
- seq (_Strategy) – optional the next strategy to apply (sequential reprogramming)
-
-
class
FromState
(state, perturbation, *seq)[source]¶ Bases:
algorecell_types._Strategy
Reprograming strategy that should be applied in the specified state
-
__init__
(state, perturbation, *seq)[source]¶ Parameters: - state (str) – alias of the state
- perturbation (_Perturbation) – perturbation object
- seq (_Strategy) – optional the next strategy to apply (sequential reprogramming)
-
-
class
FromCondition
(state, perturbation, *seq)[source]¶ Bases:
algorecell_types.FromState
Reprogramming strategy that should be applied only with the given condition
-
class
FromSteadyState
(state, perturbation, *seq)[source]¶ Bases:
algorecell_types.FromState
Reprogramming strategy that should be applied in the given steady state (fixed point).
-
class
FromOneInLimitCycle
(state, perturbation, *seq)[source]¶ Bases:
algorecell_types.FromState
Reprogramming strategy that should be applied in one state of the given cyclic attractor.
-
class
ReprogrammingStrategies
[source]¶ Bases:
object
Stores a list of reprogramming strategies and offers various visualization methods, including IPython representation.
-
as_graph
(compact=False)[source]¶ Returns a directed graph representation of the strategies Edge labels indicate the type and specification of perturbations.
Parameters: compact (bool) – draw compact edge labels Return type: pydot.Dot graph
-
as_table
()[source]¶ Returns a pandas.DataFrame where each row corresponds to a reprogramming stategy, and columns indicate which nodes are perturbated, in which direction.
Note that this representation hides the type of perturbation. Moreover sequential reproogramming strategies are flatten.
Red cells indicate a forced activation, green cells a forced inhibtion. Yellow cells indicate a sequential reprogramming strategy in which the node is first activated and then later inhibited, or conversely.
-
perturbations
()[source]¶ Returns the set of
_Strategy.perturbation_sequence()
of registered reprogramming strategies.Return type: set(tuple(_Perturbation))
-
aliases
¶ Returns a pandas.DataFrame listing the state aliases used by the reprogramming strategies.
-