This is a repository of the libraries needed to install the BNReduction tool for computing the steady states in the DrugLogics pipeline. Is also includes installation instructions for the terminal trapspace computation tool using Most Permissive Boolean Networks (MPBNs).
Apart from the below instructions, you can get some inspiration from this Dockerfile which installs the aforementioned libraries in Ubuntu 16.04
.
The installation process for Macaulay2 v1.6 (later versions won't work), boost v1.55 and the BNReduction script is as follows:
git clone https://github.com/druglogics/druglogics-dep.git
cd druglogics-dep
dpkg -i dep/libpari-gmp3_2.5.0-2ubuntu1_amd64.deb
# apt-get install liblapack3 -y # if needed only
dpkg -i dep/Macaulay2-1.6-common.deb
dpkg -i dep/Macaulay2-1.6-amd64-Linux-Ubuntu-14.04.deb
unzip dep/bnet_reduction-master.zip -d dep
tar jxfv dep/boost_1_71_0.tar.bz2 -C dep/bnet_reduction-master/
cd dep/bnet_reduction-master/
make clean
make install
To test the BNReduction
installation, you can run the Testing_BNReduction.sh
script inside the dep/bnet_reduction-master/
directory, to see if all tests pass:
./Testing_BNReduction.sh
To correctly use the BNReduction
script in the DrugLogics pipeline do the following:
- Place the location of the bnet directory, containing the
BNReduction.sh
file, in the environment variable BNET_HOME:
export BNET_HOME=/pathTo/druglogics-dep/dep/bnet_reduction-master
echo $BNET_HOME
There are various ways to set this environment variable permanently and one of them is to write export BNET_HOME=/pathTo/druglogics-dep/dep/bnet_reduction-master
to a file in /etc/profile.d/
, e.g. in /etc/profile.d/bnet.sh
.
- To significantly reduce the computation time for the steady state calculation, a reduced version of the BNReduction script that does not use the M2 library can be used. This way though, either one or no steady states can be found.
We have been using the 'reduced' way to run the BNReduction
script because the input boolean models are self-contained (no inputs) and so this significantly reduces the fixpoint attractors (making the use of the M2 library unnecessary since the reduced version outputs the same steady state most of the times).
We have made a new script that supports both execution modes (full and reduced).
Copy it to the directory stored in the BNET_HOME
variable:
# from druglogics-dep dir
cp BNReduction.sh $BNET_HOME
Thus, ./BNReduction.sh file.dat
uses the M2 library but running ./BNReduction.sh file.dat reduced
does not.
Please see the respective GitHub repository for installation instructions regarding the implemented Python module that computes attractors (terminal trapspaces) for the Most Permissive Boolean Networks (versions 1.2
to 1.6
should work just fine).
Make sure that import mpbn
inside a Python interpret works without errors.
The mpbn-attractors.py
is a python script that takes as input a .bnet
file and prints it's terminal trapspaces (one per line).
Test installation by running:
python mpbn-attractors.py model.bnet
The above should return the following output:
00**
1101
To properly use the mpbn-attractors.py
script in the DrugLogics pipeline do the following:
- Place the location of the directory that contains the
mpbn-attractors.py
script, in the environment variable MPBN_HOME:
export MPBN_HOME=/pathTo/dir-that-has-the-mpbn-attractors.py
echo $MPBN_HOME
There are various ways to set this environment variable permanently and one of them is to write export MPBN_HOME=/pathTo/dir-that-has-the-mpbn-attractors.py
to a file in /etc/profile.d/
, e.g. in /etc/profile.d/mpbn.sh
.
- Copy the script to the directory stored in the
MPBN_HOME
variable:
# from druglogics-dep dir
cp mpbn-attractors.py $MPBN_HOME