The repository is the tool of our CP2025 paper.
The tool counts the number of minimal trap spaces and fixed points of a Boolean network. The detailed can be found here: CP2025.
git clone --recurse-submodules https://github.com/meelgroup/bn-counting.git
You need to install cmake, g++, re2c, and bison.
sudo apt install build-essential bison re2c cmake gringo clasp python3-pip
Install python packages
pip install networkx
pip install clingo
pip install biodivine-aeon
You need to compile approxasp and install python package fASP and tsconj. The following command to do that:
chmod +x build.sh
./build.sh
Input:
Boolean Network: a Boolean network (.bnet file)
For counting minimal trap spaces:
python3 script/run_minimal_trap_space.py -t 1 -bn tests/t1_244.bnet
it should print the count in line: C-MTS-1:
For counting fixed points:
python3 script/run_fixed_point.py -t 1 -bn tests/t1_244.bnet
it should print the count in line: C-FIX-1:
Input:
Boolean network: a Boolean network (.bnet file)phenotype: a phenotype, we specify it in a file. You can see example in filephen_244.txt
For counting minimal trap spaces:
python3 script/run_minimal_trap_space.py -t 2 -bn tests/t1_244.bnet -phen tests/phen_244.txt
it should print the count in line: C-MTS-2:
For counting fixed points:
python3 script/run_fixed_point.py -t 2 -bn tests/t1_244.bnet -phen tests/phen_244.txt
it should print the count in line: C-FIX-2:
Input:
Boolean network: a Boolean network (.bnet file)phenotype: a phenotype, we specify it in a file. You can see example in filephen_244.txtperturbation: a perturbation, we specify it in a file. You can see example in filepert_244.txt
For counting minimal trap spaces:
python3 script/run_minimal_trap_space.py -t 3 -bn tests/t1_244.bnet -phen tests/phen_244.txt -pert tests/pert_244.txt
it should print the count in line: C-MTS-3:
For counting fixed points:
python3 script/run_fixed_point.py -t 3 -bn tests/t1_244.bnet -phen tests/phen_244.txt -pert tests/pert_244.txt
it should print the count in line: C-FIX-3:
We used tsconj and fASP to encode BNs to ASP program, for minimal trap space and fixed points, respectively. The original implementation is modified for our usage.
The benchmark of our CP2025 experiments is available at https://zenodo.org/records/19665913.
If you use it, please cite our work:
@article{KTPM2025,
title={Scalable counting of minimal trap spaces and fixed points in boolean networks},
author={Kabir, Mohimenul and Trinh, Van-Giang and Pastva, Samuel and Meel, Kuldeep S},
booktitle={CP},
year={2025}
}