dot-add_products: Produce products by replacing strings of substrates

.add_productsR Documentation

Produce products by replacing strings of substrates

Description

Helper function for create_reaction.

The function .add_products returns a data.frame of substrates and products. The products are taken and modified from the substrates.

Usage

.add_products(substrates, reaction = "RHEA:15421")

Arguments

substrates

data.frame

reaction

character(1)

Details

The string replacement depend on the reaction argument.

Depending on the argument, different columns (i.e. substrates) are required and different columns (i.e. products) are returned.

The function calls internally the function stringi::stri_replace_all_fixed.

Value

data.frame

Author(s)

Michael Witting, michael.witting@helmholtz-muenchen.de and Thomas Naake, thomasnaake@googlemail.com

Examples

FA <- c("FA(14:0(12Me))", "FA(16:0(14Me))", "FA(15:1(9Z)(14Me))",        
    "FA(15:0(14Me))", "FA(16:0(15Me))", "FA(12:0)", "FA(14:0)")
substrates <- list(FA = FA)

## create template
template <- LipidNetworkPredictR:::.create_template(template = list(), 
    reaction = "RHEA:15421")

## create data.frame of substrates
df_substrates <- LipidNetworkPredictR:::.create_substrates_combinations(
    substrates = substrates, 
    constraints = "", negate = FALSE)
    
## add products to data.frame
LipidNetworkPredictR:::.add_products(substrates = df_substrates, 
    reaction = "RHEA:15421")
 

michaelwitting/wormLipidPredictR documentation built on Nov. 24, 2024, 5:39 p.m.