Repository navigation
Estimate kcats from the EC tree; make brenda_ec_tree the default preset - #67
Merged
Merged
Conversation
measurements.tsv, next to the BRENDA kcat, sa and mw files, holds the wild-type BRENDA kcats with an EC number after the outlier screen, one row per measurement. kcats_from_ec_tree gives each reaction the median kcat of its EC number, shrunk toward its 3- and 2-digit EC classes with weight n / (n + k), and keeps it as data/kcats/ec_tree.tsv (ECTree, load_brenda_measurements). save_kcat_source takes further detail pairs from a detail column. The brenda_ec_tree preset, now the default, orders custom kcats, the BRENDA median of measurements of the organism on the reaction's substrate (origin 1), the EC tree, then DLKcat for reactions without an EC number. update_kcat_sources gathers ec_tree.tsv and marks it outdated for another k or BRENDA release.
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 can now come from the EC tree, and the default kcat assignment preset is
brenda_ec_tree: custom kcats, the organism's own BRENDA value, the EC tree, then DLKcat. GECKO has the same (CompMetEng/GECKO#10). This is step K4a of the plan in CompMetEng/raven-gecko-parity#134.BRENDA measurement table
src/geckopy/data/brenda/measurements.tsv(xz-compressed in the wheel, askcat.tsv) holds one row per wild-type kcat measurement in BRENDA 2026.1 with an EC number:load_brenda_measurementsreads it.kcats_from_ec_treeuses the table of the adapter's BRENDA folder, and geckopy's own when a project'sdata/brendahas none.EC tree
geckopy.gather_kcats.ec_tree.ECTreegives an EC number the median log10 kcat of its measurements, from any organism and substrate, pulled toward its parent EC classes with weight n / (n + k):A well-measured EC keeps its own median; a sparsely measured one leans on its class. A reaction with several EC numbers uses the one with most measurements.
kcats_from_ec_treewrites the values todata/kcats/ec_tree.tsv, with the number of measurements and the deepest EC level used in the detail column. Reactions without an EC number, or whose EC classes have no measurements, get no value.save_kcat_sourcetakes further detail pairs from adetailcolumn.Preset
brenda_ec_tree, now the defaultIt is the default when
[kcat_assignment]is left out;gecko_medianandgecko_classicstay available, and thefull_ecModeltutorial keeps its own stages.update_kcat_sourcesgathersec_tree.tsvand marks it outdated for anotherkor another BRENDA release.Why this order
Against measured kcats hidden from the search (enzyme–substrate pairs whose own measurements and those of sequences at ≥ 95% identity are hidden), the EC tree was closer than the GECKO median at origins 2 and 4 and with EC wildcards, by 0.13 to 0.18 log10, and as close at origins 1 and 3. DLKcat was not closer than the BRENDA median at any origin. The organism's own measurement comes first because, in a model, it is often a measurement of that very enzyme. The figures are in CompMetEng/raven-gecko-parity#134.
On the yeast tutorial model before tuning:
gecko_classicgecko_medianbrenda_ec_treeWith
brenda_ec_tree, 3,574 reactions take the EC tree, 577 DLKcat and 210 the organism's own BRENDA value.Tests
tests/test_ec_tree.py:kcats_from_ec_treewrites, also from geckopy's own table;update_kcat_sourcesfor anotherk.ECTreegives the same values as the kcat benchmark's EC tree on all 2,114 EC numbers of its queries, and as GECKO'secTreeEstimateon 4,885 EC numbers and combinations.