Repository navigation
Assign kcats from the kcat source files, as model_adapter.toml sets - #9
Merged
Merged
Conversation
Gathered kcats are written to data/kcats/<source>.tsv in the project, keyed by conventional reaction and enzyme set rather than model.ec.rxns, so a file stays valid when the ecModel is rebuilt and applies to full and light models alike. geckopy reads and writes the same files. - kcatsFromBrenda, kcatsFromDLKcat and kcatsFromOKP gather one source each, with that source's own options, and write its file. OKP keeps a job and a result per method, and only uses a stored result of the current job. - saveKcatSource writes any kcat list; readKcatSource reads a file; loadKcatSource maps a file to a model and reports rows with an invalid kcat, rows that fit no reaction, and rows that match only part of an enzyme set. - getEcRxnKeys gives the conventional reaction and enzyme set of every model.ec reaction. - fetchOpenKineticsPredictor takes the file to store the result in. Original-commit: SysBioChalmers/GECKO@f3a696c
…t-assignment Original-commit: SysBioChalmers/GECKO@ed138e1
collectKcats decides one kcat per reaction from the files in data/kcats, in the stages of [kcat_assignment] (a preset, or [[kcat_assignment.stage]] tables), without changing the model, and writes output/<model id>_kcatDecisions.tsv. assignKcats applies the decisions and the kcat constraints. updateKcatSources gathers the source files the configuration needs that are missing, or outdated against [kcat_sources.<name>]. The default preset, gecko_median, orders custom kcats, the BRENDA median of matches without EC wildcards at origins 1 to 4, DLKcat, then the other BRENDA matches. gecko_classic keeps the GECKO 3 order with the BRENDA maximum; the full_ecModel tutorial uses it and gives the same model as before.
Unit test results61 tests 61 ✅ 9s ⏱️ Results for commit 4dc7292. ♻️ This comment has been updated with latest results. |
…iles # Conflicts: # test/VerificationMatrix.tsv
loadKcatSource reads the file itself and returns the header lines and the rows as read in report.header and report.records; readKcatSource is gone. The helpers of src/gather_kcats/private are local functions of the functions that use them. kcatsFrom<Source> no longer check the file name before gathering; saveKcatSource does when it writes.
…t/kcat-assignment # Conflicts: # test/VerificationMatrix.tsv
# Conflicts: # test/VerificationMatrix.tsv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Kcats are assigned from the kcat source files in
data/kcats(#3), in an order thatmodel_adapter.tomlsets. geckopy has the same functions and settings (CompMetEng/geckopy#66). This is step K2 of the plan in CompMetEng/raven-gecko-parity#134.Builds on #3 (kcat source files); the diff shows its changes until it is merged.
Functions
collectKcatsoutput/<model id>_kcatDecisions.tsv(stage, source, kcat, number of values and their spread per reaction)assignKcatscollectKcats, then writesec.kcatandec.sourceand applies the kcat constraints. ReplacesmergeKcats→assignKcatValues→applyCustomKcats→getKcatAcrossIsozymes→getStandardKcat→applyKcatConstraints, which stay callableupdateKcatSourceskcatsFromBrenda,kcatsFromDLKcat,kcatsFromOKP) when they are missing, or when their header records other settings or another BRENDA release than asked;'dryRun', trueonly reportskcatAssignmentConfig[kcat_assignment]and[kcat_sources.*], with a preset expanded into its stagesConfiguration
mergeKcats). Sources are source file names and the BRENDA tiersdatabase_exact,database_topanddatabase_bottom, which readbrenda.tsv.data/kcats/custom.tsv,data/customKcats.tsvis applied as before.Presets
gecko_median(default)gecko_classicThe order of
gecko_mediancomes from comparing each BRENDA tier with DLKcat on measured kcats hidden from the search: the BRENDA median was as close or closer at every origin without wildcards, and the maximum was further off than the median in every tier. Specific-activity matches could not be compared; they rank below DLKcat because a specific activity converted with a molecular weight from another organism broke kcat tuning in ecYeastGEM (geckopy#58). The figures are in CompMetEng/raven-gecko-parity#134.Tutorial
full_ecModeluseskcatsFromBrenda,kcatsFromDLKcatandassignKcatsfor STEP 18–31, withpreset = "gecko_classic". The ecModel is identical to the one the previous steps gave: 4834ec.rxns, the sameec.kcat,ec.sourceandS.Tests
kcatAssignmentTests(tc0079–tc0083):gecko_classicandgecko_medianagainst the chain of functions they replace,collectKcatsleaving the model unchanged,custom.tsvdeciding first, stages from TOML and their errors, andupdateKcatSourcesgathering missing and outdated files only.