Entropicfba¶
- calculateGeneWeight(model, Transcriptomic, Threshold)[source]¶
Calculate a per-reaction gene expression weight for use with entropicFBA
geneWeight is a value that can be used in entropicFBA to assign a weight that corresponds to the gene expression value to internal reactions. If you want to use this value for this purpose, use the following formula: cr = cf = -log(geneWeight + 1e-8) + 1 - ci/g Default values: g = 2, ci = 0
The algorithm is explained here: https://doi.org/10.1016/j.isci.2023.106201
- USAGE:
geneWeight = calculateGeneWeight (model, Transcriptomic, Threshold)
- INPUTS:
model – COBRA model structure with fields:
.grRules - n x 1 cell array of gene-reaction rules
.SConsistentRxnBool - n x 1 logical, true for stoichiometrically consistent reactions
Transcriptomic – table with a gene expression value column and field:
.entrezID - Entrez gene identifiers
Threshold – double, threshold below which a gene expression value is treated as zero
- OUTPUTS:
geneWeight – n x 1 vector of gene-expression-derived weights, one per stoichiometrically consistent reaction
- calculateReactionMasses(model)[source]¶
This function calculates mass related to each reaction, products mass and substrates mass, using the left null space of the stoichiometric matrix, useful to unbias flux through reactions with massive metabolites in entropicFBA
- USAGE:
[substratesMass, productsMass] = calculateReactionMasses (model)
- INPUTS:
model – COBRA model structure with fields:
.mets - m x 1 cell array of metabolite identifiers
.rxns - n x 1 cell array of reaction identifiers
.S - m x n stoichiometric matrix
.SConsistentMetBool - m x 1 logical, true for stoichiometrically consistent metabolites
.SConsistentRxnBool - n x 1 logical, true for stoichiometrically consistent reactions
.metFormulas - m x 1 cell array of metabolite chemical formulas (added from a reference model if not already present)
.rxnFormulas - (optional) n x 1 cell array of reaction formulas, used when present to report mass-imbalanced reactions
- OUTPUTS:
substratesMass – n x 1 vector, total substrate mass of each stoichiometrically consistent reaction
productsMass – n x 1 vector, total product mass of each stoichiometrically consistent reaction
- plotyy_eFBA(model, objective, C_max, N, d)[source]¶
This function plots entropicFBA in a plotyy way: flux through the objective function (solution.v) as a function of C_value on axis 1, and the non-linear/linear part of the objective function as a function of C_value on axis 2. The maximum value of the objective function is also plotted, obtained through FBA.
- USAGE:
plotyy_eFBA (model, objective, C_max, N, d)
- INPUTS:
model – a metabolic model that contains the required fields to perform entropicFluxBalanceAnalysis, with fields:
.c - n x 1 linear objective coefficient vector
.rxns - n x 1 cell array of reaction identifiers
objective – char, the name of the reaction whose flux is plotted (as it appears in model.rxns)
C_max – an estimation for the maximum value of C_value (for a larger number the variables do not change)
N – the number of C_value points to sample (since the model may be infeasible for some values of C, the plotted figure will have fewer numbers on the x axis)
d – a value to set the axis in a way that the whole plot is visible
Note
If you cannot see the green plot (related to FBAsolution.v) increase d.
Example
plotyy_eFBA(model, ‘biomass reaction’, 1500, 100, 10)