Skip to content

Edge cases of geckopy agree with GECKO - #78

Merged
edkerk merged 39 commits into
developfrom
fix/parity-round-5
Nov 1, 2026
Merged

edkerk merged 39 commits into
developfrom
fix/parity-round-5

Conversation

@edkerk

@edkerk edkerk commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

Where geckopy and GECKO gave different results for the same input, both now behave alike. Invalid input raises, data that cannot apply to an item is skipped with a warning, and an explicitly empty list selects nothing. Each change has a test, and the CHANGELOG lists them.

Function Behaviour
read_kcat_source a row of empty quoted fields is skipped; a field that opens a quote and never closes it raises ValueError
read_dlkcat_output, write_dlkcat_input non-finite kcats are dropped; rows are written in ec.rxns order
ECTree, kcats_from_ec_tree k = NaN raises; an empty ec_rxns gives an empty list; a repeated reaction counts once
assign_standard_kcat an exchange reaction is one without substrate or without product
review_assignment, EcStats, ec_stats_from_brenda exported from geckopy.gather_kcats and geckopy; the sources custom and standard compare in any case
find_met_smiles an empty metabolite name is skipped with a warning
screen_kcat_leverage, compute_excarbon equal-rank rows keep the order of their tie groups; a model without metabolite formulas warns
best_parsimonious, cmaes_kcat_tuning a NaN RMSE is skipped; the search does not stop on cma's flat-fitness criteria
geckopy.kcat_tuning.evotune exports best_parsimonious, n_changed, parsimony_frontier and isozyme_tie_map
ec_fseof targets are ranked by slope times correlation rounded to 9 significant digits, so scores equal up to solver noise keep model order
fill_enz_concs, constrain_enz_concs a negative abundance or concentration raises; a prior lower bound above the new upper bound is reset to 0
load_flux_data, report_enzyme_usage, enzyme_usage a missing file, a file without exchange columns and a ragged row raise; a negative top_abs_usage raises; an enzyme without a usage reaction is left out with a warning
apply_kcat_constraints on a light model the update list takes cobra ids and ec ids
pfba_enzymes a given fraction_of_optimum is multiplied by 0.999999, as the default is
save_ec_model an ec reaction without enzymes is written without an enzymes entry (the readers still accept the older forms); an existing metaData description is kept

Depends on CompMetEng/raven-toolbox for the writer of the ec-rxns section and for the reader that turns GECKO 3 protein reactions forward. Parity: CompMetEng/raven-gecko-parity ledger and scenarios.

edkerk added 30 commits October 31, 2026 18:15
The order no longer depends on the shadow price, which depends on the basis at a degenerate optimum. Enzymes at their bound are solved again with the bound raised by fold_change; multiple_active marks rows where another capacity constraint is active.
…at objective

best_parsimonious ignores points with a NaN rmse, screen_kcat_leverage sorts
stably, cmaes_kcat_tuning does not stop on a flat generation, and
compute_excarbon warns for a model without metabolite formulas.
…mics_greedy, apply_complex_data and add_new_rxns_to_ec
…field with an opening quote and no closing one
# Conflicts:
#	CHANGELOG.md
# Conflicts:
#	CHANGELOG.md
# Conflicts:
#	CHANGELOG.md
The default description is written only when the model has none, as
saveEcModel does.
# Conflicts:
#	CHANGELOG.md
# Conflicts:
#	CHANGELOG.md
# Conflicts:
#	CHANGELOG.md
# Conflicts:
#	CHANGELOG.md
# Conflicts:
#	CHANGELOG.md
Tests cover the round trip, the saved text and the light tutorial ecModel. The format page and the docstrings describe the optional enzymes entry.
# Conflicts:
#	CHANGELOG.md
# Conflicts:
#	CHANGELOG.md
@edkerk
edkerk merged commit f4550b2 into develop Nov 1, 2026
5 checks passed
@edkerk
edkerk deleted the fix/parity-round-5 branch November 1, 2026 14:24
@edkerk edkerk mentioned this pull request Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant