Download databases#
MATLAB functions in GECKO/src/download_databases of the GECKO toolbox.
Functions#
Function |
Summary |
|---|---|
Download a KEGG organism's gene data and write a CSV. |
|
Download UniProt protein data for an organism and write a TSV. |
|
Download (once) GECKO's BRENDA files and return their folder. |
|
Load kcat and specific activity data from BRENDA files. |
|
Load the organism-specific KEGG and UniProt databases. |
|
Settle which BRENDA aggregate to read. |
Reference#
downloadKEGG#
function downloadKEGG(keggID, filePath, keggGeneID)
Download a KEGG organism's gene data and write a CSV.
Downloads gene information for every gene of a KEGG organism code, and writes the result to a CSV file. Used by loadDatabases when its expected kegg.tsv is missing; can also be called directly to refresh one organism's KEGG snapshot without re-running loadDatabases for everything else.
Parameters
keggID: charKEGG organism code, e.g. 'sce' for Saccharomyces cerevisiae.
filePath: chardestination CSV path (overwritten if it exists).
keggGeneID: charwhich KEGG gene identifier field becomes the output's gene-name column. 'kegg' (or empty, the default) uses the bare KEGG gene id; any other value is looked up as a cross-reference identifier on each KEGG entry (e.g. 'UniProt').
Examples
downloadKEGG('sce', 'kegg.tsv', 'UniProt');
See also
loadDatabases, downloadUniProt
downloadUniProt#
function downloadUniProt(uniprotID, filePath, geneIDfield, type, reviewed)
Download UniProt protein data for an organism and write a TSV.
Downloads accession, gene name, EC number, mass and sequence for every protein matching the given organism identifier, and writes the result to a TSV file. Used by loadDatabases when its expected uniprot.tsv is missing; can also be called directly to refresh one organism's UniProt snapshot without re-running loadDatabases for everything else.
Parameters
uniprotID: charUniProt-side identifier whose meaning depends on type, e.g. an NCBI taxonomy ID such as 559292 for Saccharomyces cerevisiae S288C.
filePath: chardestination TSV path (overwritten if it exists).
geneIDfield: charUniProt field that becomes the second column (the gene matching key) (optional, default 'gene_oln', Ordered Locus Names, which works for most prokaryotes and budding yeast).
type: charUniProt query field for uniprotID (optional, default 'taxonomy_id'). 'taxonomy' is accepted as an alias.
reviewed: logicalwhether to restrict the query to reviewed (Swiss-Prot) entries (optional, default true).
Examples
downloadUniProt(559292, 'uniprot.tsv');
downloadUniProt(559292, 'uniprot.tsv', 'gene_oln', 'taxonomy_id', true);
See also
loadDatabases, downloadKEGG
fetchBrendaAsset#
function folder = fetchBrendaAsset(files)
Download (once) GECKO's BRENDA files and return their folder.
GECKO does not ship 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 databases/brenda-2026.1-1 in the GECKO folder. geckopy reads the same release (fetch_brenda_asset). A project can use its own BRENDA files instead, in data/brenda (see ModelAdapter.getBrendaDBFolder).
Parameters
files: cellfile names (default: kcat.tsv, sa.tsv, mw.tsv and measurements.tsv); the release also has sequences.fasta, substrates.tsv and kcatCombineParams.tsv.
Returns
folder: charthe folder with the files, unpacked.
Examples
folder = fetchBrendaAsset();
folder = fetchBrendaAsset({'kcatCombineParams.tsv'});
See also
loadBRENDAdata, loadBrendaMeasurements, ModelAdapter
loadBRENDAdata#
function [KCATcell, SAcell] = loadBRENDAdata(varargin)
Load kcat and specific activity data from BRENDA files.
Reads the BRENDA data files (kcat.tsv, sa.tsv and mw.tsv) from the BRENDA database folder defined by the model adapter, and returns the kcat values 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
(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.
Name-Value Arguments
modelAdapter: ModelAdaptera loaded model adapter (default: the current default model adapter).
kcatAggregation: charwhich aggregate to read from kcat.tsv and sa.tsv, 'max' or 'median' (default: params.kcatAggregation from the model adapter, or 'max' if the adapter does not set it). A triple's max is the highest turnover reported for it; its median is the middle one.
Returns
KCATcell: cellkcat data extracted from BRENDA.
SAcell: cellspecific activity data extracted from BRENDA.
Examples
% optional arguments may be given positionally or as name-value pairs:
[KCATcell, SAcell] = loadBRENDAdata();
[KCATcell, SAcell] = loadBRENDAdata('modelAdapter', adapter);
[KCATcell, SAcell] = loadBRENDAdata('kcatAggregation', 'median');
See also
loadDatabases, getECfromDatabase
loadDatabases#
function databases = loadDatabases(varargin)
Load the organism-specific KEGG and UniProt databases.
Loads (and downloads if necessary) the organism-specific KEGG and UniProt databases that are required to extract protein information. The uniprot.ID and kegg.ID are taken from the ModelAdapter.
Name-Value Arguments
selectDatabase: charwhich databases should be loaded, either 'uniprot', 'kegg' or 'both' (default 'both').
modelAdapter: ModelAdaptera loaded model adapter (default: the current default model adapter; send in [] for default).
Returns
databases: structcontains .uniprot and .kegg structures, dependent on which databases were selected.
Examples
% optional arguments may be given positionally or as name-value pairs:
databases = loadDatabases('both', adapter);
databases = loadDatabases('selectDatabase', 'both');
See also
getECfromDatabase, loadBRENDAdata, downloadKEGG, downloadUniProt
resolveKcatAggregation#
function kcatAggregation = resolveKcatAggregation(kcatAggregation, modelAdapter)
Settle which BRENDA aggregate to read.
The BRENDA snapshot records both a maximum and a median per (EC, substrate, organism) triple. Which one a run uses can be given per call, or once on the model adapter as params.kcatAggregation; an adapter that sets neither gets 'max', which is what GECKO has always used.
Input Arguments
kcatAggregation : char the per-call choice, or empty to fall back to the adapter. modelAdapter : ModelAdapter a loaded model adapter.
Returns
kcatAggregation: char'max' or 'median'.
See also
loadBRENDAdata, fuzzyKcatMatching