View source: R/id_conversion.R
select_substrates_or_products | R Documentation |
The function select_substrates_or_products
selects either
substrates or products of (a) reaction(s) stored in a list
object
depending on the cols
argument.
Depending on the type
argument the function will either return
a list of substrates (type = "substrates"
) or products
(type = "products"
).
select_substrates_or_products(
reaction,
cols,
type = c("substrates", "products")
)
reaction |
list, each entry contains a character vector of length 2 |
cols |
numeric of length |
type |
character(1) either substrates or products |
Each list entry stores the substrates/products or products/substrates of
a reaction. The direction of this reaction is codified in the
cols
argument.
If cols
= 1: first element is equal to substrates,
if cols
= 2: first entry is equal to substrates,
if cols
= 3: first entry is equal to products,
if cols
= 4: first entry is equal to substrates.
list
Thomas Naake
## given a rection that describes the change of (3S)-3-Hydroxy-2-butanone
## to its stereoisomer (3R)-3-Hydroxy-2-butanone
reaction <- list(c("CC(=O)[C@H](C)O", "CC(=O)[C@H](C)O"))
## cols = 2
cols <- 2
LipidNetworkPredictR:::select_substrates_or_products(reaction = reaction,
cols = cols, type = "substrates")
LipidNetworkPredictR:::select_substrates_or_products(reaction = reaction,
cols = cols, type = "products")
## cols = 3
cols <- 3
LipidNetworkPredictR:::select_substrates_or_products(reaction = reaction,
cols = cols, type = "substrates")
LipidNetworkPredictR:::select_substrates_or_products(reaction = reaction,
cols = cols, type = "products")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.