Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion databases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

### BRENDA

GECKO does not ship BRENDA data. `fetchBrendaAsset` downloads the files of the [toolbox-assets](https://github.com/CompMetEng/toolbox-assets) release `brenda-2026.1-1` ([BRENDA](https://www.brenda-enzymes.org) 2026.1, CC BY 4.0) on first use into `databases/brenda-2026.1-1`, checked against the manifest checksums. geckopy uses the same release. A project can use its own BRENDA files instead, in `data/brenda`, written by the `geckopy brenda-refresh` CLI of [geckopy](https://github.com/CompMetEng/geckopy).
GECKO does not include BRENDA data. `fetchBrendaAsset` downloads the files of the [toolbox-assets](https://github.com/CompMetEng/toolbox-assets) release `brenda-2026.1-1` ([BRENDA](https://www.brenda-enzymes.org) 2026.1, CC BY 4.0) on first use into `databases/brenda-2026.1-1`, checked against the manifest checksums. geckopy uses the same release. A project can use its own BRENDA files instead, in `data/brenda`, written by the `geckopy brenda-refresh` CLI of [geckopy](https://github.com/CompMetEng/geckopy).

- `kcat.tsv`: kcat values per organism, reaction and substrate. Both a per-triple maximum (`kcat_max`) and median (`kcat_median`) are recorded. Which one is used is set by `params.kcatAggregation` on the model adapter, or per call with `fuzzyKcatMatching(model,'kcatAggregation','median')`; the default is `max`.
- `sa.tsv`: specific activities per organism, reaction and substrate, with a maximum (`sa_max`) and median (`sa_median`); `loadBRENDAdata` uses `sa_max`.
Expand Down
2 changes: 1 addition & 1 deletion src/change_model/applyKcatConstraints.m
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
% isozyme row without any enzyme has MWkcat zero. Drop those
% isozymes *before* selecting the cheapest one: including them in
% the min() below would let an isozyme with no kcat or no enzyme
% always win over a real kcat on another isozyme of the same reaction.
% always be selected over a real kcat on another isozyme of the same reaction.
% A row with a kcat that is not positive or an enzyme mass that is not
% positive has no usable cost either.
hasEnzyme = full(sum(model.ec.rxnEnzMat(ecIdx,:) ~= 0,2)) > 0;
Expand Down
2 changes: 1 addition & 1 deletion src/change_model/getSubsetEcModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
smallEcModel = removeReactions(smallEcModel,~keepRxns, true, true, true);

% Remove reactions from ec-structure
% The reaction identifiers of a light ecModel carry a 4 character prefix
% The reaction identifiers of a light ecModel have a 4 character prefix
if smallEcModel.ec.geckoLight
ecModelRxns = extractAfter(smallEcModel.ec.rxns,4);
else
Expand Down
2 changes: 1 addition & 1 deletion src/download_databases/fetchBrendaAsset.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function folder = fetchBrendaAsset(files)
% fetchBrendaAsset Download (once) GECKO's BRENDA files and return their folder.
%
% GECKO does not ship BRENDA data. The files of the toolbox-assets release
% GECKO does not include BRENDA data. The files of the toolbox-assets release
% brenda-2026.1-1 (BRENDA 2026.1, CC BY 4.0) are downloaded on first use
% with RAVEN's fetchToolboxAsset, which checks them against the checksums
% of the toolbox-assets manifest, and are unpacked into
Expand Down
2 changes: 1 addition & 1 deletion src/download_databases/loadBRENDAdata.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
% and specific activities (the latter converted to kcat values using the
% molecular weights).
%
% kcat.tsv and sa.tsv each carry both a max and a median aggregate per
% kcat.tsv and sa.tsv each have both a max and a median aggregate per
% (EC, substrate, organism) triple; kcatAggregation selects which of the
% two is read. Each file starts with a `#`-prefixed release-version line
% followed by a tab-delimited column header, both skipped on read.
Expand Down
4 changes: 2 additions & 2 deletions src/flux_analysis/getPfbaEnzymes.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
% value of the current objective, finds the one that minimises total
% enzyme usage: the smallest sum of usage_prot_* fluxes. This is the
% enzyme-aware analogue of classical pFBA, which minimises total flux
% instead --- for ecModels this usually picks the most parsimonious
% instead --- for ecModels this usually selects the most parsimonious
% *proteome*, not just the most parsimonious fluxes.
%
% Parameters
Expand All @@ -21,7 +21,7 @@
% (default: use model.c as given).
% fractionOfOptimum : double
% fraction of the optimal objective value to fix before minimising
% enzyme usage (default 1.0). A value below 1.0 lets the objective fall
% enzyme usage (default 1.0). A value below 1.0 allows the objective to fall
% by (1 - fractionOfOptimum) times the magnitude of its optimum, so it
% also applies to a negative optimum (for example the exchange flux of
% a nutrient that is maximised).
Expand Down
2 changes: 1 addition & 1 deletion src/gather_kcats/collectKcats.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
% [kcat_sources.okp]
% methods = ["CataPro", "UniKP"] # the okp source group
%
% A stage decides the reactions that are still open:
% A stage sets the kcat of the reactions that are still open:
% - select: the first listed source with a value (see mergeKcats). Sources
% are the names of source files (custom, ec_tree, dlkcat, okp_catapro,
% ...) and the BRENDA quality tiers database_exact, database_top and
Expand Down
2 changes: 1 addition & 1 deletion src/gather_kcats/convertCustomKcats.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
% Writes the custom kcats of a GECKO 3 project as the curated kcat source
% file data/kcats/custom.tsv, which collectKcats reads first. The kcats are
% those applyCustomKcats gives the ecModel, including which of two entries
% for the same reaction wins: one row per reaction, keyed by conventional
% for the same reaction is kept: one row per reaction, keyed by conventional
% reaction and enzyme set (see getEcRxnKeys), with the entry's notes in the
% note column. The stoicho column is left out: complex stoichiometry comes
% from applyComplexData. Unlike applyCustomKcats, custom.tsv also applies to
Expand Down
2 changes: 1 addition & 1 deletion src/gather_kcats/getStandardKcat.m
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
enzSubSystem_names = enzSubSystems(firstOccurrence);
% Calculate the median kcat per subSystem, counting only reactions
% with a real (nonzero, non-NaN) kcat toward both the median itself
% and the threshold that decides whether a subSystem-specific value
% and the threshold that determines whether a subSystem-specific value
% is used at all.
numSubSystem = numel(enzSubSystem_names);
kcatsPerSubSystem = zeros(numSubSystem,1);
Expand Down
2 changes: 1 addition & 1 deletion src/gather_kcats/mergeDLKcatAndFuzzyKcats.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
%
% Deprecated thin wrapper around mergeKcats, kept for the common DLKcat +
% fuzzy-BRENDA case. New code should call mergeKcats directly, which also
% handles a single list that mixes several sources (e.g. an
% accepts a single list that mixes several sources (e.g. an
% OpenKineticsPredictor result with BRENDA/Sabio-RK/CataPro rows).
%
% Merges the results from DLKcat and fuzzy matching to the BRENDA database.
Expand Down
8 changes: 4 additions & 4 deletions src/gather_kcats/mergeKcats.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
% Generalizes mergeDLKcatAndFuzzyKcats: instead of two fixed inputs (DLKcat
% + fuzzy BRENDA) it accepts a cell array of kcatLists, each of which may
% itself mix several sources (for example the output of
% fetchOpenKineticsPredictor, carrying BRENDA, Sabio-RK and CataPro values
% in its kcatSource field). A caller-supplied sourcePriority decides which
% source wins for each reaction.
% fetchOpenKineticsPredictor, holding BRENDA, Sabio-RK and CataPro values
% in its kcatSource field). A caller-supplied sourcePriority determines which
% source is kept for each reaction.
%
% Parameters
% ----------
Expand Down Expand Up @@ -120,7 +120,7 @@

dbSources = cellfun(@normalizeSource, databaseSources, 'UniformOutput', false);

% Rank map: normalised priority token -> rank (1 = best). First wins.
% Rank map: normalised priority token -> rank (1 = best). The first is kept.
rankMap = containers.Map('KeyType','char','ValueType','double');
for r = 1:numel(sourcePriority)
key = normalizeSource(sourcePriority{r});
Expand Down
2 changes: 1 addition & 1 deletion src/gather_kcats/readOpenKineticsPredictorOutput.m
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
outFile = fullfile(fPath, fName);
end

%% Read OKP output file using readcell to correctly handle quoted fields
%% Read OKP output file using readcell to correctly read quoted fields
% that may contain commas in the 'Extra Info kcat' column.
if ~exist(outFile,'file')
error('Cannot find file: %s', outFile)
Expand Down
4 changes: 2 additions & 2 deletions src/gather_kcats/submitOpenKineticsPredictor.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
% SMILES, via writeOpenKineticsPredictorInput) and submits a kcat prediction
% job to the OKP REST API (https://predictor.openkinetics.org/). The returned
% job id is also stored in data/OKP_job.txt, so fetchOpenKineticsPredictor can
% pick it up later.
% read it later.
%
% Predictors available via OKP: CataPro, CatPred, CatRange, DLKcat, EITLEM,
% KinForm-H, KinForm-L, OmniESI, OmniESI-O2DENet, TurNup, UniKP (see GET
Expand All @@ -19,7 +19,7 @@
% 2. In the "API key generator" section, click "Generate".
% 3. Copy the key shown (it is displayed only once). If you lose it,
% revoke it on the same page and generate a new one.
% Keys are tied to your IP and carry a daily prediction quota that resets
% Keys are tied to your IP and have a daily prediction quota that resets
% at midnight UTC.
%
% The key is a secret; do NOT put it in the model adapter (which is
Expand Down
2 changes: 1 addition & 1 deletion src/get_enzyme_data/findECInDB.m
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function tf = subsumes(general,specific)
%True if the code general is equal to or a wildcard parent of the code
%specific; both carry the "EC" prefix and need four levels.
%specific; both have the "EC" prefix and need four levels.
general = strsplit(extractAfter(general,2),'.');
specific = strsplit(extractAfter(specific,2),'.');
tf = false;
Expand Down
2 changes: 1 addition & 1 deletion src/kcat_tuning/evotune/bestParsimonious.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
% Defaults to 2%, which is the scale of alternate-optimum noise typically
% seen from re-solving an LP with a slightly different kcat vector --
% below that, two vectors are not meaningfully different in fit, so the
% sparser one wins.
% sparser one is kept.
%
% Parameters
% ----------
Expand Down
8 changes: 4 additions & 4 deletions src/kcat_tuning/evotune/cmaesKcatTuning.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
% maxGenerations/rmseThreshold are its stopping conditions.
%
% Vendors a separable (diagonal-covariance) CMA-ES -- MATLAB has no
% built-in implementation and Global Optimization Toolbox doesn't ship
% built-in implementation and Global Optimization Toolbox does not include
% one either. Separable rather than full-covariance because that is what
% geckopy's own port actually runs (cma's CMA_diagonal=True) and what its
% defaults were validated against; it is also lower risk to implement
Expand Down Expand Up @@ -45,7 +45,7 @@
% Returns
% -------
% ecModel : struct
% mutated: tunable rows carry the best kcat vector CMA-ES found, with
% mutated: tunable rows hold the best kcat vector CMA-ES found, with
% kcat constraints already applied. MATLAB structs are copied on
% assignment, so -- unlike geckopy's in-place mutation -- this output
% must be captured by the caller.
Expand Down Expand Up @@ -129,8 +129,8 @@

expand = @(Xlog) exp(Xlog(assign,:));

% Baseline: score the untouched prior, and pick up the excarbon-augmented
% model to carry through the rest of the run (see evotuneScore's 4th
% Baseline: score the untouched prior, and keep the excarbon-augmented
% model to use in the rest of the run (see evotuneScore's 4th
% output -- avoids rescanning metabolite formulas on every candidate).
[obj0,rmse0,~,baseModel] = scoreCandidate(ecModel,tunableIdx,ecRxnIdsTunable,evoData,modelAdapter,params,kcat0,kcat0,sigma0log);
bestObj = obj0; bestRmse = rmse0; bestVec = kcat0;
Expand Down
4 changes: 2 additions & 2 deletions src/kcat_tuning/evotune/evotuneScore.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
% the input ecModel, with ec.excarbon cached on it if it wasn't
% already present. MATLAB structs are copied on assignment, not
% shared by reference like a Python object, so callers scoring many
% candidates in a loop should carry this output back in as the base
% candidates in a loop should pass this output back in as the base
% copy for the next candidate, rather than recomputing excarbon (an
% expensive metabolite-formula scan) on every single call.
%
Expand Down Expand Up @@ -146,7 +146,7 @@
sol = solveLP(model_tmp);
if checkSolution(sol)
bioRxn = getIndexes(model_tmp,data.biomass,'rxns');
% Biomass carries an assumed 41 Cmmol/gDCW, matching fillCarbonNum.
% Biomass has an assumed 41 Cmmol/gDCW, matching fillCarbonNum.
bioMeas = data.grRate(i) * 41;
bioSim = sol.x(bioRxn) * 41;

Expand Down
2 changes: 1 addition & 1 deletion src/kcat_tuning/evotune/parsimonyFrontier.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
% units of each kcat's own prior sigma) and reports how RMSE trades off
% against how many kcats stayed at their tuned value, so a sparser
% result within noise of the best fit can be preferred over the raw
% tuner output. See bestParsimonious to pick a point off this frontier.
% tuner output. See bestParsimonious to select a point on this frontier.
%
% Parameters
% ----------
Expand Down
2 changes: 1 addition & 1 deletion src/kcat_tuning/evotune/screenKcatLeverage.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
rmses = zeros(nVec,1);

if nProc == 1
% Serial path: carry the excarbon-augmented model from one call into
% Serial path: pass the excarbon-augmented model from one call to
% the next, so the metabolite-formula scan behind it (evotuneScore's
% 4th output) runs once for the whole screen rather than once per
% probe vector.
Expand Down
4 changes: 2 additions & 2 deletions src/kcat_tuning/evotune/tunePriorPenaltyWeight.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function sweepTable = tunePriorPenaltyWeight(ecModel,varargin)
% tunePriorPenaltyWeight Sweep priorPenaltyWeight and report the
% fit/reproducibility trade-off, so the value doesn't have to be picked
% blind.
% fit/reproducibility trade-off, so the value can be selected from the reported
% results.
%
% priorPenaltyWeight charges for moving a kcat away from its prior, and
% mainly exists to keep large corrections reproducible across seeds
Expand Down
2 changes: 1 addition & 1 deletion src/kcat_tuning/sigmaFitter.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function [model, sigma] = sigmaFitter(model, varargin)
% sigmaFitter Fit the average enzyme saturation factor of an ecModel.
%
% Scans candidate sigma-factors from 0.01 to 1 in steps of 0.01 and picks the
% Scans candidate sigma-factors from 0.01 to 1 in steps of 0.01 and selects the
% one whose simulated growth rate best matches the provided experimental
% growth rate, then applies it to the model's protein pool constraint.
%
Expand Down
2 changes: 1 addition & 1 deletion src/limit_proteins/calculateFfactor.m
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
if ischar(protData) && endsWith(protData,'paxDB.tsv')
% Gather Uniprot database for finding MW. Only needed here, to map paxDB.tsv's gene
% identifiers onto UniProt IDs and molecular weights --- a protData struct supplied by
% the caller already carries UniProt IDs and needs no lookup, so this stays inside the
% the caller already has UniProt IDs and needs no lookup, so this stays inside the
% branch that actually uses it rather than running (and potentially downloading or
% reading UniProt data) on every call.
uniprotDB = loadDatabases('uniprot', modelAdapter);
Expand Down
2 changes: 1 addition & 1 deletion src/limit_proteins/flexibilizeEnzConcs.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
% enzyme (default false). Enzymes and complexes are then ranked by the
% growth gained per foldChange of raising all their usage upper bounds
% together (a levelled complex binds on all subunits at once, so no
% single subunit shows a gain), every measured subunit of the picked
% single subunit shows a gain), every measured subunit of the selected
% complex is raised by the same factor, iterations are counted per
% complex, and one factor per complex is kept in the final pass, so that
% concentrations levelled by levelComplexConcs stay levelled. An upper
Expand Down
2 changes: 1 addition & 1 deletion src/limit_proteins/relaxProteomicsGreedy.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
% Different relaxation strategy from flexibilizeEnzConcs: this one is
% shadow-price-ordered (one solve per step) and often converges in fewer
% iterations when one or two enzymes dominate the infeasibility. The
% trade-off is that it fully unconstrains each picked enzyme with no
% trade-off is that it fully unconstrains each selected enzyme with no
% tighten-back pass, so the result is looser (less proteomics-faithful).
%
% There are two distinct non-convergence outcomes: running out of
Expand Down
2 changes: 1 addition & 1 deletion src/model_adapter/convertAdapterToToml.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
% [matlab.params], so that loadAdapterParams gives back the same params.
%
% Methods that the adapter class overrides cannot be written to TOML.
% They are listed in the report, with how to carry them over:
% They are listed in the report, with how to convert them:
% - getSpontaneousReactions: set [spontaneous] name_contains or file;
% - makeModelAnaerobic, changeProteinBiomass: set [matlab]
% make_model_anaerobic or change_protein_biomass to a function name;
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/upgradeGECKOproject.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function report = upgradeGECKOproject(projectPath, varargin)
% upgradeGECKOproject Bring a GECKO 3 project to the GECKO 4 layout.
%
% Lists, and with 'dryRun', false carries out, the steps that bring a
% Lists, and with 'dryRun', false performs, the steps that bring a
% project made with GECKO 3 (or an earlier GECKO 4) to the current layout:
%
% 1. adapter: an adapter class without model_adapter.toml gets one
Expand Down
Loading
Loading