RbioRXN (version 1.3.1)

is.generic.metacyc: Check given reaction is generic reaction

Description

Generic reaction is a reaction with at least one compound class as reaction participant (e.g., a primary alcohol + NADP -> an aldehyde + H(+) + NADPH). This function check if given reaction is generic reaction

Usage

is.generic.metacyc(equation,compound_df,id_col,smiles_col,parent_col,direction_type)

Arguments

equation
Reaction equation usually from get.metacyc.all() function.
compound_df
Chemial table (data.frame) containing SMILES code of each compound in reaction equation
id_col
In chemical table, choose the column name which contains chemical id (usually first column)
smiles_col
In chemical table, choose the column name which contains SMILES code
parent_col
In chemical table, choose the column name which contains TYPES
direction_type
In reaction equation, provide reaction direction charaters. Default is c(" <=> ", " => ")

Value

  • Logical TRUE/FALSE

References

MetaCyc: http://metacyc.org

Examples

Run this code
data(example) # Load sample data

metacyc.c = example$metacyc.c
metacyc.r.1 = example$metacyc_generic$equation
metacyc.r.2 = example$metacyc_massbal
metacyc.r = c(metacyc.r.1, metacyc.r.2)

names(metacyc.c) # Print column names

# Check generic reaction
is.generic.metacyc(metacyc.r,metacyc.c,'UNIQUE.ID','SMILES','TYPES',c('<=> ', '=> '))

Run the code above in your browser using DataCamp Workspace