Regulatory graph visualization with GINsim#
GINsim models in GINML format contains layout information for displaying the regulatory graph of a Boolean or multi-valued network. The regulatory graph shows the activation and inhibition relations between the nodes of the network.
In this notebook, we show how to use the ginsim
Python module to visualize a network model, with optionnaly a state.
import ginsim
First, we load a model from the GINsim repository:
lrg = ginsim.load("http://ginsim.org/sites/default/files/SuppMat_Model_Master_Model.zginml")
Downloading http://ginsim.org/sites/default/files/SuppMat_Model_Master_Model.zginml
The regulatory graph can be visualized using the ginsim.show
function:
ginsim.show(lrg)
The show
function also allows an additional parameters which specifies for each node a state value (0 or 1 in case of a Boolean node).
This state can also come from the result of a model analysis, for instance, a fixpoint analysis.
Let us use biolqm to compute the fixpoints of the model with bioLQM:
import biolqm
First, we convert the model to bioLQM:
lqm = ginsim.to_biolqm(lrg)
Then, we use biolqm.fixpoints
to compute the list of all the fixpoints of the network, and store it in the fps
variable:
fps = biolqm.fixpoints(lqm)
print(len(fps), "fixpoints")
9 fixpoints
The third fixpoint (fps[2]
) can then be displayed as follows:
ginsim.show(lrg, fps[2])