Control¶
These are methods and modules used to calculate control in Boolean Networks. They are divided in dynamics- and structure-based methods.
Note that these methods do not need to be called directly, as cana.boolean_network.BooleanNetwork
provides the appropriate methods.
Contents
Dynamics based control¶
The control methods used here are implemented directly on the base class BooleanNetwork
and BooleanNode
. That is because the Network class can ask its nodes directly to step into a specific trajectory, thus compartmentalizing the logic.
Attractor Control¶
-
BooleanNetwork.
attractor_driver_nodes
(min_dvs=1, max_dvs=4, verbose=False)[source] Get the minimum necessary driver nodes by iterating the combination of all possible driver nodes of length \(min <= x <= max\).
- Parameters
min_dvs (int) – Mininum number of driver nodes to search.
max_dvs (int) – Maximum number of driver nodes to search.
- Returns
The list of driver nodes found in the search.
- Return type
(list)
Note
This is an inefficient bruit force search, maybe we can think of better ways to do this?
-
BooleanNetwork.
controlled_state_transition_graph
(driver_nodes=[])[source] Returns the Controlled State-Transition-Graph (CSTG). In practice, it copies the original STG, flips driver nodes (variables), and updates the CSTG.
- Parameters
driver_nodes (list) – The list of driver nodes.
- Returns
The Controlled State-Transition-Graph.
- Return type
(networkx.DiGraph)
-
BooleanNetwork.
controlled_attractor_graph
(driver_nodes=[])[source] - Parameters
cstg (networkx.DiGraph) – A Controlled State-Transition-Graph (CSTG)
- Returns
The Controlled Attractor Graph (CAG)
- Return type
(networkx.DiGraph)
Structure based control¶
These are control methods that only take the structure of the boolean network (aka: the structure graph) into consideration when computing driver nodes.
Feedback Vertex Set¶
The NP-complete Feedback Vertex Set (FVS) problem is defined as the minimum number of vertices that need to be removed from a directed graph so that the resulting graph has no direct cycle. [PQR98] [ABGD13].
Two methods are implemented here. A bruteforce and the Greedy Randomized Adaptive Search Procedure (GRASP) method by [PQR98].
-
cana.control.fvs.
fvs_bruteforce
(directed_graph, max_search=5, keep_self_loops=True)[source]¶ The Feedback Vertex Set bruteforce implementation.
- Parameters
directed_graph (networkx.DiGraph) – The structure graph.
max_search (int) – Maximum number of additional variables to include in the search.
keep_self_loops (bool) – If self-loops are used in the computation. By FVS theory, all self-loop nodes are needed for control.
- Returns
A list of sets with with the driver nodes.
- Return type
(list)
Warning
Use the GRASP method for large graphs.
See also
-
cana.control.fvs.
fvs_grasp
(directed_graph, max_iter=100, keep_self_loops=True)[source]¶ The Feedback Vertex Set GRASP implementation. This implementation is not exact but it is recommended for very large graphs.
- Parameters
directed_graph (networkx.DiGraph) – The structure graph.
max_iter (int) – Maximum number of iterations for the search.
keep_self_loops (bool) – If self-loops are used in the computation. By FVS theory, all self-loop nodes are needed for control.
- Returns
A list of sets with the driver nodes.
- Return type
(list)
See also
Minimum Dominating Set¶
-
cana.control.mds.
mds
(directed_graph, max_search=5, keep_self_loops=True)[source]¶ The minimum dominating set method.
- Parameters
directed_graph (networkx.DiGraph) – The structural graph.
max_search (int) – Maximum search of additional variables. Defaults to 5.
keep_self_loops (bool) – If self-loops are used in the computation.
- Returns
A list of sets with the driver nodes.
- Return type
(list)
Structural Controllability¶
-
cana.control.sc.
sc
(directed_graph, keep_self_loops=True)[source]¶ The Structural Contolability driver sets.
- Parameters
directed_graph (networkx.DiGraph) – The directed graph capturing the network structure.
keep_self_loops (bool) – Determines if the self loops are kept in the determination of structural control.
- Returns
A list of sets with the driver nodes.
- Return type
(list)
See also
If you only need the size of the set, see
sc_min_size()
.
-
cana.control.sc.
sc_min_size
(directed_graph, keep_self_loops=True)[source]¶ The minimum number of driver variables required by structural controllability.
- Parameters
directed_graph (networkx.DiGraph) – The directed graph capturing the network structure.
keep_self_loops (bool) – Determines if the self loops are kept in the determination of structural control.
- Returns
The number of driver variables necessary to render the graph structurally controlled.
- Return type
(int)
See also