vonBertalanffy

assignQuantDir(model)[source]

Quantitatively assigns reaction directionality based on estimated bounds on transformed reaction Gibbs energies

Usage

model = assignQuantDir(model)

Input

  • model – structure with fields:
    • .SIntRxnBool - n x 1 boolean of internal reactions
    • .DrGtMin - n x 1 array of estimated lower bounds on transformed reaction Gibbs energies.
    • .DrGtMax - n x 1 array of estimated upper bounds on transformed reaction Gibbs energies.

Output

  • model – structure with fields:
    • .quantDir - n x 1 array indicating quantitatively assigned reaction directionality. 1 for reactions that are irreversible in the forward direction, -1 for reactions that are irreversible in the reverse direction, and 0 for reversible reactions.
configureSetupThermoModelInputs(model, T, compartments, ph, is, chi, concMinDefault, concMaxDefault, confidenceLevel)[source]

Configures inputs to setupThermoModel (sets defaults etc.). All optional inputs are empty by default.

Usage

model = configureSetupThermoModelInputs(model, T, compartments, ph, is, chi, concMinDefault, concMaxDefault, confidenceLevel)

Input

  • model

Optional inputs

  • T
  • compartments
  • ph
  • is
  • chi
  • concMinDefault
  • concMaxDefault
  • confidenceLevel

Output

  • model
estimateDG_temp(model)[source]

Estimates standard transformed Gibbs energies of formation for metabolites

Usage

model = estimateDG_temp(model)

Input

  • model – Model structure with following fields:
    • .S - m x n stoichiometric matrix.
    • .mets - m x 1 array of metabolite identifiers.
    • .metFormulas - m x 1 cell array of metabolite formulas. Formulas for protons should be ‘H’.
    • .metCharges - m x 1 array of metabolite charges.
    • .T - Temperature in Kelvin.
    • .cellCompartments - c x 1 array of cell compartment identifiers.
    • .ph - c x 1 array of compartment specific pH values.
    • .is - c x 1 array of compartment specific ionic strength values in mol/L.
    • .chi - c x 1 array of compartment specific electrical potential values in mV.
    • .metCompartments - m x 1 cell array of compartment assignments for metabolites in model.mets. Compartment identifiers should be the same as in model.cellCompartments.
    • .DfG0 - m x 1 array of standard Gibbs energies of formation.
    • .pKa - m x 1 structure array with metabolite pKa values.

Output

  • model – Model structure with following fields added:
    • .DfG0_pseudoisomers - Four column matrix with pseudoisomer standard Gibbs energies of formation in kJ/mol.
      • Column 1. Row index of pseudoisomer group in model.S.
      • Column 2. Standard Gibbs energy of formation.
      • Column 3. Number of hydrogen atoms.
      • Column 4. Charge.
    • .DfGt0 - Standard transformed Gibbs energies of formation in kJ/mol.
    • .DrGt0 - Standard transformed reaction Gibbs energy in kJ/mol.
estimateDfGt0(model, confidenceLevel)[source]

Estimates standard transformed Gibbs energies of formation for metabolites

Usage

model = estimateDfGt0(model, confidenceLevel)

Input

  • model – Model structure with following fields:
    • .S - m x n stoichiometric matrix.
    • .mets - m x 1 array of metabolite identifiers.
    • .metFormulas - m x 1 cell array of metabolite formulas. Formulas for protons should be H.
    • .metCharges - m x 1 array of metabolite charges.
    • .T - Temperature in Kelvin.
    • .cellCompartments - c x 1 array of cell compartment identifiers.
    • .ph - c x 1 array of compartment specific pH values.
    • .is - c x 1 array of compartment specific ionic strength values in mol/L.
    • .chi - c x 1 array of compartment specific electrical potential values in mV.
    • .metCompartments - m x 1 cell array of compartment assignments for metabolites in model.mets. Compartment identifiers should be the same as in model.compartments.
    • .DfG0 - m x 1 array of standard Gibbs energies of formation.
    • .pKa - m x 1 structure array with metabolite pKa values.
    • .DfG0_Uncertainty - m x 1 array of uncertainty in estimated standard Gibbs energies of formation. uf will be large for metabolites that are not covered by component contributions.

