additionCost: Calculate addition cost of a stoichiometric reaction in a...

Description Usage Arguments Author(s) Examples

View source: R/additionCost.R

Description

This function calculates the addition-cost of a stoichiometric reaction in a metabolic network. The cost is computed for each reaction as the ratio of metabolites not included in the reference metabolic network over the total number of metabolites involved in the reaction.

Usage

1
additionCost(reactionList, reference)

Arguments

reactionList

A set of stoichiometric reaction with the following characteristics:

  • Arrows symbols must be given in the form '=>' or '<=>'

  • Inverse arrow symbols '<=' or other types as: '-->', '<==>', '->' will not be parsed and will lead to errors.

  • Arrow symbols and plus signs (+) must be surrounded by a space character

  • Stoichiometric coefficients must be surrounded by a space character and not by parentheses.

  • Each metabolite must have only one stoichiometric coefficient, substituents must be joined to metabolite name by a hyphen (-) symbol.

  • Exchange reactions have only one metabolite before arrow symbol

  • Compartments must be given between square brackets ([compartment]) joined at the end of metabolite name

Some examples of valid stoichiometric reactions are:

  • H2O[c] + Urea-1-Carboxylate[c] <=> 2 CO2[c] + 2 NH3[c]

  • ADP[c] + Phosphoenolpyruvate[c] => ATP[c] + Pyruvate[c]

  • CO2[c] <=>

reference

A different set of stoichiometric reactions with the same format of reactionList. This is the metabolic network expected to gap filling.

Author(s)

Daniel Camilo Osorio <dcosorioh@unal.edu.co>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Generate a reference, a vector of stoichiometric reactions as described above.

example_reference <- vector()
example_reference[1] <- "A + B => C + D"
example_reference[2] <- "B + D => E"

# Generate a set of reactions to compute the addition cost.

example_reactionList <- vector()
example_reactionList[1] <- "A + E => F + G"
example_reactionList[2] <- "A + E <=> F"

# The addition cost function will identify those metabolites not included in
# the reference (F and G) and will compute the addition cost for each reaction
# as the ratio of the number of metabolites not included in the reference
# over the total of metabolites in the reaction (2/4 and 1/3 respectively).

additionCost(reactionList = example_reactionList, reference = example_reference)
# [1] 0.5000000 0.3333333

gibbslab/g2f documentation built on Dec. 10, 2020, 4:19 p.m.