A test on a CoLoMoTo Docker image

A test on a CoLoMoTo Docker image#

Requires installation#

  • colomoto-docker, ginsim, and ginsim-python from the Anaconda repository (channel: colomoto)

  • jinja2 and pydot (channel: conda-forge)

  • graphviz (os package manager)

from optboolnet.launch import control_fixpoint
import biolqm
import warnings
warnings.filterwarnings("ignore", category=FutureWarning)

This package relies on a third-party mixed-integer programming solver gurobi, which is already installed on CoLoMoTo Docker

By default, Gurobi is limited to small models. To solve large scale problems, you need to install the license (free for academic use) and set the GRB_LICENSE_FILE environment variable.

(Unblock the following code after locating gurobi.lic license file in /notebook folder)

For a CoLoMoTo Docker environment, consider a Web License Service (WLS) license file (See Gurobi WLS documentation for details).

# import os

# os.environ["GRB_LICENSE_FILE"] = "/notebook/gurobi.lic"
# Setup
lqm = biolqm.load("http://ginsim.org/sites/default/files/Bladder_Model.zginml")
bn = biolqm.to_minibn(lqm, ensure_boolean=True)

inputs = {
    "GrowthInhibitors":1,
    "EGFR_stimulus":1,
    "FGFR3_stimulus":1
}
target = {"Apoptosis_b1": 1, "RB1": 1}
Using local file Bladder_Model.zginml
# By default, if no attractors are found after a control, we accept it as a valid control.
s = control_fixpoint(bn, max_size=2, target=target, inputs=inputs, exclude=["Apoptosis_b1","RB1"], allow_empty_attractor=True)
display(s.as_graph())
display(s.as_table())
Restricted license - for non-production use only - expires 2026-11-23
../../_images/eda95dbd2b8c6f672a799826686384c7b7a0c1ccb72e7b31058b7a25c8e268b8.svg
  ATM_b1 DNAdamage EGFR_stimulus FGFR3 FGFR3_stimulus GrowthInhibitors RAS SPRY p16INK4a
0 0 1
1 0 1
2 1 0
3 1 0
4 0 1
5 0 1
6 1 0
7 1 0
8 1 0
9 1 0
10 1 0
11 1 0
12 1 0
13 1 0
14 1 0
15 1 0
# If you want to only accept controls that lead to at least one attractor, set allow_empty_attractor to False
s = control_fixpoint(bn, max_size=2, target=target, inputs=inputs, exclude=["Apoptosis_b1","RB1"], allow_empty_attractor=False)
display(s.as_graph())
display(s.as_table())
../../_images/411ad7e59197061f52a74371b0214d25a21a1fb6c10497f12b4ec33cc4fbbd1d.svg
  ATM_b1 DNAdamage GrowthInhibitors p16INK4a
0 1 0
1 1 0
2 1 0
3 1 0