In [1]:
import caspo_control
import biolqm

Downloading of the model

In [2]:
model = biolqm.load("http://ginsim.org/sites/default/files/Bladder_Model.zginml")

Conversion of the model from multivalued to Boolean

In [3]:
inputs = {
    "GrowthInhibitors":1,
    "EGFR_stimulus":1,
    "FGFR3_stimulus":1
}
target = {"Apoptosis_b1": 1, "RB1": 1}
In [4]:
cc = caspo_control.load(model, inputs)
In [5]:
s = cc.reprogramming_to_attractor(target, maxsize=2)
s
Out[5]:
[FromCondition('input', PermanentPerturbation(DNAdamage=1, RB1=1)),
 FromCondition('input', PermanentPerturbation(ATM_b1=1, RB1=1)),
 FromCondition('input', PermanentPerturbation(Apoptosis_b1=1, RB1=1)),
 FromCondition('input', PermanentPerturbation(RB1=1, TP53=1))]
In [6]:
s.as_table()
Out[6]:
ATM_b1 Apoptosis_b1 DNAdamage RB1 TP53
0 1 1
1 1 1
2 1 1
3 1 1
In [7]:
s.as_graph()
Out[7]:
target target input input input->target P(DNAdamage=1, RB1=1) input->target P(ATM_b1=1, RB1=1) input->target P(Apoptosis_b1=1, RB1=1) input->target P(RB1=1, TP53=1)
In [8]:
s.aliases
Out[8]:
EGFR_stimulus FGFR3_stimulus GrowthInhibitors
input 1 1 1
In [9]:
from colomoto_jupyter import tabulate
In [10]:
test = biolqm.to_minibn(model, ensure_boolean=True)
for n, v in inputs.items():
    test[n] = v
test["RB1"] = 1
test["TP53"] = 1
In [11]:
tabulate(biolqm.fixpoints(test.to_biolqm()))
Out[11]:
AKT ATM_b1 ATM_b2 Apoptosis_b1 Apoptosis_b2 CDC25A CHEK1_2_b1 CHEK1_2_b2 CyclinA CyclinD1 CyclinE1 DNAdamage E2F1_b1 E2F1_b2 E2F3_b1 E2F3_b2 EGFR EGFR_stimulus FGFR3 FGFR3_stimulus GRB2 GrowthInhibitors Growth_Arrest MDM2 PI3K PTEN Proliferation RAS RB1 RBL2 SPRY TP53 p14ARF p16INK4a p21CIP
0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 0 0 1 0 1 1 1 1 1 0 0 1
1 0 1 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 1 1 1 0 1 1 0 0 1 0 1 1 1 1 1 0 0 1
In [ ]: