validateSyntax: Evaluate if a stoichiometric reaction has a valid syntax

View source: R/validateSyntax.R

validateSyntaxR Documentation

Evaluate if a stoichiometric reaction has a valid syntax

Description

For a set of given stoichiometric reactions, this function makes the following syntactic evaluations for each reaction:

  • Evaluates if the reaction contain more than one coefficient by metabolite

  • Evaluates if the reaction contain metabolite coefficients between parenthesis

  • Evaluates if the reaction contain arrow symbol between spaces

  • Evaluates if the reaction contain not allowed arrow symbols

  • Evaluates if the reaction contain metabolites name separated by a plus symbol between spaces

  • Evaluates if the reaction contain substituents separated of the metabolite names

Usage

validateSyntax(reactionList)

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

Value

A boolean value 'TRUE' if reaction has a valid syntax.

Author(s)

Daniel Camilo Osorio <dcosorioh@tamu.edu>

Examples

# Evaluate the syntaxis for a single reaction
validateSyntax(reactionList = "ADP[c] + Phosphoenolpyruvate[c] => ATP[c] + Pyruvate[c]")

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

# Evaluating the syntaxis for a set of stoichiometric reactions
validateSyntax(reactionList = glycolysis$REACTION)

minval documentation built on May 9, 2022, 5:07 p.m.