Optional input

  • confidenceLevel – {0.50, 0.70, (0.95), 0.99}. Confidence level for DGft0 and DrGt0 interval estimates. Default is 0.95, corresponding to 95% confidence intervals.

Output

  • model – Model structure with following fields added:
    • .DfG0_pseudoisomers - Four column matrix with pseudoisomer standard Gibbs energies of formation in kJ/mol.
      • Column 1. Row index of pseudoisomer group in model.S.
      • Column 2. Standard Gibbs energy of formation.
      • Column 3. Number of hydrogen atoms.
      • Column 4. Charge.
    • .DfGt0 - Standard transformed Gibbs energies of formation in kJ/mol.
    • .DfGtMin - Lower bounds on transformed Gibbs energies of formation in kJ/mol.
    • .DfGtMax - Upper bounds on transformed Gibbs energies of formation in kJ/mol.
estimateDrGt0(model, confidenceLevel)[source]

Estimates bounds on transformed Gibbs energies for metabolites and reactions in model.

Usage

model = estimateDrGt0(model, confidenceLevel)

Input

  • model – Model structure with following fields:
    • .S - m x n stoichiometric matrix.
    • .mets - m x 1 array of metabolite identifiers.
    • .metFormulas - m x 1 cell array of metabolite formulas. Formulas for protons should be H.
    • .T - Temperature in Kelvin.
    • .DfGt0 - Standard transformed Gibbs energies of formation in kJ/mol.
    • .DrGt0_Uncertainty Uncertainty in standard transformed reaction Gibbs energies kJ/mol.
    • .ph - c x 1 array of compartment specific pH values.
    • .chi c x 1 array of compartment specific electricalpotential values in mV.
    • .concMin - m x 1 array of lower bounds on metabolite concentrations in mol/L.
    • .concMax - m x 1 array of upper bounds on metabolite concentrations in mol/L.

Optional input

  • confidenceLevel – {0.50, 0.70, (0.95), 0.99}. Confidence level for DGft0 and DrGt0 interval estimates. Default is 0.95, corresponding to 95% confidence intervals.

Output

  • model – Model structure with following fields added:
    • .DrGt0 - n x 1 array of standard transformed reaction Gibbs energies in kJ/mol.
    • .ur - n x 1 array of uncertainties in DrGt0.
    • .DrGtMin - Lower bounds on transformed reaction Gibbs energies in kJ/mol.
    • .DrGtMax - Upper bounds on transformed reaction Gibbs energies in kJ/mol.
estimate_pKa(mets, inchi, npKas, takeMajorTaut)[source]

Estimates pKa values with ChemAxon’s Calculator plugins and determines all physiologically relevant pseudoisomers.

Usage

pseudoisomers = estimate_pKa(mets, inchi, npKas, takeMajorTaut)

Inputs

  • metsm x 1 array of metabolite identifiers.
  • inchim x 1 array of InChI strings for metabolites in mets.

Optional inputs

  • npKas – Maximum number of acidic and basic pKa values to estimate for each metabolite. Default is 20.
  • takeMajorTaut – {1, (0)}. If 1, pKa values are estimated for the major tautomer at pH 7. If 0 (default), they are estimated for the given tautomer.

Output

  • pseudoisomersm x 1 structure array where each element has the fields listed below. All fields are empty for metabolites where no InChI is given. Fields:

    • .success - Logical one (true) for metabolites where an InChI was given.
    • .met - Metabolite identifier from mets without compartment abbreviation.
    • .pKas - p x p matrix where element (i, j) is the pKa value for the acid-base equilibrium between pseudoisomers i and j.
    • .zs - p x 1 array of pseudoisomer charges.
    • .nHs - p x 1 array of number of hydrogen atoms in each pseudoisomer’s chemical formula.
    • .majorMSpH7 - p x 1 logical array. True for the most abundant pseudoisomer at pH 7.

REQUIRES cxcalc - ChemAxon’s Calculator plugin, with licence, cxcalc is part of Marvin Beans, available by academic licence from ChemAxon

