Package trapmvn
implements trap space detection in multi-valued
logical models through answer set programming. Currently, we support
SBML-qual (used e.g. by GINsim)
and BMA model formats as inputs.
You can install trapmvn
through pip
:
pip install git+https://github.com/giang-trinh/trap-mvn.git
You can use trapmvn
from command line as a standalone program. The
output should be a valid .tsv
file (tab-separated-values) representing
all trap space. The program accepts the following arguments:
-c
[--computation
]: Usemin
,max
orfix
to compute minimal trap spaces, maximal trap spaces, or fixed-points.-s
[--semantics
]: Useunitary
orgeneral
to define the desired model variable update scheme.-m
[--max
]: Integer limit on the number of enumerated solutions.-fm
[--fixmethod
]: Use eitherdeadlock
andsiphon
to switch between different fixed-point computation methods (only applies when combined with-c fix
).
The input model can be either given on standard input (in which case the presumed format is SBML), or as a file path in the last argument (in which case we infer the format from the file extension).
Example usage:
python3 -m trapmvn --computation max --semantics general --max 10 ./path/to/model.bma
python3 -m trapmvn -c min -s unitary -m 100 ./path/to/model.sbml
If you want to use trapmvn
directly from Python, you can inspect Jupyter notebooks
in our case-study
folder. Here, we show how to load a model, convert it into a
Petri net encoding and subsequently compute trap spaces using the trapmvn
method.
The case study itself is concerned with assessing the reliability of knockout interventions in a large-scale model of Myc-deregulation in breast cancer. Specifically, we compare the trap spaces for all viable single- and dual- variable knockouts, and we hten compare these interventions on the basis of their "reliable" and "opportunistic" effects on the model phenotypes.
In the benchmarks
folder, you can find several Jupyter notebooks with performance
comparison between trapmvn
and other similar tools, like trappist
, mpbn
and an-asp
.