RbioRXN (version 1.3.1)

check.mass.balance: Check given biochemical reaction is mass-balanced

Description

Using molecular formula of reaction participants, check given reaction equation is mass-balanced. Note that some reaction participants don't have molecular formula (e.g., polymer or generic compound), so these reactions cannot be checked.

Usage

check.mass.balance(equation, chemical_table, id_col="chebi", formula_col="formula", 
direction_type=c(" <=> ", " => ", " <\\?> "))

Arguments

equation
Reaction equation usually from get.rhea.all() or get.metacyc.all() function.
chemical_table
Chemial table (data.frame) containing molecular formula
id_col
In chemical table, choose the column name which contains chemical ID (usually first column)
formula_col
In chemical table, choose the column name which contains molecular formula
direction_type
In reaction equation, provide reaction direction symbols. Default value is c(" <=> ", " => ", " <\\?> ")

Value

  • Character values (not logical)
  • TRUE
  • FALSE
  • Not available

Examples

Run this code
data(example)

chebi = example$chebi # sample ChEBI

## Check mass balance for example reactions
Rm = example$rhea_massbal # sample Rhea data
check.mass.balance(Rm, chebi, "chebi", "formula", c("<\\?> ", "<=> ", "=> "))

Run the code above in your browser using DataCamp Workspace