https://www.chemaxon.com/download/marvin-suite/#mbeans

https://docs.chemaxon.com/display/docs/Installation+MS#InstallationMS-MarvinBeansforJava

https://docs.chemaxon.com/display/CALCPLUGS/cxcalc+command+line+tool

https://docs.chemaxon.com/display/docs/Installation+MS#InstallationMS-Linux/SolarisLinux/Solaris

getCompartment(mets)[source]

Gets the compartment for each metabolite, and the unique compartments

Usage

[metCompartments, uniqueCompartments] = getCompartment(mets)

Input

  • metsm x 1 cell array of metabolite abbreviations with compartment concatentated on the right hand side (i.e. metAbbr[*]).

Outputs

  • compartmentsm x 1 cell array of compartment identifiers
  • uniqueCompartments – cell array of unique compartment identifiers
setupComponentContribution(model, molFileDir, cid, printLevel)[source]

Estimates standard transformed reaction Gibbs energy and directionality at in vivo conditions in multicompartmental metabolic reconstructions. Has external dependencies on the COBRA toolbox, the component contribution method, Python (with numpy and Open Babel bindings), ChemAxon’s Calculator Plugins, and Open Babel. See details on availability at the end of help text.

Usage

model = setupComponentContribution(model, molFileDir, cid, printLevel)

Input

  • model Model structure with following fields
    • .S - m x n stoichiometric matrix.
    • .mets - m x 1 array of metabolite identifiers.
    • .rxns - n x 1 array of reaction identifiers.
    • .metFormulas - m x 1 cell array of metabolite formulas. Formulas for protons should be H, and formulas for water should be H2O.
    • .metCharges - m x 1 numerical array of metabolite charges.
    • .metCompartments - optional m x 1 array of metabolite compartment assignments. Not required if metabolite identifiers are strings of the format ID[*] where * is the appropriate compartment identifier.

Optional inputs

  • molFileDir – Path to a directory containing molfiles for the major tautomer of the major microspecies of each metabolite at pH 7. Molfiles should be named with the metabolite identifiers in model.mets (without compartment assignments). Not required if cid are specified.
  • cidm x 1 cell array of KEGG Compound identifiers. Not required if molfiledir is specified.
  • printLevel – Verbose level

Output

  • model – Model structure with following additional fields:
    • .inchi - Structure containing four m x 1 cell array’s of IUPAC InChI strings for metabolites, with varying levels of structural detail.
    • .pKa - m x 1 structure containing metabolite pKa values estimated with ChemAxon’s Calculator Plugins.
    • .pseudoisomers - p x 4 matrix with the following columns:
      1. Metabolite index.
      2. Estimated pseudoisomer standard Gibbs energy.
      3. Number of hydrogen atoms in pseudoisomer chemical formula.
      4. Charge on pseudoisomer.

Written output - MetStructures.sdf - An SDF containing all structures input to the component contribution method for estimation of standard Gibbs energies.

setupThermoModel(model, confidenceLevel)[source]

Estimates standard transformed reaction Gibbs energy and directionality at in vivo conditions in multicompartmental metabolic reconstructions. Has external dependencies on the COBRA toolbox, the component contribution method, Python (with numpy and Open Babel bindings), ChemAxon’s Calculator Plugins, and Open Babel. See details on availability at the end of help text.

Usage

model = setupThermoModel(model, confidenceLevel)

Inputs

  • model – Model structure with following fields:
    • .S - m x n stoichiometric matrix.
    • .mets - m x 1 array of metabolite identifiers.
    • .rxns - n x 1 array of reaction identifiers.
    • .metFormulas - m x 1 cell array of metabolite formulas. Formulas for protons should be H, and formulas for water should be H2O.
    • .metCharges - m x 1 numerical array of metabolite charges.
    • .T - Temperature in Kelvin.
    • .compartments - c x 1 array of compartment identifiers. Should match the compartment identifiers in model.metCompartments.
    • .ph - c x 1 array of compartment specific pH values in the range 4.7 to 9.3.
    • .is - c x 1 array of compartment specific ionic strength values in the range 0 to 0.35 mol/L.
    • .chi - c x 1 array of compartment specific electrical potential values in mV. Electrical potential in cytosol is assumed to be 0 mV. Electrical potential in all other compartments are relative to that in cytosol.
    • .concMin - m x 1 array of lower bounds on metabolite concentrations in mol/L.
    • .concMax - m x 1 array of upper bounds on metabolite concentrations in mol/L.
  • confidenceLevel – {0.50, 0.70, (0.95), 0.99}. Confidence level for standard transformed reaction Gibbs energies used to quantitatively assign reaction directionality. Default is 0.95, corresponding to a confidence interval of +/- 1.96 * ur.

