The Generator of parametrised boolean networks provides generation of fully randomised parametrised boolean networks, as well as generation of parametrised boolean networks based on models, such as the Barabási-Albert model or the Watts-Strogatz model, using functions of the networkx module in Python. Format of the network is the SBML qual. Furthermore, generator is able to parametrise non-parametrised boloean network passed as argument. Generator requires the non-parametrised network to be in the SBML qual format.
Python 3.7+
Modules:
- networkx 2.5
Note: You might need to install tkinter package on some distributions of linux as follows:
$ sudo apt-get install python3.7-tk
Source: (https://stackoverflow.com/a/25905642)
There are three possible ways of using the application:
With the commands below, the user can generate a parametrised boolean network based on the arguments.
Command below generates a parametrised boolean network based on the Barabási-Albert model.
$ python3 parametrised_bn_gen/generator_of_parametrised_bn.py ba n m (seed?)
n - Number of nodes in the network.
m - Number of existing nodes connected to the newly added node. (Note that this only applies to the initially generated network built on the Barabási-Albert model. Transformation of the network to parametrised boolean network converts each edge to directed edge in a random direction; therefore, this doesn't apply to the resulting network.)
seed - Setting a seed value ensures that the generator generates the same network for the same seed. If left unfilled, the generator uses the current time.
Command below generates a parametrised boolean network based on the Watts-Strogatz model.
$ python3 parametrised_bn_gen/generator_of_parametrised_bn.py ws n k p (seed?)
n - Number of nodes in the network.
k - Number of neighbours connected to each node. (Same change as with Barabási-Albert model, each edge is converted to directed edge in a random direction.)
p - Probablity of rewiring each edge.
seed - ...
$ python3 parametrised_bn_gen/generator_of_parametrised_bn.py rand n p (seed?)
n - Number of nodes in the network.
p - Probability of the existence of an outgoing edge from one vertex to another.
seed - ...
Use this command to parametrise non-parametrised boolean network.
$ python3 parametrised_bn_gen/generator_of_parametrised_bn.py your_network.sbml
User can then find the generated network in the same directory as the script, named generated_bn.sbml.
Another way to generate a network is to create a json with the desired configuration. To do this, use:
$ python3 parametrised_bn_gen/generator_of_parametrised_bn.py your_conf.json
Example how the json should look like can be found within this repository in args.json. Please, use exactly this format and just change the values. Generating via json configuration is also viable using the GUI. GUI also supports exporting the entered configuration to json.
Upon realising the complexity of the documentation grows directly proportional to the number of arguments and consequently it becomes easier for the user to get lost, I have created a straightforward GUI for the application. GUI was developed using the tkinter module in Python.
To run the GUI, install the parametrised_bn_gen module using: Via ssh
$ pip3 install git+ssh://git@gitlab.fi.muni.cz/xziaran/generator-of-parametrised-boolean-networks.git
Via https
$ pip3 install git+https://gitlab.fi.muni.cz/xziaran/generator-of-parametrised-boolean-networks.git
Subsequently, clone the repository:
Via ssh
$ git clone git@gitlab.fi.muni.cz:xziaran/generator-of-parametrised-boolean-networks.git
Via https
$ git clone https://gitlab.fi.muni.cz/xziaran/generator-of-parametrised-boolean-networks.git
Navigate to the cloned repository and run:
$ python3 user_interface.py
or use the provided binary for your system.
Fill the corresponding windows and start generating.