View source: R/id_conversion.R
| find_RHEA_ids_from_SMILES | R Documentation | 
The function find_RHEA_ids_from_SMILES returns the RHEA ids
that are involved in reactions of the given SMILES (ids).
find_RHEA_ids_from_SMILES(
  ids,
  rhea_reaction_smiles,
  rhea_directions,
  type = c("both", "substrates", "products")
)
ids | 
 list, entries contain the SMILES identifiers.  | 
rhea_reaction_smiles | 
 data.frame containing the mappings between ChEBI identifiers and SMILES identifiers  | 
rhea_directions | 
 data.frame containing information on the directionality of RHEA directions  | 
type | 
 character(1), one of "both", "substrates", or "products"  | 
The returned result might differ depending on the type object:
 if type = "both", the function will return the RHEA 
identifiers for the SMILES found both in the substrates or products of 
the reactions,
 if type = "substrates", the function will return the RHEA 
identifiers for the SMILES found in the substrates of the reactions,
 if type = "products", the function will return the RHEA 
identifiers for the SMILES found in the products of the reactions.
list
Thomas Naake
ids <- list(
    "HMDB0004947" = "CCCCCCCCCCCCC/C=C/[C@H](O)[C@H](CO)NC(=O)CCCCCCCCCCC",
    "HMDB0004949" = "CCCCCCCCCCCCC/C=C/[C@H](O)[C@H](CO)NC(=O)CCCCCCCCCCCCCCC",
    "HMDB0011763" = "CCCCCCCC/C=C\\CCCCCCCC(=O)N[C@H](CO)[C@H](O)CCCCCCCCCCCCCCC",
    "HMDB0004974" = NA, 
    "HMDB0011594" = NA)
    
## 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
## type = "both"
find_RHEA_ids_from_SMILES(ids = ids, 
    rhea_reaction_smiles = rhea_reaction_smiles,
    rhea_directions = rhea_directions, type = "both")
## type = "substrates"
find_RHEA_ids_from_SMILES(ids = ids, 
    rhea_reaction_smiles = rhea_reaction_smiles,
    rhea_directions = rhea_directions, type = "substrates")
## type = "products"
find_RHEA_ids_from_SMILES(ids = ids, 
    rhea_reaction_smiles = rhea_reaction_smiles,
    rhea_directions = rhea_directions, type = "products")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.