caspo-control Documentation¶
This Python module provides a simple wrapper for the control method of the tool caspo, which implements the computation of intervention strategies in logical signaling networks with Answer-Set Programming (https://doi.org/10.1017/S1471068413000422).
The control predictions can be processed using the algorecell_types library, which eases the display and comparison with other control methods.
Installation instructions at https://github.com/algorecell/caspo-control.
- Examples can be found at:
Quick usage:
>>> import caspo_control
Model loading:
>>> cc = caspo_control.load("model.bnet") # in BoolNet format
# alternatively, load with biolqm in any format
>>> lm = biolqm.load("model.zginml") # or any format support by bioLQM
>>> cc = caspo_control.load(lm)
Reprogramming predictions:
>>> rs = cc.reprogramming_to_attractor({"A": 1, "B": 0})
>>> rs
See help(rs)
for other display methods
-
class
caspo_control.
CaspoControl
(bn, fixed={})¶ Wrapper for the caspo control method.
Parameters: - bn – Boolean network in any format supported by
colomoto.minibn.BooleanNetwork
, which includes filename in BoolNet format, andbiolqm
orginsim
objects. - fixed (dict[str,int]) – fix the given nodes to their associated given values
-
reprogramming_to_attractor
(*goal_spec, exclude_goal=False, maxsize=0, **goal_kwspec)¶ Compute reprogramming strategies ensuring that all the attractors of the perturbed network match with the given specification with the (general) asynchronous mode. The perturbations are permanent, and can change the attractors of the input model.
Parameters: - exclude_goal (bool) – Whenever
True
, skip solutions controlling the nodes specified for the reprogramming goal (default:False
) - maxsize (int) – maximum number of simultaneous perturbations
(default:
0
, unlimited)
Return type: Examples:
>>> rs = cc.reprogramming_to_attractor(A=1, B=0) >>> rs = cc.reprogramming_to_attractor({"A": 1, "B": 0})
- exclude_goal (bool) – Whenever
- bn – Boolean network in any format supported by
-
caspo_control.
load
(bn, fixed={})¶ Returns
CaspoControl
(bn, fixed) object