Skip to content

Edge cases of GECKO agree with geckopy - #21

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

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

Conversation

@edkerk

@edkerk edkerk commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Where GECKO and geckopy 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 unit test (tc0300 to tc0700).

Function Behaviour
loadKcatSource a field that opens a quote and never closes it raises loadKcatSource:quote; a row of empty quoted fields is skipped
collectKcats, mergeKcats a file named by both database_top and database_bottom is one candidate list; a leading okp_ of a source is dropped for matching
readDLKcatOutput inf and malformed kcats are dropped; a row with a substrate the model lacks is dropped with a warning, and the option strict raises instead; a file without any kcat raises readDLKcatOutput:noKcats
writeDLKcatInput an empty selection writes an empty file; the selection is a logical vector
kcatAssignmentConfig an empty preset, a criteria other than max, min, median or mean, and a sources that is not a cell raise kcatAssignment:config
kcatsFromECTree an explicitly empty ecRxns selects nothing; a repeated reaction gives one row
getStandardKcat Pseudoreaction and SLIME rxn match in any case; a second call on a light model works
assignKcatValues ec.source is the lower-case label with (wc=…, origin=…) when known, as geckopy writes it
resolveTunableContext a source such as combined (sd=0.10, n=2) belongs to the group of its name before the bracket and gets that group's sigma0
ecStatsFromBrenda, loadBrendaMeasurements per-EC median and maximum from loadBRENDAdata, EC keys keep their case; measurements.tsv.xz is read in preference to measurements.tsv
getECfromDatabase the action display warns and takes the lowest-index protein; an empty logical selection searches nothing; any other action than display or ignore raises getECfromDatabase:unsupportedAction
ecFSEOF targets are ranked by slope times correlation rounded to 9 significant digits, so scores equal up to solver noise keep model order
getECfromGEM a model without model.eccodes warns (getECfromGEM:noEccodes) and every EC number is empty
findMetSmiles the last row of a duplicated name wins; an empty metabolite name is skipped with a warning
fillCarbonNum a model without metFormulas warns and gives every exchange the carbon number 1
addNewRxnsToEC, applyComplexData a reaction whose enzymes already exist is added; a stoichiometry of 0 counts as 1
calculateFfactor, relaxProteomicsGreedy {} means no enzymes, [] means every enzyme
constrainEnzConcs, fillEnzConcs a negative concentration or abundance raises
constrainFluxData, loadFluxData a missing exchange reaction, an invalid maxMinGrowth, an unknown condition, a missing file, a file without exchange columns and a ragged row raise
getEnzymeUsage, reportEnzymeUsage an enzyme without a usage reaction is left out with a warning; zero=false works; a negative topAbsUsage raises
truncateValues Inf is returned unchanged
applyKcatConstraints on a light model the update list takes cobra ids and ec ids; all-zero kcats clear the pool coefficients
saveEcModel the default metaData description is written when the model has none, and an existing one is kept

The format change for ec reactions without enzymes (no enzymes entry) is in RAVEN (writeYAMLmodel), which saveEcModel uses; this branch has its test, tc0700. Parity: CompMetEng/raven-gecko-parity ledger and scenarios.

edkerk added 30 commits October 31, 2026 19:32
A model without metFormulas gave an error from the field access; every
exchange now gets the carbon number 1 and a warning, as geckopy does.
…columns, and reads nested parentheses in headers
…eUsage reads filtered usage and rejects a negative topAbsUsage
…eld with an opening quote and no closing one
…ctions and leaves out unknown substrates; writeDLKcatInput writes an empty file for an empty selection
… explicit empty ecRxns as no reaction; getStandardKcat matches pseudoreaction names in any case and runs twice on a light ecModel
# Conflicts:
#	test/VerificationMatrix.tsv
A model without annotation.description gets 'Enzyme-constrained model of <id>'; an
existing description is kept, as save_ec_model does.
… and clears its pool coefficients when every kcat is 0
…y the wildcard level and origin in brackets, as geckopy does
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

Unit test results

71 tests   71 ✅  11s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit 87017dc.

@edkerk
edkerk merged commit 8cc58d7 into develop Nov 1, 2026
2 checks passed
@edkerk
edkerk deleted the fix/parity-round-5 branch November 1, 2026 14:23
@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