dot-check_colnames_substrates_combinations: Check if correct colnames are in 'substrates_combinations'

.check_colnames_substrates_combinationsR Documentation

Check if correct colnames are in substrates_combinations

Description

The helper function checks if the correct columns are in substrates depending on the reaction.

Usage

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

Arguments

substrates

data.frame or list

reaction

character(1)

Details

The function will throw an error if reaction is not of length 1 and is not an implemented method.

The function will invisibly return the correct columns for reaction.

.check_colnames_substrates_combinations is a helper function to test the integrity of df.

Value

character containing the valid colnames

Author(s)

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)

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

michaelwitting/wormLipidPredictR documentation built on July 1, 2023, 9:20 p.m.