compartments: Extract the compartments associated to metabolites of a set...

View source: R/compartments.R

compartmentsR Documentation

Extract the compartments associated to metabolites of a set of stoichiometric reactions.

Description

For a given set of stoichiometric reactions, this function identifies the compartments associated to each involved metabolite and return a vector with the list of unique compartments identified.

Usage

compartments(reactionList, uniques = TRUE)

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] <=>

uniques

A boolean value 'TRUE' or 'FALSE' if uniques must be returned

Value

A vector with the list of compartments identified for the metabolites of a set of stoichiometric reactions.

Author(s)

Daniel Camilo Osorio <dcosorioh@tamu.edu>

Examples

# Loading a set of stoichiometric reactions
glycolysis <- read.csv(system.file("extdata/glycolysisModel.csv",package = "minval"), sep='\t')

# Extract unique compartments
compartments(reactionList = glycolysis$REACTION)

# Extract all compartments
compartments(reactionList = glycolysis$REACTION, unique = FALSE)

# Extract compartments of metabolites
compartments(reactionList = "H2O[e]")

gibbslab/minval documentation built on May 25, 2022, 5:20 a.m.