obtain_substrates_products: Obtain substrates and products

View source: R/id_conversion.R

obtain_substrates_productsR Documentation

Obtain substrates and products

Description

The function obtain_substrates_products obtains from the reactions stored in the rhea_reaction_smiles object the substrates and products.

Usage

obtain_substrates_products(rhea_reaction_smiles, rhea_directions)

Arguments

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

Details

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.

Value

list

Author(s)

Thomas Naake

Examples

## 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)

michaelwitting/wormLipidPredictR documentation built on Dec. 20, 2024, 5:35 a.m.