StrainDesign
A COBRApy[1]-based package for computational design of metabolic networks
The comprehensive StrainDesign package for MILP-based strain design computation with the COBRApy toolbox supports MCS, MCS with nested optimization, OptKnock[2], RobustKnock[3] and OptCouple[4], GPR-rule integration, gene and reaction knockouts and additions as well as regulatory interventions. The automatic lossless network and GPR compression allows strain design computations from genome-scale metabolic networks. Supported solvers are GLPK (available from COBRApy), CPLEX, Gurobi and SCIP[5].
To get started, check out the StrainDesign documentation. Guides and examples are provided as Jupyter notebooks at docs/source/examples.
The compression routine follows the approach of efmtool's compression function (csb.ethz.ch/tools/software/efmtool.html[6]), reimplemented in pure Python with exact rational arithmetic.
Installation
The StrainDesign package is available on pip and Anaconda. To install the latest release, run:
pip install straindesign
or
conda install -c cnapy straindesign
The StrainDesign package installation and operability is tested regularly in the most recent Windows, Ubuntu and Mac-OS distributions through continuous integration testing. Currently, these tests fail in Mac-OS due to conflicts within the cobrapy package in Mac-OS. If a workable cobrapy version is installed under Mac-OS, StrainDesign should work as well.
Developer Installation
Download the repository and run
pip install -e .
in the main folder. Through the installation with -e, updates from a git pull are at once available in your Python environment without the need for a reinstallation.
Install additional solvers
The cobra package is shipped with the GLPK solver. The more powerful commercial solvers IBM CPLEX and Gurobi may be used by cobra and the straindesign package. This makes sense in particular when using strain design algorithms like MCS, OptKnock etc. As another alternative solver, SCIP may be used. In the following, you will find installation instructions for the individual solvers.
CPLEX
Together with Gurobi, CPLEX is the perfect choice for computing strain designs. Its stability and support of advanced features like indicator constraints and populating solution pools make it indispensible for genome-scale computations.
You will need an academic or commercial licence for CPLEX. Download and install the CPLEX suite and make sure that your CPLEX and Python versions are compatible. This step will not yet install CPLEX in your Python environment. Once the installation is completed, you may link your installation to your Python/conda environment. This is the next step.
Using the command line, navigate to your CPLEX installation path and into the Python folder. The path should look similar to C:/Program Files/CPLEX210/python. Make sure to activate the same Python/conda environment where cobra and straindesign are installed. Then call
python setup.py install
Now CPLEX should be available for your computations.
The official instructions can be found here.
Gurobi
Similar to CPLEX, Gurobi offers a fast MILP solver with the advanced features of indicator constraints and solution pooling. The installation steps are similar to the ones of CPLEX.
First, you will need an academic or commercial license and install the Gurobi solver software. Ensure that the versions of gurobi and Python are compatible, install Gurobi to your system and activate your license following the steps from the Gurobi manual. In the next step you will link your Gurobi installation to your Python/conda environment.
Using the command line, navigate to your Gurobi installation path and into the Python folder. The path should look similar to C:/gurobi950/windows64. Make sure to activate the same Python/conda environment where cobra and straindesign are installed. Then call
python setup.py install
If your gurobipy package does not work right away, additionally install the gurobi package from conda or PyPI via
conda install -c gurobi gurobi
or
python -m pip install gurobipy
Now Gurobi should be available for your computations.
The official instructions can be found here.
SCIP
Less powerful than CPLEX and Gurobi, the open source solver SCIP still offers the solution of MILPs with indicator constraints, which gives it an edge above GLPK in terms of stability. If you want to use SCIP, you may install it via conda or pip:
conda install -c conda-forge pyscipopt
or
python -m pip install pyscipopt
[!WARNING] If you encounter program crashes with SCIP (a dependency of pyscipopt), make sure you use a version different from 8.0.1. You can, for instance, manually install version 8.0.0 through
conda install -c conda-forge scip=8.0.0. Version 9.1.0 has been tested with StrainDesign successfully.
Official website: github.com/scipopt/PySCIPOpt
CNApy integration
CNApy, a GUI-featured toolbox for metabolic modeling, offers a graphical user interface for the modeling and design of metabolic networks. The software provides a dialog box for specifying strain design problems.
How to cite
Schneider P., Bekiaris P. S., von Kamp A., Klamt S. — StrainDesign: a comprehensive Python package for computational design of metabolic networks. Bioinformatics, btac632 (2022)
References
[1] Ebrahim, A., Lerman, J.A., Palsson, B.O. et al. — COBRApy: COnstraints-Based Reconstruction and Analysis for Python. BMC Syst Biol 7, 74 (2013)
[2] Burgard, A. P., Pharkya, P., & Maranas, C. D. — OptKnock: a bilevel programming framework for identifying gene knockout strategies for microbial strain optimization. Biotechnology and Bioengineering, 84(6), 647–657 (2003)
[3] Tepper N., Shlomi T. — Predicting metabolic engineering knockout strategies for chemical production: accounting for competing pathways. Bioinformatics, Volume 26, Issue 4, Pages 536–543 (2010)
[4] Jensen K., Broeken V., Lærke Hansen A.S., et al. — OptCouple: Joint simulation of gene knockouts, insertions and medium modifications for prediction of growth-coupled strain designs. Metabolic Engineering Communications, Volume 8 (2019)
[5] Bestuzheva K., Besançon M., Chen W.K. et al. — The SCIP Optimization Suite 8.0. Available at Optimization Online and as ZIB-Report 21-41 (2021)
[6] Marco Terzer, Jörg Stelling — Large-scale computation of elementary flux modes with bit pattern trees. Bioinformatics, Volume 24, Issue 19 (2008), Pages 2229–2235
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file straindesign-1.19.1.tar.gz.
File metadata
- Download URL: straindesign-1.19.1.tar.gz
- Upload date:
- Size: 197.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3a51ac978e07b124ddc07595b421d4cfea0c976b03426800a22948927384489
|
|
| MD5 |
8594e6dbb8c08e5fb7075905f3223eae
|
|
| BLAKE2b-256 |
c441f0e41f9d6a933aa63efaf65693e6443dfd5f262819093002bc9ba02df625
|
File details
Details for the file straindesign-1.19.1-py3-none-any.whl.
File metadata
- Download URL: straindesign-1.19.1-py3-none-any.whl
- Upload date:
- Size: 184.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d995379d082667a5b33729130bb4b4b798943025eaca5082d6503554e3146f76
|
|
| MD5 |
58e0c94f40cbad833321d0ef964baebf
|
|
| BLAKE2b-256 |
616090fc91d681006e00984c2391c388940dd178f3fbd492e53d1c10f056a8eb
|