Learn R Programming

minval (version 0.4)

reactants: Identifies the reactants for a stoichometric reaction

Description

This function identifies the reactants for a stoichometric reaction. This function assumes that all your reactions have the following format L-Glutamate[c] <=> CO2[c] + 4-Aminobutanoate[c]

Usage

reactants(reaction)

Arguments

reaction
A stoichiometric reaction with the following format L-Glutamate[c] <=> CO2[c] + 4-Aminobutanoate[c]

Examples

Run this code
# For a stoichiometric reaction
reaction <- "ADP[c_n] + Phosphoenolpyruvate[c_n] => ATP[c_n] + Pyruvate[c_n]"

# Extract the products
reactants(reaction)
# [1] "ADP[c_n]"                 
# [2] "Phosphoenolpyruvate[c_n]"

# If stoichiometric reaction is reversible, function returns all metabolites
reactants("ADP[c_a] + ATP[m_a] <=> ADP[m_a] + ATP[c_a]")
# [1] "ADP[c_a]"
# [2] "ATP[m_a]"
# [3] "ADP[m_a]"
# [4] "ATP[c_a]"

Run the code above in your browser using DataLab