dot-create_list_with_template: Create list and substitute substrates/products

.create_list_with_templateR Documentation

Create list and substitute substrates/products

Description

Helper function for create_reaction.

The function .create_list_with_template takes the template and replaces the "reactionFormula" by the substrates/products from df_reaction.

Usage

.create_list_with_template(df_reaction, template, reaction = "RHEA:15421")

Arguments

df_reaction

data.frame

template

list

reaction

character(1)

Details

The string replacement depend on the reaction argument.

Value

list

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(17:0(16Me))", "FA(12:0(11Me))", "FA(13:0(12Me))", "FA(14:0(13Me))",
    "FA(15:0(14Me))", "FA(16:0(15Me))", "FA(12:0)", "FA(14:0)")
substrates <- list(FA = FA)
reaction <- "RHEA:15421"

## create template
template <- LipidNetworkPredictR:::.create_template(template = NA, 
    reaction = reaction)

## create data.frame of substrates
df_substrates <- LipidNetworkPredictR:::.create_substrates_combinations(
    substrates = substrates, template = template)
    
## add products to data.frame
df_reaction <- LipidNetworkPredictR:::.add_products(
    substrates = df_substrates, 
    reaction = reaction)
    
## make new data.frame with reaction template
LipidNetworkPredictR:::.create_list_with_template(
    df_reaction = df_reaction,
    template = template, reaction = reaction)

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