Skip to content

A Python package for computing various types of trap spaces in multi-valued networks

License

Notifications You must be signed in to change notification settings

giang-trinh/trap-mvn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trap space detection in multi-valued networks with trapmvn

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

Command line usage

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]: Use min, max or fix to compute minimal trap spaces, maximal trap spaces, or fixed-points.
  • -s [--semantics]: Use unitary or general to define the desired model variable update scheme.
  • -m [--max]: Integer limit on the number of enumerated solutions.
  • -fm [--fixmethod]: Use either deadlock and siphon 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

Python API and case study

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.

Benchmarks

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.

About

A Python package for computing various types of trap spaces in multi-valued networks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published