Enzyme & EC data#

MATLAB functions in GECKO/src/get_enzyme_data of the GECKO toolbox.

Functions#

Function

Summary

applyECcodes

Copy EC numbers from ecModel.ec.eccodes to ecModel.eccodes.

calculateMW

Calculate the molecular weight of a protein.

findECInDB

Look up EC numbers for a reaction's gene set in a UniProt or KEGG index.

getECfromDatabase

Populate model.ec.eccodes from UniProt and KEGG databases.

getECfromGEM

Populate model.ec.eccodes from the model.eccodes field.

getECstring

Build a single string of EC numbers for a protein.

Reference#

applyECcodes#

function ecModel = applyECcodes(ecModel, varargin)

Copy EC numbers from ecModel.ec.eccodes to ecModel.eccodes.

Copies the EC numbers stored in the ecModel.ec structure across to the top-level ecModel.eccodes field.

Parameters

ecModel : struct

an ecModel in GECKO 3 format (with ecModel.ec structure).

Name-Value Arguments

overwrite : logical

whether existing (non-empty) ecModel.eccodes entries should be overwritten by a non-empty ecModel.ec.eccodes entry. Empty ecModel.eccodes entries are always overwritten if possible (default false). An empty ecModel.ec.eccodes source entry is never copied, so it can never erase an existing annotation.

Returns

ecModel : struct

ecModel with populated model.eccodes.

Examples

% optional arguments may be given positionally or as name-value pairs:
ecModel = applyECcodes(ecModel, true);
ecModel = applyECcodes(ecModel, 'overwrite', true);

calculateMW#

function MW = calculateMW(sequence)

Calculate the molecular weight of a protein.

Calculates the molecular weight of a protein from its amino acid sequence. Matching is case-insensitive. Sequences with no recognized residue (including an empty sequence) return NaN, rather than being mistaken for an 18 Da protein.

Parameters

sequence : char

the amino acid sequence (can include extra things such as spaces or numbers, which are ignored).

Returns

MW : double

the molecular weight in Da, or NaN if no residue was recognized.

findECInDB#

function [EC,conflicts] = findECInDB(gene_set, DBecNum, DBMW, geneIndex, geneHashMap)

Look up EC numbers for a reaction's gene set in a UniProt or KEGG index.

For each gene, finds its matching database entries and takes the EC number of the lightest-weight matching protein when a single EC number applies to that gene; genes with several distinct EC numbers among their matches are also reported as conflicts (the first match is still used for EC). When gene_set has more than one gene (an enzyme complex), the numbers found for each gene are combined by intersection where they share a match (wildcards such as "-" are accounted for), otherwise by union.

Parameters

gene_set : cell

genes from a given metabolic reaction.

DBecNum : cell

array of EC numbers.

DBMW : double

array of molecular weights in Da.

geneIndex : cell

as generated by getECfromDatabase.

geneHashMap : containers.Map

as generated by getECfromDatabase.

Returns

EC : char

EC numbers that apply to gene_set, each prefixed with "EC" and separated by ";" (e.g. "EC1.1.1.1;EC1.1.1.2").

conflicts : cell

genes with multiple protein matches.

Examples

[EC, conflicts] = findECInDB(gene_set, DBecNum, DBMW, geneIndex, geneHashMap);

See also

getECfromDatabase, getECstring

getECfromDatabase#

function model = getECfromDatabase(model, varargin)

Populate model.ec.eccodes from UniProt and KEGG databases.

Populates the model.ec.eccodes field with enzyme codes that are extracted from UniProt and KEGG databases, as assigned to the proteins that catalyze the specific reactions.

Parameters

model : struct

an ecModel in GECKO 3 format (with ecModel.ec structure).

Name-Value Arguments

ecRxns : logical

of length model.ec.rxns that specifies which model.ec.eccodes entries should be queried. Existing values in model.ec.eccodes will be wiped. Entries that are indicated by false will be kept and not modified by this function (by default all model.ec.eccodes entries are populated by this function).

action : char

response action if multiple proteins with different EC numbers are found for a given gene in a metabolic reaction (default 'display'):

  • 'display' displays all found multiplicities.

  • 'ignore' ignore multiplicities and use the protein with the lowest index in the database.

  • 'add' adds all the multiple proteins as isozymes for the given reaction.

modelAdapter : ModelAdapter

a loaded model adapter (default: the current default model adapter).

Returns

model : struct

ecModel with populated model.ec.eccodes.

Examples

% optional arguments may be given positionally or as name-value pairs:
model = getECfromDatabase(model, ecRxns, action, modelAdapter);
model = getECfromDatabase(model, 'action', 'ignore');

See also

getECfromGEM, findECInDB, loadDatabases

getECfromGEM#

function [model, invalidEC, invalidECpos] = getECfromGEM(model, varargin)

Populate model.ec.eccodes from the model.eccodes field.

Uses the model.eccodes to populate the model.ec.eccodes field. EC numbers must be formatted as four numbers separated by periods, possibly with trailing wildcards; incorrectly formatted EC numbers are skipped.

Parameters

model : struct

an ecModel in GECKO 3 format (with ecModel.ec structure).

Name-Value Arguments

ecRxns : logical

of length model.ec.rxns that specifies for which reactions the existing model.ec.eccodes entry should be kept and not modified by this function (by default all model.ec.eccodes entries are populated by this function).

Returns

model : struct

ecModel with populated model.ec.eccodes.

invalidEC : cell

incorrectly formatted EC numbers.

invalidECpos : double

position of invalidEC in model.eccodes.

Notes

Valid EC numbers are e.g. 1.2.3.4 or 1.2.3.-, while invalid EC numbers are 1.2.3 or 1_2_3_4. Multiple EC numbers are separated by ; for instance 1.2.3.4;1.2.3.5 not 1.2.3.4|1.2.3.5.

Examples

% optional arguments may be given positionally or as name-value pairs:
[model, invalidEC, invalidECpos] = getECfromGEM(model, ecRxns);
[model, invalidEC, invalidECpos] = getECfromGEM(model, 'ecRxns', ecRxns);

See also

getECfromDatabase, applyECcodes

getECstring#

function EC_set = getECstring(EC_set,ecNumbers)

Build a single string of EC numbers for a protein.

Provides a single string with all the EC numbers associated to a given protein, according to the following format: "ECX.X.X.X ECX.X.X.X ECX.X.X.X".

Parameters

EC_set : char

existing EC string to which the EC numbers are appended.

ecNumbers : char

space-separated EC numbers associated to the protein.

Returns

EC_set : char

a single string with all the EC numbers, each prefixed with "EC".

Examples

EC_set = getECstring(EC_set, ecNumbers);

See also

findECInDB In case of several ec numbers for the same protein