Skip to content
CompMetEngPublic

About

GECKO Toolbox for Python

Resources

Stars

3 stars

Watchers

1 watching

Forks

Repository files navigation

GECKO

tests Release Documentation GitHub Discussions

Documentation · Installation · Guide · API reference · Migrate · Citations

geckopy

Enzyme-constrained genome-scale metabolic modelling in Python: the Python port of the GECKO Toolbox (MATLAB). It builds on cobrapy and raven-toolbox, and reads and writes the same ecModel YAML files as GECKO, so ecModels move between the two toolboxes without conversion.

An ecModel adds the limits of enzymes to a genome-scale model: each enzyme has a finite capacity (its kcat) and the cell has a finite protein budget. geckopy fetches kcats from BRENDA, predicts them with DLKcat, tunes them against growth and flux data with CMA-ES, applies custom curations and integrates proteomics.

Status: beta (4.0.0b2). The yeast-GEM tutorial runs end to end. The major and minor version follow GECKO, which is why it starts at 4.

Not the older geckopy. This is a new port of GECKO. It is unrelated to the earlier geckopy on PyPI (release 2.0.2 and earlier), described in Carrasco Muriel, Long & Sonnenschein, Microbiology Spectrum 11(6):e01705-23 (2023), doi:10.1128/spectrum.01705-23.

Install

Both geckopy and raven-toolbox are pre-releases, so pip needs --pre:

pip install --pre geckopy

Extras: geckopy[tutorial] (matplotlib), geckopy[evotune] (cma, for kcat tuning) and geckopy[dev] (pytest and ruff). Python 3.11 or newer.

Quick start

A minimal build, for a project folder with model_adapter.toml, models/ and data/:

from geckopy import ModelAdapter, load_conventional_gem, load_uniprot_tsv, make_ec_model, save_ec_model

adapter = ModelAdapter.from_folder("my_project")
model = load_conventional_gem(adapter)
uniprot = load_uniprot_tsv(adapter.params.path / "data" / "uniprot.tsv")
ec_model = make_ec_model(model, adapter, uniprot_db=uniprot)
save_ec_model(ec_model, "ecModel.yml", adapter=adapter)

The guide covers each step: Getting started, Building an ecModel and Gathering kcats. Every public function is available as from geckopy import X; geckopy.__all__ lists them, and the API reference documents them. The full protocol, with kcat curation, proteomics and Crabtree-effect simulation, is tutorials/full_ecModel/protocol.py. Fitting kcats to measured growth and fluxes is described in docs/evotune_kcat_tuning.md.

Documentation and parity with GECKO

The protocol, installation, troubleshooting and API reference for both toolboxes are at gecko-docs. The ecModel YAML format is described in the guide and in docs/yaml_format.md. geckopy ports GECKO function by function, and each source file names its MATLAB original. The parity ledger records, for every public function, whether the two agree and why where they do not.

Cite us

If you have used geckopy in your work, please cite the GECKO protocol:

Chen Y, Gustafsson J, Tafur Rangel A, Anton M, Domenzain I, Kittikunapong C, Li F, Yuan L, Nielsen J & Kerkhoven EJ. Reconstruction, simulation and analysis of enzyme-constrained metabolic models using GECKO Toolbox 3.0. Nature Protocols 19, 629-667 (2024). doi:10.1038/s41596-023-00931-7.

License

MIT. See LICENSE.

About

GECKO Toolbox for Python

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages