strainOptimizer
Repo for strain design based on ETFL/ecGEM models.
Overview
strainOptimizer is a Python package for strain design using enzyme-constrained genome-scale metabolic models (ecGEMs) and ETFL models. It implements advanced strain design algorithms such as ecFactory and ecFSEOF, which leverage the additional constraints provided by enzyme capacity to identify more realistic genetic modifications for enhanced production of target metabolites.
Installation
- Clone the repo
git clone https://github.com/hongzhonglu/strainOptimizer.git
- Set up the environment
conda create -n strainOpitimizer python=3.10
conda activate strainOpitimizer
conda env update --file environment.yml
pip install -e .
- Solvers
We recommend using commercial solvers such as CPLEX or Gurobi. Please install one of them and set up the corresponding Python API.
- GUROBI (version 10.0)
We recommend obtaining a valid Gurobi license. Otherwise, adjust the code to use a different optimizer. To retrieve your license::
grbgetkey <YOUR-LICENSE-KEY>
For details, see the Gurobi licensing guide: https://www.gurobi.com/documentation/
- CPLEX After installing CPLEX into the system, set the CPLEX Python API in your environment :
python [cplex_path]/python/setup.py install
Usage guide
More examples can be found in the examples folder.
Example script
Here is an example script for 2-PE strain design:
from strainOptimizer import strainOptimizer_engine,WorkflowParameters
# Model parameters - model path, type, solver, growth reaction
model_params = {
'model_path': 'example/models\yeast\ecYeastGEM_batch.xml',
'model_type': 'ecGEM',
'solver': 'optlang-gurobi',
'growth_id': 'r_2111',
}
# Strain parameters - target product and growth conditions
strain_params = {
'target_id': 'r_1589',
'product_name': '2-phenylethanol',
'c_source': 'r_1714_REV', # glucose exchange reaction
'c_uptake': 5, # glucose uptake rate (mmol/gDW/h)
}
# Algorithm control parameters - workflow and output settings
algorithm_params = {
'design_algorithm': 'ecFactory',
'simulation_method': 'ppfba',
'experimental_yield': None, # if without experimental yield data, use the 1/2
'remove_essential': True,
'output_directory': './results',
'steps':123,
'action_thresholds':[0.05,0.3,1.1]
# 'save_results': False,
# 'only_final_result': True,
# Note: ecFactory-specific parameters like steps, action_thresholds, etc.
# would need to be added to AlgorithmControl if they're used
}
# Create WorkflowParameters using the three-level structure
params = WorkflowParameters(
model=model_params,
strain=strain_params,
algorithm=algorithm_params
)
# Create workflow engine using the new framework
engine = strainOptimizer_engine(params)
# Load model
engine.load_model()
# Run the design workflow
final_result=engine.run_design()
# More detailed results can be accessed via engine.all_results.
# And results at each level have been saved in output_directory.
Contribution
- For contributors: Fork it to your Github account, and create a new branch from
dev.
Metadata
Release files for strainOptimizer 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| strainoptimizer-0.1.0.tar.gz | 153.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| strainoptimizer-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 335.6 kB
Release files / strainoptimizer-0.1.0.tar.gz
| Download URL | strainoptimizer-0.1.0.tar.gz |
|---|---|
| Size | 153.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd1bd75be3e9b9cb9ff7436c03e389c5f36d9c79dc7d416a4f28428a188bbc15
|
|
BLAKE2b-256 checksum How to use checksums |
f6552fecd34df3cbbb2e7d07058803003e551b3dec2c2ea29c4c534668c125f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Release files / strainoptimizer-0.1.0-py3-none-any.whl
| Download URL | strainoptimizer-0.1.0-py3-none-any.whl |
|---|---|
| Size | 181.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6215609993534003d9266d291ef8572a20318d9706b3804961833ff7c3601c96
|
|
BLAKE2b-256 checksum How to use checksums |
61fe5b7560886d950d3d721d9dbf8d6ee9ff73ec38282e24e92bc796a6f625f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|