View source: R/id_conversion.R
| obtain_substrates_products | R Documentation | 
The function obtain_substrates_products obtains from the 
reactions stored in the rhea_reaction_smiles object the 
substrates and products.
obtain_substrates_products(rhea_reaction_smiles, rhea_directions)
rhea_reaction_smiles | 
 data.frame containing the mappings between RHEA reaction ids and SMILES identifiers  | 
rhea_directions | 
 data.frame containing information on the directionality of RHEA directions  | 
The function obtain_substrates_products uses the information on the 
directionality of the reactions stored in the rhea_directions
object. This object stores in the first column reactions that have no
information on directionality, in the second column left-to-right reactions,
in the third column right-to-left reactions, and in the fourth column 
bidirectional reactions. To comply with downstream functions 
obtain_substrates_products will interpret the entries of the reactions
in rhea_reaction_smiles as in the following:
 if reaction id in column 1 of rhea_directions: 
first entry = substrates, 
 if reaction id in column 2 of rhea_directions:
first entry = substrates,
 if reaction id in column 3 of rhea_directions:
first entry = products, 
 if reaction id in column 4 of rhea_directions:
first entry = substrates.
list
Thomas Naake
## rhea_reaction_smiles
file <- file.path(
    path.package("LipidNetworkPredictR"), "extdata", "rhea-reaction-smiles.tsv",
    fsep = .Platform$file.sep)
rhea_reaction_smiles <- read.csv(file, sep = "\t", header = FALSE)
 
## rhea_directions
file <- file.path(
    path.package("LipidNetworkPredictR"), "extdata", "rhea-directions.tsv",
    fsep = .Platform$file.sep)
rhea_directions <- read.csv(file, sep = "\t", header = TRUE)
## run the function
LipidNetworkPredictR:::obtain_substrates_products(
    rhea_reaction_smiles = rhea_reaction_smiles,
    rhea_directions = rhea_directions)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.