GECKO and geckopy#
GECKO (MATLAB) and geckopy (Python) build and analyse enzyme-constrained models with the same algorithms, read the same project folder and exchange ecModels in the same YAML format. The two implementations correspond in objects and algorithms. They differ in some names, in some functions and in some behaviour.
MATLAB and Python pairs every function that exists on both sides and links each to its API entry.
Implementations#
GECKO is built on the RAVEN toolbox and the COBRA Toolbox. An ecModel is a RAVEN struct with the field
ec. The release number is inversion.txt.geckopy is built on cobrapy and raven-toolbox. An ecModel is an
EcModel, a subclass ofcobra.Model, with the attributeec. The release number is inpyproject.toml.Project and model files are shared. Both read the project from
model_adapter.tomland writegecko_formatto the saved model (see Project format 4).
Corresponding objects#
Aspect |
GECKO (MATLAB) |
geckopy (Python) |
|---|---|---|
Model |
RAVEN struct with the field |
|
Enzyme access |
index into the arrays of |
|
Adapter |
|
|
Default adapter |
|
none; |
Results |
|
a function changes the model in place and returns one value, a dataclass where MATLAB returns several |
Tables |
structs, cell arrays and MATLAB tables |
|
Names |
|
|
Indexing |
1-based |
0-based |
Web access |
|
|
ecModel file |
|
|
Names that differ in more than case#
The table is a selection; MATLAB and Python lists all pairs.
MATLAB |
geckopy |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
command |
|
|
|
|
Functions of one implementation#
GECKO#
MATLAB |
Reason |
|---|---|
|
geckopy has no global default adapter. |
|
A plot is drawn from the DataFrame that |
|
|
|
geckopy adapters are configured by |
ecTreeEstimate and kcatAssignmentConfig have a counterpart in geckopy (ECTree.estimate and kcat_assignment_config in geckopy.gather_kcats) that geckopy does not export.
geckopy#
Group |
Examples |
|---|---|
Result and data types |
|
Build steps of |
|
Algorithms |
|
Differences in behaviour#
The scenarios of the raven-gecko-parity repository run both implementations on the same input and compare the results. The ledger of that repository records two differences as checkpoints, and further differences in the notes of single rows.
ecFSEOFandec_fseofreturn the same target reactions on ecTestGEM. On the ecYeastGEM of the tutorial the order of targets differs in 27 positions, and the set of targets depends on the solver pair, because the pFBA solution that the regression uses is not unique. On ecYeastGEM 9.1.1 the order is the same.upgradeGECKOprojectandupgrade_projectdiffer for a project that has an adapter class and nomodel_adapter.toml.upgradeGECKOprojectconverts the class.upgrade_projectlists the adapter for conversion by hand, because an adapter class is MATLAB code, and then skips the conversion of the custom kcats and the stored predictions.sigmaFitterandfit_sigmascan the same grid of 0.01 steps.sigmaFitterreturns the smallest sigma within a relative 1e-9 of the smallest error, andfit_sigmatakes the first grid point with the smallest error, so solver rounding noise on a growth plateau can move its result to a later grid point.fit_sigmawithmethod="bisect"returns a continuous sigma.saveEcModelandsave_ec_modelwrite files that differ in charge, SBO terms, gene names and the subsystem of the protein usage reactions, because the models in memory differ in these fields; the layout of the files agrees.
See also#
MATLAB and Python, the full function pairing.
GECKO 3 to GECKO 4, the changes between the two major versions.