create_reactions: Create reaction network for given reactions of lipid...

View source: R/create_reaction.R

create_reactionsR Documentation

Create reaction network for given reactions of lipid metabolism

Description

The function create_reactions will create reactions following a given reaction order.

create_reactions will return a list containing one entry for each reaction type (RHEA id). Each reaction entry is again a list: the first entry will contain a list of the products of the reaction, the second entry will contain the filled template with the updated reactions.

Usage

create_reactions(substrates, reactions)

Arguments

substrates

list containing the substrates for the reaction, e.g. the initial substrate for the first reaction

reactions

data.frame containing the reaction order (in the column "order") and the RHEA id (in the column "RHEA").

Details

The data.frame reactions has to contain the columns order and RHEA. It may in addition contain additional columns such as reaction or isReversible. These columns will be ignored by create_reactions but might be of use by the user.

The column RHEA will contain the ids that are used for matching the reaction type.

Value

list containing the reactions

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

## create data.frame with reactions and reaction order
reactions <- rbind(
    c(1, "RHEA:15421", "M_ATP + M_CoA + M_FA <=> M_PPi + M_AMP + M_AcylCoA", FALSE),
    c(2, "RHEA:15325", "M_Glycerol-3-P + M_AcylCoA <=> M_CoA + M_LPA", FALSE),
    c(3, "RHEA:19709", "M_AcylCoA + M_LPA <=> M_CoA + M_PA", FALSE),
    c(4, "RHEA:27429", "M_H2O + M_PA <=> M_Pi + M_1,2-DG", FALSE)
)
reactions <- data.frame(order = reactions[, 1], reaction_RHEA = reactions[, 2],
    reaction_formula = reactions[, 3], directed = reactions[, 4])
reactions$order <- as.numeric(reactions$order)
reactions$directed <- as.logical(reactions$directed)

## run the function
create_reactions(substrates = list(FA = FA), reactions = reactions)

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