Current Release Current PyPI Version Current Anaconda Version Documentation Status Supported Python Versions GitHub Actions CI-test Status Apache 2.0 License YAPF

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].

Installation instructions ...

Download Jupyter notebook examples ...

Network interventions Network interventions Plot animation

Parts of the compression routine is done by efmtool’s compression function ([6]).


The StrainDesign package is available on pip and Anaconda. To install the latest release, run:

pip install straindesign


conda install -c cnapy straindesign

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 envrionment without the need for a reinstallation.


In some cases, installing the StrainDesign python package may fail with the error:

JVMNotFoundException: No JVM shared library file (libjli.dylib) found. Try setting up the JAVA_HOME environment variable.

In this case, make sure Java is installed correctly and the JAVA_HOME varialbe is set. JAVA_HOME environment variable

If you’re on OS X and get the error

OSError: [Errno 0] JVM DLL not found

check that your Java and the JPype library is set up correctly. The easiest way to avoid this error is to use conda to install StrainDesign.


Computation examples are provided in the different chapters of this documentation. The original Jupyer notebook files are located in the StrainDesign package at docs/source/examples.

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)



[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,

Indices and tables