Top-level (Python)#
geckopy objects in geckopy.
Functions#
Function |
Summary |
|---|---|
List, or with --apply carry out, the steps that bring a GECKO 3 |
|
Convert |
|
Turn the protein usage and pool reactions of a GECKO 3 ecModel forward. |
|
Bring a GECKO 3 project to the GECKO 4 layout ( |
Reference#
cmd_brenda_refresh#
cmd_brenda_refresh(args: argparse.Namespace)
cmd_init#
cmd_init(args: argparse.Namespace)
cmd_kegg_download#
cmd_kegg_download(args: argparse.Namespace)
cmd_uniprot_download#
cmd_uniprot_download(args: argparse.Namespace)
cmd_upgrade#
cmd_upgrade(args: argparse.Namespace)
List, or with --apply carry out, the steps that bring a GECKO 3
project to the GECKO 4 layout (see geckopy.upgrade.upgrade_project).
convert_custom_kcats#
convert_custom_kcats(model: 'EcModel', *, custom_kcats: Optional[str | Path]=None, out_file: Optional[str | Path]=None, adapter: Optional['ModelAdapter']=None)
Convert data/customKcats.tsv into data/kcats/custom.tsv.
The kcats are those geckopy.ec_model.pipeline.apply_custom_kcats
gives the ecModel, including which of two entries for the same reaction
wins: one row per reaction, keyed by conventional reaction and enzyme set
(see geckopy.gather_kcats.ec_rxn_keys), with the entry's notes in
the note column. The stoicho column is left out: complex
stoichiometry comes from apply_complex_data. Unlike
apply_custom_kcats, custom.tsv also applies to light ecModels.
Parameters
modelThe full ecModel the custom kcats are for.
custom_kcats, out_fileThe file to convert and the file to write (default:
data/customKcats.tsvanddata/kcats/custom.tsvin the project). An existingout_fileis not overwritten.adapterModel adapter (default:
model.adapter).
Returns
(path, report)The file written, and a report with
rows(rows written).
main#
main(argv: list[str] | None=None)
upgrade_ec_model#
upgrade_ec_model(model: 'EcModel')
Turn the protein usage and pool reactions of a GECKO 3 ecModel forward.
GECKO 3 defined usage_prot_<id> (prot_<id> -> prot_pool) and
prot_pool_exchange (prot_pool ->) in the reverse direction, used
with negative flux; GECKO 4 defines them forward. Each reaction that is
still reverse gets the opposite stoichiometry, bounds and objective
coefficient; calling it again changes nothing. In place.
geckopy.load_ec_model already does this for the files it
reads; this is for models from other sources, such as SBML.
Returns
list of strThe reactions that were turned.
upgrade_project#
upgrade_project(project: str | Path, *, dry_run: bool=True, ec_model: Optional['EcModel']=None)
Bring a GECKO 3 project to the GECKO 4 layout (geckopy upgrade).
Lists, and with dry_run=False carries out:
custom kcats:
data/customKcats.tsvbecomesdata/kcats/custom.tsv(convert_custom_kcats);stored predictions:
data/DLKcat.tsvand stored OpenKineticsPredictor results become kcat source files (kcats_from_dlkcat,kcats_from_okpwithuse_stored), without running anything;saved ecModels:
models/*.ymlecModels made with GECKO 3 get their protein reactions turned forward (upgrade_ec_model);project_format = 4inmodel_adapter.toml;scripts: lines of the project's
.pyfiles that call renamed or replaced functions are listed, not changed.
Steps 1 and 2 need the full ecModel the custom kcats and predictions are
for (ec_model); without it they are listed and skipped. A project
with an adapter class instead of model_adapter.toml is converted by
GECKO's upgradeGECKOproject. A file that is replaced or converted is
first moved to legacy/<yyyy-mm-dd>/, keeping its place in the folder
tree. Steps already done are left out, so it can run again.
Returns
pandas.DataFrameOne row per step:
step,status(to do, done, skipped, failed, by hand) andnote.