Output

  • model – Model structure with following additional fields:
    • .inchi - Structure containing four m x 1 cell array’s of IUPAC InChI strings for metabolites, with varying levels of structural detail.
    • .pKa - m x 1 structure containing metabolite pKa values estimated with ChemAxon’s Calculator Plugins.
    • .DfG0 - m x 1 array of component contribution estimated standard Gibbs energies of formation.
    • .covf - m x m estimated covariance matrix for standard Gibbs energies of formation.
    • .DfG0_Uncertainty - m x 1 array of uncertainty in estimated standard Gibbs energies of formation. Will be large for metabolites that are not covered by component contributions.
    • .DrG0 - n x 1 array of component contribution estimated standard reaction Gibbs energies.
    • .DrG0_Uncertainty - n x 1 array of uncertainty in standard reaction Gibbs energy estimates. Will be large for reactions that are not covered by component contributions.
    • .DfG0_pseudoisomers p x 4 matrix with the following columns:
      1. Metabolite index.
      2. Estimated pseudoisomer standard Gibbs energy.
      3. Number of hydrogen atoms in pseudoisomer chemical formula.
      4. Charge on pseudoisomer.
    • .DfGt0 - m x 1 array of estimated standard transformed Gibbs energies of formation.
    • .DrGt0 - n x 1 array of estimated standard transformed reaction Gibbs energies.
    • .DfGtMin - m x 1 array of estimated lower bounds on transformed Gibbs energies of formation.
    • .DfGtMax - m x 1 array of estimated upper bounds on transformed Gibbs energies of formation.
    • .DrGtMin - n x 1 array of estimated lower bounds on transformed reaction Gibbs energies.
    • .DrGtMax - n x 1 array of estimated upper bounds on transformed reaction Gibbs energies.

Written output - MetStructures.sdf - An SDF containing all structures input to the component contribution method for estimation of standard Gibbs energies.

thermoConstrainFluxBounds(model, confidenceLevel, DrGt0_Uncertainty_Cutoff, printLevel)[source]

Thermodynamically constrain reaction bounds.

Usage

[modelThermo, directions] = thermoConstrainFluxBounds(model, confidenceLevel, DrGt0_Uncertainty_Cutoff, printLevel)

Inputs

  • model – Model structure with following additional fields:
    • .DrGtMin - n x 1 array of estimated lower bounds on transformed reaction Gibbs energies.
    • .DrGtMax - n x 1 array of estimated upper bounds on transformed reaction Gibbs energies.
  • confidenceLevel
  • DrGt0_Uncertainty_Cutoff – Thermodynamic data not used if uncertainty is high in estimates

Optional input

  • printLevel – -1 - print out to file, 0 - silent, 1 - print out to command window

Outputs

  • modelThermo – Model structure with following additional fields:
    • modelThermo.lb_reconThermo - lower bound based on thermodynamic estimates, where uncertainty is below a threshold
    • modelThermo.ub_reconThermo - upper bound based on thermodynamic estimates, where uncertainty is below a threshold
  • directions – a structue of boolean vectors with different directionality assignments where some vectors contain subsets of others

Qualitatively assigned direction:

  • directions.forwardRecon
  • directions.reverseRecon
  • directions.reversibleRecon

Qualitatively assigned directions using thermo in preference to qualitative assignments but using qualitative assignments where thermodynamic data is lacking:

  • directions.forwardThermo
  • directions.reverseThermo
  • directions.reversibleThermo
  • directions.uncertainThermo