knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  warning = FALSE
)

This vignette describes the complete workflow for the prediction of Caenorhabditis elegans (C. elegans) lipids performed by Witting et al. (in preparation). All template reactions at the current stage have been curated from the WormJam model.

# load required library
library(LipidNetworkPredictR)
library(dplyr)
library(rgoslin)

In order to store all the results a data frame for the reactions is created. Lipids abbreviations are just appended.

## create data frame to store reactions
lipid_reactions <- data.frame()

## create vector to store shorthand notations of generated lipids
##lipid_abbrev <- vector()
lipid_df <- tibble()

The following abbreviations are used (in alphabetical order):

Fatty acids used for biosynthesis

First input for the prediction are fatty acids that were shown to be present in C. elegans by different groups. A consensus list was generated based on fatty acids from WormJam and detected in C. elegans. A data frame of these fatty acids is supplied with this package. Fatty acids used in glycero- and glycerophospholipids are different from the ones used in sphingolipid biosynthesis. The pools are only partially overlapping between the two. Therefore, two different files for the two different pools are supplied. The following lines read the fatty acids into a data frame and isolates the shorthand notation of the fatty acids, which are further used for downstream processing.

## read data frame with fatty acids detected in C. elegans
f <- system.file("extdata", "celegans_fatty_acids_GL_GP.txt",
    package = "LipidNetworkPredictR")

fatty_acid_gl_gp_df <- read.table(f, sep = "\t", header = TRUE, 
        comment.char = "", stringsAsFactors = FALSE) |> 
    data.frame()

## get short hand notations for fatty acids
FA_GPGL <- fatty_acid_gl_gp_df$shorthand

## take only a subset of those to speed things up
FA_GPGL <- FA_GPGL[FA_GPGL %in%
    c("FA(12:0)", "FA(14:0)", "FA(15:0)", "FA(16:0)", "FA(17:0)", "FA(18:0)", "FA(19:0)", "FA(20:0)" )]
lipid_info <- rgoslin::parseLipidNames(FA_GPGL)

## add lipids to data frame
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

The lines below perform the same action for fatty acids used in sphingolipid biosynthesis.

## read data frame with fatty acids detected in C. elegans
f <- system.file("extdata", "celegans_fatty_acids_SPH.txt",
    package = "LipidNetworkPredictR")

fatty_acid_sph_df <- read.table(f, sep = "\t", header = TRUE,
    comment.char = "", stringsAsFactors = FALSE) |>
    data.frame()

## get short hand notations for fatty acids
FA_SPH <- fatty_acid_sph_df$shorthand

## take only a subset of those to speed things up
FA_SPH <- FA_SPH[FA_SPH %in%
    c("FA(12:0)", "FA(14:0)", "FA(15:0)", "FA(16:0)", "FA(17:0)", "FA(18:0)", "FA(19:0)", "FA(20:0)" )]
lipid_info <- rgoslin::parseLipidNames(FA_SPH)

## add lipids to data frame
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Block 0: Preparation of Acyl-CoA

Biosynthesis of CoA from FA

Acyl groups are transfered in their activate form of acyl CoA (CoA). Their synthesis requires ATP. C. elegans harbors different Acyl-CoA synthetases and their substrate specificity is not established so far. In order to be able to use all defined acyls they are converted to acyl CoA. For each reaction, a specific function that converts one lipid into another based on a template reaction have been implemented. The basic reaction is hardcoded in the function itself, but additional information can supplied via a list, e.g. gene associations etc. This information can be obtained from WormJam.

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "CoA biosynthesis",
    reaction_formula = "M_ATP + M_CoA + M_FA = M_PPi + M_AMP + M_AcylCoA",
    reaction_RHEA = "RHEA:15421",
    reaction_isReversible = "",
    reaction_geneAssociation = "",
    reaction_pathway = "Acyl-CoA synthetase")

The first reaction converts fatty acids (FA) to acyl-CoA. Each reaction returns a list with multiple elements. The second element contains the new non-generic reactions, whereas the first contain the shorthand notation of all newly generated lipids. Since the shorthand notations are required further downstream, they are additionally stored object with the name of the respective lipid class. The lines below generate acyl-CoA for fatty acids found to be present in glycero- and glycerophospholipids.

## convert fatty acids to acyl CoA --------------------------------------------
results <- .create_reaction(substrates = list(FA = FA_GPGL),
    template = template, reaction = "RHEA:15421")

results[[2]][1:5, "reaction_formula"]

## get CoA for further reactions (glycero- and glycerophospholipids)
CoA_GPGL <- results[[1]][["AcylCoA"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(CoA_GPGL)

## add lipids to data frame
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Likewise, the fatty acyls for the synthesis of sphingolipids are required as acyl-CoA. The main differences are that fatty acyls in sphingolipids are generally saturated and longer compared to glycero- and glycerophospholipids and often contain a hydroxygroup at the second position of the acyl.

## convert fatty acids to acyl CoA --------------------------------------------
results <- .create_reaction(substrates = list(FA = FA_SPH),
    template = template, reaction = "RHEA:15421")

results[[2]][1:5, "reaction_formula"]

## get CoA for further reactions (sphingolipids)
CoA_SPH <- results[[1]][["AcylCoA"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(CoA_SPH)

## add lipids to data frame
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Block 1: Biosynthesis and Degradation of Phosphaditic acid and Diacylglycerol

Phosphaditic acid (PA) and Diacylgylcerols (DG) are an important intermediate for the biosynthesis of different lipids. The represent a branching point between triacylglycerols and glycerophospholipids. They are synthesized from lysosphosphaditic and phosphaditic acid by successive acylation of glycerol 3-phosphate. The first block of reactions handles the generation of PA and DG as well as their degradation via monoacylglycerols to fatty acids.

Biosynthesis of LPA

The first step to obtain DG is the biosynthesis of lysophophaditic acid from acyl CoA_GPGL and glycerol 3-phosphate. This reaction takes place in the ER and the mitochondria. In the ER the reaction is catalyzed by acl-5 (WBGene00011106) or acl-6 (WBGene00017261), while in the mitochondria acl-4 (WBGene00018657) is used. No subcellular specificity is currently used, therefore the assignments are merged together to yield a single reaction.

# template for reaction --------------------------------------------------------
template <- list(reaction_name = "glycerol-3 phosphate acyl transferase",
    reaction_formula = "M_Glycerol-3-P + M_AcylCoA = M_CoA + M_LPA",
    reaction_RHEA = "RHEA:15325",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00017261 or WBGene00018657 or WBGene00011106",
    reaction_pathway = "Biosynthesis and Degradation of Phosphaditic acid and Diacylglycerol")
## biosynthesis of LPA --------------------------------------------------------
results <- .create_reaction(substrates = list(AcylCoA = CoA_GPGL),
    template = template, reaction = "RHEA:15325")

results[[2]][1:5, "reaction_formula"]

## get LPA for further reactions
LPA <- results[[1]][["sn1LPA"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(LPA)

## add lipids to data frame
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Biosynthesis of PA

In the next step a second acyl group is transferred to the LPA to produce PA. This reaction is catalyzed by acl-9 (WBGene00022646) or acl-8 (WBGene00020264) or mboa-3 (WBGene00016934) or acl-1 (WBGene00010339) or acl-2 (WBGene00011543) in the ER. For the mitochondrial counterpart no genes are known so far. acl-3 (WBGene00006491) might be a good candidate since it is predicted to locate in the mitochondria.

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "lysophosphatidic acid acyl transferase",
    reaction_formula = "M_LPA + M_AcylCoA = M_CoA + M_PA",
    reaction_RHEA = "RHEA:19709",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00022646 or WBGene00020264 or WBGene00016934 or WBGene00010339 or WBGene00011543",
    reaction_pathway = "Biosynthesis and Degradation of Phosphaditic acid and Diacylglycerol")
## biosynthesis of PA ---------------------------------------------------------
results <- .create_reaction(substrates = list(sn1LPA = LPA, AcylCoA = CoA_GPGL),
    template = template, reaction = "RHEA:19709")

results[[2]][1:5, "reaction_formula"]

## get PA for further reactions
PA <- results[[1]][["PA"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(PA)

## add lipids to data frame
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Biosynthesis of DG

Diacylglycerols (DG) are produced from PA by dephosphorylation. DG are important intermediates for biosynthesis of glycerophospholipids or triacylglycerols (DG). A prominent enzyme catalyzing this reactions is LPIN-1. Plasma membrane or ER WBGene00008749 or WBGene00018756 or WBGene00020895 or WBGene00010425 nucleus WBGene00010425

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "1,2-diacyl-sn-glycerol 3-phosphate phosphohydrolase (ER)",
    reaction_formula = "M_H2O + M_PA = M_Pi + M_1,2-DG",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00008749 or WBGene00018756 or WBGene00020895 or WBGene00010425",
    reaction_pathway = "Biosynthesis and Degradation of Phosphaditic acid and Diacylglycerol")
results <- .create_reaction(substrates = list(PA = PA),
    template = template, reaction = "RHEA:27429")

results[[2]][1:5, "reaction_formula"]

## get DG for further reactions
DG <- results[[1]][["DG"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(DG)

## add lipids to data frame
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

DG Kinase

DG can be phosphorylated to create PA, which is the reversal of the reaction above. Under normal conditions this reactions is inactive, but can be activated yielding PA. Normally, DG is used for synthesis of TGs and phospho- lipids, but phosphorylation yields a switch in DG to PA, which both have also different signaling functions. In this case a lipid, which has been generated previously by a different reactions is produced. Before lipid reactions are added to the data frame, it is checked if all newly produced PAs match the previously produced ones.

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "1,2-diacyl-sn-glycerol kinase (ER)",
    reaction_formula = "M_ATP + M_1,2-DG = M_H+ + M_ADP + M_PA",
    reaction_RHEA = "RHEA:10272",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00000958 or WBGene00000959 or WBGene00000960 or WBGene00006483 or WBGene00019428",
    reaction_pathway = "Biosynthesis and Degradation of Phosphaditic acid and Diacylglycerol")
results <- .create_reaction(substrates = list(DG = DG),
    template = template, reaction = "RHEA:10272")

results[[2]][1:5, "reaction_formula"]

## check if produced PA are in previous list
if (all(results[[1]][["PA"]] %in% PA)) {

    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])

}

Degradation of DG

DG are degraded by the activity of different lipases yielding mono acylglycerols. In the case of this reaction the fatty acid at sn1 position is removed yieling an sn2-MG. sn2-MG can be converted to sn1-MG, which in turn can be re-acylated at a later stage.

Production of 1-MG

# template for reaction --------------------------------------------------------
template <- list(reaction_name = "1,2-diacyl-sn-glycerol acylhydrolase (1-acyl-MG)",
    reaction_formula = "M_H2O + M_1,2-DG = M_H+ + M_1-MG + M_FA",
    reaction_RHEA = "RHEA:44712",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "Biosynthesis and Degradation of Phosphaditic acid and Diacylglycerol")
results <- .create_reaction(substrates = list(DG = DG), template = template,
   reaction = "RHEA:44712")
results[[2]][1:5, "reaction_formula"]

## add new lipids to lipid vector
#lipid_abbrev <- c(lipid_abbrev, results[[1]][["sn1MG"]])

## get sn1MG for further reactions
sn1MG <- results[[1]][["sn1MG"]]

## add new reactions
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])

DG are degraded by the activity of different lipases yielding mono acylglycerols. In the case of this reaction the fatty acid at sn1 position is removed yieling an sn2-MG. sn2-MG can be converted to sn1-MG, which in turn can be re-acylated at a later stage.

# template for reaction --------------------------------------------------------
template <- list(reaction_name = "1,2-diacyl-sn-glycerol acylhydrolase (2-acyl-MG)",
    reaction_formula = "M_H2O + M_1,2-DG = M_H+ + M_2-MG + M_FA",
    reaction_RHEA = "RHEA:33275",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00015484 or WBGene00016704",
    reaction_pathway = "Biosynthesis and Degradation of Phosphaditic acid and Diacylglycerol")
results <-  .create_reaction(substrates = list(DG = DG),
    template = template, reaction = "RHEA:33275")

results[[2]][1:5, "reaction_formula"]

## get sn2MG for further reactions
sn2MG <- results[[1]][["sn2MG"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(sn2MG)

## add lipids to data frame
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Acyl chain migration can happen to produced 1-Acyl-MGs from 2-Acyl-MGs. Both species are in equilibrium to each other. However, 1-Acyl-MGs can be reacylated to yields DGs.

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "1-Acyl-MG 2-Acyl-MG conversion",
    reaction_formula = "M_2-MG <=> M_1-MG",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "Biosynthesis and Degradation of Phosphaditic acid and Diacylglycerol")
results <-  .create_reaction(substrates = list(sn2MG = sn2MG),
    template = template, reaction = "sn2mg_to_sn1mg")

results[[2]][1:5, "reaction_formula"]

## get sn1MG for further reactions
sn1MG <- results[[1]][["sn1MG"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(sn1MG)

## add lipids to data frame
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Degradation of MG

Both, sn1- and sn2-MG, can degraded to free fatty acids and glycerol, which can be used for energy production upon conversion to Acyl-CoAs and import into mitochondria for beta-oxidation. Other possibilities include the re-use in lipid biosynthesis.

# template for reaction --------------------------------------------------------
template <- list(reaction_name = "1-acyl-sn-glycerol acylhydrolase",
    reaction_formula = "M_H2O + M_1-MG = M_Glycerol + M_H+ + M_FA",
    reaction_RHEA = "RHEA:34019",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00022393",
    reaction_pathway = "Biosynthesis and Degradation of Phosphaditic acid and Diacylglycerol")
results <-  .create_reaction(substrates = list(sn1MG = sn1MG),
    template = template, reaction = "RHEA:34019")

results[[2]][1:5, "reaction_formula"]

## check if produced FA are in previous list
if (all(results[[1]][["FA"]] %in% FA_GPGL)) {
    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}
## template for reaction -------------------------------------------------------
template <- list(reaction_name = "2-acyl-sn-glycerol acylhydrolase",
    reaction_formula = "M_H2O + M_2-MG = M_Glycerol + M_H+ + M_FA",
    reaction_RHEA = "RHEA:32871",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00022393",
    reaction_pathway = "Biosynthesis and Degradation of Phosphaditic acid and Diacylglycerol")
results <-  .create_reaction(substrates = list(sn2MG = sn2MG),
    template = template, reaction = "RHEA:32871")

results[[2]][1:5, "reaction_formula"]

## check if produced FA are in previous list
if (all(results[[1]][["FA"]] %in% FA_GPGL)) {

  print("all fine...")

  ## add new reactions and add lipids to data frame
  lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

Phosphorylation and reacylation of MG

Similar to the degradation, all MG can be reacylated to yields DG again. Additionally, 1-Acyl-MG can be also phosphorylated to yield LPA, which is then fed into lipid biosynthesis.

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Monoacylglycerol-acyl transferase (1-acyl-MG)",
    reaction_formula = "M_1-MG + M_AcylCoA = M_CoA + M_1,2-DG",
    reaction_RHEA = "RHEA:38463",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00020910 or WBGene00019464",
    reaction_pathway = "Biosynthesis and Degradation of Phosphaditic acid and Diacylglycerol")
results <-  .create_reaction(substrates = list(sn1MG = sn1MG, AcylCoA = CoA_GPGL),
    template = template, reaction = "RHEA:38463")

results[[2]][1:5, "reaction_formula"]

## check if produced DG are in previous list
if (all(results[[1]][["DG"]] %in% DG)) {

    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}
## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Monoacylglycerol-acyl transferase (2-acyl-MG)",
    reaction_formula = "M_AcylCoA + M_1-MG = M_CoA + M_1,2-DG",
    reaction_RHEA = "RHEA:32947",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00019464 or WBGene00021818 or WBGene00020910 or WBGene00010296",
    reaction_pathway = "Biosynthesis and Degradation of Phosphaditic acid and Diacylglycerol")
results <-  .create_reaction(substrates = list(sn2MG = sn2MG, AcylCoA = CoA_GPGL), 
    template = template, reaction = "RHEA:32947")

results[[2]][1:5, "reaction_formula"]

## check if produced DG are in previous list
if (all(results[[1]][["DG"]] %in% DG)) {

    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}
## template for reaction -------------------------------------------------------
template <- list(reaction_name = "1-acyl-sn-glycerol kinase",
    reaction_formula = "M_ATP + M_1-MG = M_H+ + M_ADP + M_LPA",
    reaction_RHEA = "RHEA:33747",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00018674",
    reaction_pathway = "Biosynthesis and Degradation of Phosphaditic acid and Diacylglycerol")
results <-  .create_reaction(substrates = list(sn1MG = sn1MG),
    template = template, reaction = "RHEA:33747")

results[[2]][1:5, "reaction_formula"]

## check if produced LPA are in previous list
if (all(results[[1]][["sn1LPA"]] %in% LPA)) {

    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

Block 2: Biosynthesis and degradation of TG

Triacylglycerols (TG) are storage lipids in C. elegans and other organisms. They are stored in lipid droplets. In C. elegans they are also found in yolk for the production of eggs.

Biosynthesis of TG

TG are synthesized by acylation of DG in the ER and sequestered into lipid droplets. Since TGs harbor three acyl chains their combinatorial spaces is large.

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "diacylglycerol acyl transferase",
    reaction_formula = "M_AcylCoA + M_1,2-DG = M_CoA + M_TG",
    reaction_RHEA = "RHEA:10868",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00010408",
    reaction_pathway = "Biosynthesis and Degradation of Triacylglycerols")
results <-  .create_reaction(substrates = list(DG = DG, AcylCoA = CoA_GPGL),
    template = template, reaction = "RHEA:10868")

results[[2]][1:5, "reaction_formula"]

## get TG for further reactions
TG <- results[[1]][["TG"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(TG)

## add lipids to data frame
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Degradation of TG

TG are "symmetric" molecules, therefore from each TG two different DG can produced.

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Triacylglycerol acylhydrolase",
    reaction_formula = " M_H2O + M_TG = M_H+ + M_FA + M_1,2-DG",
    reaction_RHEA = "RHEA:33271",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00015484 or WBGene00016704",
    reaction_pathway = "Biosynthesis and Degradation of Triacylglycerols")
# results <-  .create_reaction(substrates = list(TG = TG),
#     template = template, reaction = "RHEA:33271")
# 
# results[[2]][1:5, "reaction_formula"]
# 
# ## check if produced DG are in previous list
# if (all(results[[1]][["DG"]] %in% DG)) {
#   
#     print("all fine...")
#   
#     ## add new reactions and add lipids to data frame
#     lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
# }

Block 3: Biosynthesis of Glycerophospholipids (PC, PE, PS)

The glycerophospholipids phosphatidylcholine, -ethanolamine and serine are synthesized from DG by addition of headgroups. Additionally they can be interconverted

Biosynthesis of PC

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "CDP-choline 1,2-diacyl-sn-glycerol phosphocholine transferase",
    reaction_formula = "M_CDP-Choline + M_1,2-DG = M_H+ + M_CMP + M_PC",
    reaction_RHEA = "RHEA:32939",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00009057 or WBGene00013024",
    reaction_pathway = "Biosynthesis of Glycerophospholipids (PC, PE, PS)")
results <-  .create_reaction(substrates = list(DG = DG),
    template = template, reaction = "RHEA:32939")

results[[2]][1:5, "reaction_formula"]

## get PC for further reactions
PC <- results[[1]][["PC"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(PC)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Biosynthesis of PE

## template for reaction -------------------------------------------------------
template <- list(
    reaction_name = "CDP-ethanolamine 1,2-diacyl-sn-glycerol phosphoethanolamine transferase",
    reaction_formula = "M_CDP-Ethanolamine + M_1,2-DG = M_H+ + M_CMP + M_PE",
    reaction_RHEA = "RHEA:32943",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00009057 or WBGene00013024",
    reaction_pathway = "Biosynthesis of Glycerophospholipids (PC, PE, PS)")
results <-  .create_reaction(substrates = list(DG = DG),
    template = template, reaction = "RHEA:32943")

results[[2]][1:5, "reaction_formula"]

## get PE for further reactions
PE <- results[[1]][["PE"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(PE)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Biosynthesis of PS

from PC

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "phosphatidylcholine-serine O-phosphatidyltransferase",
    reaction_formula = "M_L-Serine_c + M_PC_c = M_Choline_c + M_PS_c",
    reaction_RHEA = "RHEA:45088",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00013920",
    reaction_pathway = "Biosynthesis of Glycerophospholipids (PC, PE, PS)")
results <-  .create_reaction(substrates = list(PC = PC),
    template = template, reaction = "RHEA:45088")

results[[2]][1:5, "reaction_formula"]

## get PS for further reactions
PS <- results[[1]][["PS"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(PS)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

from PE

## template for reaction -------------------------------------------------------
template <- list(
    reaction_name = "phosphatidylethanolamine-serine O-phosphatidyltransferase",
    reaction_formula = "M_L-Serine_c + M_PE_c = M_Ethanolamine_c + M_PS_c",
    reaction_RHEA = "RHEA:27606",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00013920 or WBGene00012095",
    reaction_pathway = "Biosynthesis of Glycerophospholipids (PC, PE, PS)")
results <-  .create_reaction(substrates = list(PE = PE),
    template = template, reaction = "RHEA:27606")

results[[2]][1:5, "reaction_formula"]

## check if produced PS are in previous list
if (all(results[[1]][["PS"]] %in% PS)) {

    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

Decarboxylation of PS to PE

PE can be formed from PS species by decarboxylation. only in mitochondria!!!

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "phosphatidylserine decarboxylase",
    reaction_formula = "M_H+ + M_PS = M_CO2 + M_PE",
    reaction_RHEA = "RHEA:20828",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00015159",
    reaction_pathway = "Biosynthesis of Glycerophospholipids (PC, PE, PS)")
results <-  .create_reaction(substrates = list(PS = PS),
    template = template, reaction = "RHEA:20828")

results[[2]][1:5, "reaction_formula"]

## check if produced PE are in previous list
if (all(results[[1]][["PE"]] %in% PE)) {

    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

Block 4: Remodeling and Degradation of Glycerophospholipids

Phospholipase action on PC

PLA1 cleaves of the acyl at the sn1 position producing an sn2LPC

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Phospholipase A1 (PC)",
    reaction_formula = "M_H2O_c + M_PC_c = M_2-LPC_c + M_FA_c",
    reaction_RHEA = "RHEA:18689",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "Remodeling and Degradation of Glycerophospholipids")
results <-  .create_reaction(substrates = list(PC = PC),
    template = template, reaction = "RHEA:18689")

results[[2]][1:5, "reaction_formula"]

## get sn2LPC for further reactions
sn2LPC <- results[[1]][["sn2LPC"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(sn2LPC)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

PLA2 on PC

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Phospholipase A2 (PC)",
    reaction_formula = "M_H2O + M_PC = M_1-LPC + M_FA",
    reaction_RHEA = "RHEA:15801",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00012319 or WBGene00010872 or WBGene00019236 or WBGene00015202 or WBGene00016288 or WBGene00044468 or WBGene00018411 or WBGene00007419 or WBGene00009404 or WBGene00015406",
    reaction_pathway = "Remodeling and Degradation of Glycerophospholipids")
results <-  .create_reaction(substrates = list(PC = PC),
    template = template, reaction = "RHEA:15801")

results[[2]][1:5, "reaction_formula"]

## get sn1LPC for further reactions
sn1LPC <- results[[1]][["sn1LPC"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(sn1LPC)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

PLD on PC

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Phospholipase D (PC)",
    reaction_formula = "M_H2O + M_PC = M_Choline + M_PA",
    reaction_RHEA = "RHEA:14445",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00004040 or WBGene00017316 or WBGene00013080",
    reaction_pathway = "Remodeling and Degradation of Glycerophospholipids")
results <-  .create_reaction(substrates = list(PC = PC),
    template = template, reaction = "RHEA:14445")

results[[2]][1:5, "reaction_formula"]

## check if produced PA are in previous list
if (all(results[[1]][["PA"]] %in% PA)) {

    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

LPC to FA_GPGL

sn1LPC to FA_GPGL

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "1-acyl-sn-glycero-3-phosphocholine lipase (LPC)",
    reaction_formula = "M_H2O + M_1-LPC = M_Glycerophosphocholine + M_H+ + M_FA",
    reaction_RHEA = "RHEA:15177",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00010915",
    reaction_pathway = "Remodeling and Degradation of Glycerophospholipids")
results <-  .create_reaction(substrates = list(sn1LPC = sn1LPC),
    template = template, reaction = "RHEA:15177")

results[[2]][1:5, "reaction_formula"]

## check if produced FA are in previous list
if (all(results[[1]][["FA"]] %in% FA_GPGL)) {

    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

sn2LPC to FA_GPGL

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "2-acyl-sn-glycero-3-phosphocholine lipase (LPC)",
    reaction_formula = "M_H2O + M_2-LPC = M_Glycerophosphocholine + M_H+ + M_FA",
    reaction_RHEA = "RHEA:44696",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00010915",
    reaction_pathway = "Remodeling and Degradation of Glycerophospholipids")
results <-  .create_reaction(substrates = list(sn2LPC = sn2LPC),
    template = template, reaction = "RHEA:44696")

results[[2]][1:5, "reaction_formula"]

## check if produced FA are in previous list
if (all(results[[1]][["FA"]] %in% FA_GPGL)) {

    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

Reacylation of LPC to PC (Remodeling)

Only sn1LPC get re-acylated --> constraining? = remodeling!

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "1-acyl-sn-glycero-3-phosphocholine acyltransferase (LPC, cytosol)",
    reaction_formula = "M_1-LPC_c + M_AcylCoA_c = M_PC_c + M_CoA_c",
    reaction_RHEA = "RHEA:12937",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00020115 or WBGene00016934 or WBGene00007446",
    reaction_pathway = "Remodeling and Degradation of Glycerophospholipids")
results <-  .create_reaction(substrates = list(sn1LPC = sn1LPC, AcylCoA = CoA_GPGL),
    template = template, reaction = "RHEA:12937")

results[[2]][1:5, "reaction_formula"]

## check if produced PC are in previous list
if (all(results[[1]][["PC"]] %in% PC)) {

    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

Phospholipase action on PE

PLA1 on PE

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Phospholipase A1 (PE)",
    reaction_formula = "M_H2O + M_PE = M_H+ + M_FA + M_2-LPE",
    reaction_RHEA = "RHEA:44408",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "Remodeling and Degradation of Glycerophospholipids")
results <-  .create_reaction(substrates = list(PE = PE),
    template = template, reaction = "RHEA:44408")

results[[2]][1:5, "reaction_formula"]

## get sn2LPE for further reactions
sn2LPE <- results[[1]][["sn2LPE"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(sn2LPE)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

PLA2 on PE

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Phospholipase A2 (PE)",
    reaction_formula = "M_H2O + M_PE = M_H+ + M_FA + M_1-LPE",
    reaction_RHEA = "RHEA:44604",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00009801 or WBGene00012319",
    reaction_pathway = "Remodeling and Degradation of Glycerophospholipids")
results <-  .create_reaction(substrates = list(PE = PE),
    template = template, reaction = "RHEA:44604")

results[[2]][1:5, "reaction_formula"]

## get sn1LPE for further reactions
sn1LPE <- results[[1]][["sn1LPE"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(sn1LPE)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

PLD on PE

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Phospholipase D (PE)",
    reaction_formula = "M_H2O + M_PE <=> M_Ethanolamine + M_H+ + M_PA",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00004040 or WBGene00017316 or WBGene00013080",
    reaction_pathway = "Remodeling and Degradation of Glycerophospholipids")
results <-  .create_reaction(substrates = list(PE = PE),
    template = template, reaction = "pe_to_pa")

results[[2]][1:5, "reaction_formula"]

## check if produced PA are in previous list
if (all(results[[1]][["PA"]] %in% PA)) {

  print("all fine...")

  ## add new reactions and add lipids to data frame
  lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

LPE to FA_GPGL

sn1LPE to FA_GPGL

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "1-acyl-sn-glycero-3-phosphoethanolamine lipase (LPE)",
    reaction_formula = "M_H2O + M_1-LPE = M_H+ + M_FA + M_Glycerophosphoethanolamine",
    reaction_RHEA = "RHEA:32967",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00010915 or WBGene00022718",
    reaction_pathway = "Remodeling and Degradation of Glycerophospholipids")
results <-  .create_reaction(substrates = list(sn1LPE = sn1LPE),
    template = template, reaction = "RHEA:32967")

results[[2]][1:5, "reaction_formula"]

## check if produced FA are in previous list
if (all(results[[1]][["FA"]] %in% FA_GPGL)) {

    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

sn2LPE to FA_GPGL

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "2-acyl-sn-glycero-3-phosphoethanolamine lipase (LPE)",
    reaction_formula = "M_H2O + M_2-LPE = M_H+ + M_FA + M_Glycerophosphoethanolamine",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00010915 or WBGene00022718",
    reaction_pathway = "Remodeling and Degradation of Glycerophospholipids")
results <-  .create_reaction(substrates = list(sn2LPE = sn2LPE),
    template = template, reaction = "sn2lpe_to_fa")

results[[2]][1:5, "reaction_formula"]

## check if produced FA are in previous list
if (all(results[[1]][["FA"]] %in% FA_GPGL)) {

    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

Reacylation of LPE to PE (Remodeling)

Only sn1LPE get re-acylated --> constraining? = remodeling!

## template for reaction -------------------------------------------------------
template <- list(
    reaction_name = "1-acyl-sn-glycero-3-phosphoethanolamine acyltransferase (LPE, cytosol)",
    reaction_formula = "M_AcylCoA + M_1-LPE = M_CoA + M_PE",
    reaction_RHEA = "RHEA:32995",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00020115 or WBGene00016934 or WBGene00007446",
    reaction_pathway = "Remodeling and Degradation of Glycerophospholipids")
results <-  .create_reaction(substrates = list(sn1LPE = sn1LPE, AcylCoA = CoA_GPGL),
    template = template, reaction = "RHEA:32995")

results[[2]][1:5, "reaction_formula"]

## check if produced PE are in previous list
if (all(results[[1]][["PE"]] %in% PE)) {

    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

Block 5: Biosynthesis of Glycerophospholipids (PG, PI, CL)

PG, PI and CL are synthesized based on the common precursor CDP-DG

Biosynthesis of CDP-DG

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "phosphatidate cytidylyltransferase",
    reaction_formula = "M_CTP + M_PA = M_PPi + M_CDP-DG",
    reaction_RHEA = "RHEA:16229",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00016384",
    reaction_pathway = "Biosynthesis of Glycerophospholipids (PG, PI, CL)")
results <-  .create_reaction(substrates = list(PA = PA),
    template = template, reaction = "RHEA:16229")

results[[2]][1:5, "reaction_formula"]

## get CDPDG for further reactions
CDPDG <- results[[1]][["CDPDG"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(CDPDG)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Biosynthesis of PI

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "CDP-diacylglycerol inositol transferase",
    reaction_formula = "M_myo-Inositol + M_CDP-DG = M_H+ + M_CMP + M_PI",
    reaction_RHEA = "RHEA:11580",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00012897",
    reaction_pathway = "Biosynthesis of Glycerophospholipids (PG, PI, CL)")
results <-  .create_reaction(substrates = list(CDPDG = CDPDG),
    template = template, reaction = "RHEA:11580")

results[[2]][1:5, "reaction_formula"]

## get PI for further reactions
PI <- results[[1]][["PI"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(PI)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Biosynthesis of PGP and PG

this reaction is only mitochondrial!

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "CDP-diacylglycerol--glycerol-3-phosphate 3-phosphatidyltransferase",
    reaction_formula = "M_Glycerol-3-P + M_CDP-DG = M_H+ + M_CMP + M_PGP",
    reaction_RHEA = "RHEA:12593",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00021677",
    reaction_pathway = "Biosynthesis of Glycerophospholipids (PG, PI, CL)")
results <-  .create_reaction(substrates = list(CDPDG = CDPDG),
    template = template, reaction = "RHEA:12593")

results[[2]][1:5, "reaction_formula"]

## get PGP for further reactions
PGP <- results[[1]][["PGP"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(PGP)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

This reaction has no gene assignment at the moment

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Phosphatidylglycerophosphatase",
    reaction_formula = "M_H2O + M_PGP = M_Pi + M_PG",
    reaction_RHEA = "RHEA:33751",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "Biosynthesis of Glycerophospholipids (PG, PI, CL)")
results <-  .create_reaction(substrates = list(PGP = PGP),
    template = template, reaction = "RHEA:33751")

results[[2]][1:5, "reaction_formula"]

## get PG for further reactions
PG <- results[[1]][["PG"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(PG)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

PG to CL is only mitochondrial!!!

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Cardiolipin synthase",
    reaction_formula = "M_CDP-DG + M_PG = M_H+ + M_CMP + M_CL",
    reaction_RHEA = "RHEA:32931",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00017763",
    reaction_pathway = "Biosynthesis of Glycerophospholipids (PG, PI, CL)")
results <-  .create_reaction(substrates = list(PG = PG, CDPDG = CDPDG),
    template = template, reaction = "RHEA:32931")
                             #constraints = c("(18|20):[1,2,3,4,5].*/(18|20):[1,2,3,4,5]",
                              #               "(18|20):[1,2,3,4,5].*/(18|20):[1,2,3,4,5]"),
                             #negate = c(FALSE, FALSE))

results[[2]][1:5, "reaction_formula"]

## get CL for further reactions
CL <- results[[1]][["CL"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(CL)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Block 6: Biosynthesis of Etherlipids

Generation of fatty alcohols

Some etherlipids... mostly PE, small amounts in PC This reaction is constrained to 16:0, 18:0, 20:0!

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Fatty acyl-CoA reductase",
    reaction_formula = "M_AcylCoA + 2 M_NADPH + 2 M_H+ = M_FAO + 2 M_NADP + M_CoA",
    reaction_RHEA = "RHEA:52716",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00022200",
    reaction_pathway = "Biosynthesis of Etherlipids")
results <-  .create_reaction(substrates = list(AcylCoA = CoA_GPGL),
    template = template, reaction = "RHEA:52716")
    #constraints = c("16:0)|18:0)|20:0)"), negate = c(FALSE))

results[[2]][1:5, "reaction_formula"]

## get FAO for further reactions
FAO <- results[[1]][["FAO"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(FAO)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Generation of Acyl-DHAP

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Glycerone-phosphate O-acyltransferase",
    reaction_formula = "M_Dihydroxyacetone-P + M_AcylCoA = M_CoA + M_AcylDHAP",
    reaction_RHEA = "RHEA:17657",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00012911",
    reaction_pathway = "Biosynthesis of Etherlipids")
results <-  .create_reaction(substrates = list(AcylCoA = CoA_GPGL),
    template = template, reaction = "RHEA:17657")

results[[2]][1:5, "reaction_formula"]

## get AcylDHAP for further reactions
AcylDHAP <- results[[1]][["AcylDHAP"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(AcylDHAP)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Generation of Alkyl-DHAP

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Alkyldihydroxyacetonephosphate synthase",
    reaction_formula = "M_AcylDHAP + M_FAO = M_H+ + M_FA + M_AlkylDHAP",
    reaction_RHEA = "RHEA:36171",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00000081",
    reaction_pathway = "Biosynthesis of Etherlipids")
results <-  .create_reaction(substrates = list(AcylDHAP = AcylDHAP, FAO = FAO),
    template = template, reaction = "RHEA:36171")

results[[2]][1:5, "reaction_formula"]

## get AlkylDHAP for further reactions
AlkylDHAP <- results[[1]][["AlkylDHAP"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(AlkylDHAP)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Reduction of Alkyl-DHAP to LPA-O

Enzyme not known so far in C. elegans!!! EC 1.1.1.101

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "1-acylglycerone phosphate reductase",
    reaction_formula = "M_H+ + M_NADPH + M_AlkylDHAP = M_LPA-O + M_NADP",
    reaction_RHEA = "RHEA:36175",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "Biosynthesis of Etherlipids")
results <-  .create_reaction(substrates = list(AlkylDHAP = AlkylDHAP),
    template = template, reaction = "RHEA:36175")

results[[2]][1:5, "reaction_formula"]

## get LPAO for further reactions
LPAO <- results[[1]][["sn1LPAO"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(LPAO)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Biosynthesis of PA-O

Same genes as for LPA to PA --> substrate specificity not known yet...

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "2-O-Acyl transferase",
    reaction_formula = "M_LPAO + M_AcylCoA = M_PAO + M_CoA",
    reaction_RHEA = "RHEA:36235",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00022646 or WBGene00020264 or WBGene00016934 or WBGene00010339 or WBGene00011543",
    reaction_pathway = "Biosynthesis of Etherlipids")
results <-  .create_reaction(substrates = list(sn1LPAO = LPAO, AcylCoA = CoA_GPGL),
    template = template, reaction = "RHEA:36235")
                             #constraints = c("", "OH"),
                             #negate = c(FALSE, TRUE))

results[[2]][1:5, "reaction_formula"]

## get PAO for further reactions
PAO <- results[[1]][["PAO"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(PAO)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Biosynthesis of DG-O

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "1-Alkyl-2-acyl-sn-glycero-3-phosphate phosphohydrolase",
    reaction_formula = "M_H2O + M_PA-O = M_Pi + M_DG-O",
    reaction_RHEA = "RHEA:36239",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00008749 or WBGene00018756 or WBGene00020895",
    reaction_pathway = "Biosynthesis of Etherlipids")
results <-  .create_reaction(substrates = list(PAO = PAO),
    template = template, reaction = "RHEA:36239")

results[[2]][1:5, "reaction_formula"]

## get DGO for further reactions
DGO <- results[[1]][["DGO"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(DGO)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Biosnythesis of PE-O

headgroup transfer via cept-1 and cept-2

## template for reaction -------------------------------------------------------
template <- list(
    reaction_name = "CDP-ethanolamine 1-Alkyl,2-acyl-sn-glycerol phosphoethanolamine transferase",
    reaction_formula = "M_CDP-Ethanolamine + M_DG-O = M_H+ + M_CMP + M_PE-O",
    reaction_RHEA = "RHEA:36187",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00009057 or WBGene00013024",
    reaction_pathway = "Biosynthesis of Etherlipids")
results <-  .create_reaction(substrates = list(DGO = DGO),
    template = template, reaction = "RHEA:36187")

results[[2]][1:5, "reaction_formula"]

## get PEO for further reactions
PEO <- results[[1]][["PEO"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(PEO)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Biosynthesis of PE-P

reductase is unknown so far

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "",
    reaction_formula = "M_PE-O + M_Fe2+cytochrome_b5 + 2 M_H+ + M_O2 = M_PE-P + M_Fe3+cytochrome_b5 + 2 M_H2O",
    reaction_RHEA = "RHEA:22956",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "Biosynthesis of Etherlipids")
results <-  .create_reaction(substrates = list(PEO = PEO),
    template = template, reaction = "RHEA:22956")

results[[2]][1:5, "reaction_formula"]

## get PEP for further reactions
PEP <- results[[1]][["PEP"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(PEP)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Biosynthesis of PC-O

same as for PC!

## template for reaction -------------------------------------------------------
template <- list(
    reaction_name = "CDP-Choline 1-Alkyl,2-acyl-sn-glycerol phosphocholine transferase",
    reaction_formula = "M_CDP-Choline + M_DG-O = M_H+ + M_CMP + M_PC-O",
    reaction_RHEA = "RHEA:36179",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00009057 or WBGene00013024",
    reaction_pathway = "Biosynthesis of Etherlipids")
results <-  .create_reaction(substrates = list(DGO = DGO),
    template = template, reaction = "RHEA:36179")

results[[2]][1:5, "reaction_formula"]

## get PCO for further reactions
PCO <- results[[1]][["PCO"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(PCO)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Block 7: Remodeling of Etherlipids

PLA2 on PE-O

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Phospholipase A2 (PE-O)",
    reaction_formula = "M_H2O + M_PE-O = M_H+ + M_LPE-O + M_FA",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00009801 or WBGene00012319",
    reaction_pathway = "Remodeling and Degradation of Etherlipids")
results <-  .create_reaction(substrates = list(PEO = PEO),
    template = template, reaction = "peo_to_lpeo")

results[[2]][1:5, "reaction_formula"]

## get LPEO for further reactions
LPEO <- results[[1]][["sn1LPEO"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(LPEO)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Reacylation of PE-O

## template for reaction -------------------------------------------------------
template <- list(
    reaction_name = "1-alkyl-sn-glycero-3-phosphoethanolamine acyltransferase (LPE, cytosol)",
    reaction_formula = "M_AcylCoA + M_LPE-O = M_CoA + M_PE-O",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "Remodeling and Degradation of Etherlipids")
# biosynthesis of PEO ----------------------------------------------------------
results <-  .create_reaction(substrates = list(sn1LPEO = LPEO, AcylCoA = CoA_GPGL),
    template = template, reaction = "lpeo_to_peo")

results[[2]][1:5, "reaction_formula"]

## check if produced PEO are in previous list
if (all(results[[1]][["PEO"]] %in% PEO)) {

  print("all fine...")

  ## add new reactions and add lipids to data frame
  lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

PLA2 on PE-P

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Phospholipase A2 (PE-P)",
    reaction_formula = "M_H2O + M_PE-P = M_H+ + M_LPE-P + M_FA",
    reaction_RHEA = "RHEA:36195",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "Remodeling and Degradation of Etherlipids")
results <-  .create_reaction(substrates = list(PEP = PEP),
    template = template, reaction = "RHEA:36195")

results[[2]][1:5, "reaction_formula"]

## get LPEP for further reactions
LPEP <- results[[1]][["sn1LPEP"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(LPEP)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Reacylation of PE-P

## template for reaction -------------------------------------------------------
template <- list(
    reaction_name = "1-alkenyl-sn-glycero-3-phosphoethanolamine acyltransferase (LPE, cytosol)",
    reaction_formula = "M_AcylCoA + M_LPE-P = M_CoA + M_PE-P",
    reaction_RHEA = "RHEA:16245",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "Remodeling and Degradation of Etherlipids")
results <-  .create_reaction(
    substrates = list(sn1LPEP = LPEP, AcylCoA = CoA_GPGL),
    template = template, reaction = "RHEA:16245")

results[[2]][1:5, "reaction_formula"]

## check if produced PEP are in previous list
if (all(results[[1]][["PEP"]] %in% PEP)) {

  print("all fine...")

  ## add new reactions and add lipids to data frame
  lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

PLA2 on PC-O

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Phospholipase A2 (PC-O)",
    reaction_formula = "M_H2O + M_PC-O = M_H+ + M_LPC-O + M_FA",
    reaction_RHEA = "RHEA:36231",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00012319 or WBGene00010872 or WBGene00019236 or WBGene00015202 or WBGene00016288 or WBGene00044468 or WBGene00018411 or WBGene00007419 or WBGene00009404 or WBGene00015406",
    reaction_pathway = "Remodeling and Degradation of Etherlipids")
results <-  .create_reaction(substrates = list(PCO = PCO),
    template = template, reaction = "RHEA:36231")

results[[2]][1:5, "reaction_formula"]

## get LPCO for further reactions
LPCO <- results[[1]][["sn1LPCO"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(LPCO)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Remodeling of PC-O???

Degradation of LPEP

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Lysoplasmalogen ethanolamine phosphohydrolase",
    reaction_formula = "M_H2O + M_LPE-P = M_ethamp + M_H+ + M_alkenglyc",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "Remodeling and Degradation of Etherlipids")

Block X: Biosynthesis and degradation of sphingolipids

Biosynthesis of Dihydroceramides

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Sphinganine Acyl-CoA transferase",
    reaction_formula = "M_AcylCoA + M_Sphinganine = M_CoA + M_DhCer",
    reaction_RHEA = "RHEA:53424",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00006505 or WBGene00002044 or WBGene00002043",
    reaction_pathway = "Biosynthesis and degradation of sphingolipids")
results <-  .create_reaction(substrates = list(AcylCoA = CoA_SPH),
    template = template, reaction = "RHEA:53424")

results[[2]][1:5, "reaction_formula"]

## get DhCer for further reactions
DhCer <- results[[1]][["DhCer"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(DhCer)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Biosynthesis of Dihydrosphingomyelins

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Dihydrosphingomyelin synthase",
    reaction_formula = "M_Phosphocholine + M_DhCer = M_1,2-DG + M_DhSM",
    reaction_RHEA = "RHEA:44620",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00004894 or WBGene00004893 or WBGene00004892",
    reaction_pathway = "Biosynthesis and degradation of sphingolipids")
results <-  .create_reaction(substrates = list(DhCer = DhCer),
    template = template, reaction = "RHEA:44620")

results[[2]][1:5, "reaction_formula"]

## get DhSM for further reactions
DhSM <- results[[1]][["DhSM"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(DhSM)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Degradation of Dihydrosphingomyelins (DhSM)

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Dihydrosphingomyelin phosphodiesterase",
    reaction_formula = "M_H2O + M_DhSM = M_Phosphocholine + M_H+ + M_DhCer",
    reaction_RHEA = "RHEA:45300",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00000213 or WBGene00000212 or WBGene00000211",
    reaction_pathway = "Biosynthesis and degradation of sphingolipids")
results <-  .create_reaction(substrates = list(DhSM = DhSM),
    template = template, reaction = "RHEA:45300")

results[[2]][1:5, "reaction_formula"]

## check if produced DhCer are in previous list
if (all(results[[1]][["DhCer"]] %in% DhCer)) {

  print("all fine...")

  ## add new reactions and add lipids to data frame
  lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

Biosynthesis of Ceramides (Cer)

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Dihydroceramide dehydrogenase",
    reaction_formula = "M_H+ + M_NADH + M_O2 + M_DhCer = 2 M_H2O + M_NAD + M_Cer",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00017996 or WBGene00013197",
    reaction_pathway = "Biosynthesis and degradation of sphingolipids")
results <-  .create_reaction(substrates = list(DhCer = DhCer),
    template = template, reaction = "dhcer_to_cer")

results[[2]][1:5, "reaction_formula"]

## get Cer for further reactions
Cer <- results[[1]][["Cer"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(Cer)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Biosynthesis of Sphingomyelins (SM)

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Sphingomyelin synthase",
    reaction_formula = "M_Phosphocholine + M_Cer = M_1,2-DG + M_SM",
    reaction_RHEA = "RHEA:18765",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00004894 or WBGene00004893 or WBGene00004892",
    reaction_pathway = "Biosynthesis and degradation of sphingolipids")
results <-  .create_reaction(substrates = list(Cer = Cer),
    template = template, reaction = "RHEA:18765")

results[[2]][1:5, "reaction_formula"]

## get SM for further reactions
SM <- results[[1]][["SM"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(SM)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Degradation of Sphingomyelins (SM) to Ceramides (Cer)

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Sphingomyelin phosphodiesterase",
    reaction_formula = "M_H2O + M_SM = M_Phosphocholine + M_H+ + M_Cer",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00000211 or WBGene00000212 or WBGene00000213 or WBGene00012105 or WBGene00011037",
    reaction_pathway = "Biosynthesis and degradation of sphingolipids")
results <-  .create_reaction(substrates = list(SM = SM),
    template = template, reaction = "sm_to_cer")

results[[2]][1:5, "reaction_formula"]

## check if produced Cer are in previous list
if (all(results[[1]][["Cer"]] %in% Cer)) {

  print("all fine...")

  ## add new reactions and add lipids to data frame
  lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

Biosynthesis of Ceramide-1-Phosphates (CerP) from Ceramides (Cer)

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Ceramide kinase",
    reaction_formula = "M_ATP + M_Cer = M_H+ + M_ADP + M_CerP",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00020398",
    reaction_pathway = "Biosynthesis and degradation of sphingolipids")
results <-  .create_reaction(substrates = list(Cer = Cer),
    template = template, reaction = "RHEA:17929")

results[[2]][1:5, "reaction_formula"]

## get CerP for further reactions
CerP <- results[[1]][["CerP"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(CerP)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Degradation of Ceramide-1-Phosphates (CerP) to Ceramides (Cer)

gene is unknown!

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "Ceramide 1-phosphate hydrolase",
    reaction_formula = "M_H2O + M_CerP = M_Pi + M_Cer",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "Biosynthesis and degradation of sphingolipids")
results <-  .create_reaction(substrates = list(CerP = CerP),
    template = template, reaction = "cerp_to_cer")

results[[2]][1:5, "reaction_formula"]

## check if produced Cer are in previous list
if (all(results[[1]][["Cer"]] %in% Cer)) {

    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

Biosynthesis of Glucosylceramides

## template for reaction -------------------------------------------------------
template <- list(
    reaction_name = "UDP-glucose:N-acylsphingosine D-glucosyltransferase (cytosol)",
    reaction_formula = "M_UDP-Glucose + M_Cer = M_H+ + M_UDP + M_GlcCer",
    reaction_RHEA = "RHEA:12088",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00011517 or WBGene00017625 or WBGene00019127",
    reaction_pathway = "Biosynthesis and degradation of sphingolipids")
results <-  .create_reaction(substrates = list(Cer = Cer),
    template = template, reaction = "RHEA:12088")

results[[2]][1:5, "reaction_formula"]

## get GlcCer for further reactions
GlcCer <- results[[1]][["GlcCer"]]

## add new reactions and add lipids to data frame
lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
lipid_info <- rgoslin::parseLipidNames(GlcCer)
lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)

Block Y: Biosynthesis and Degradation of N-Acyl-Ethanolamines

This biosynthetic pathway is putative. Only a few enzymes have been found so far.

Biosynthesis of N-Acyl-phosphatidylethanolamine (NAPE) from PE and PC

N-acyl-phosphatidylethanolamines are produced by the transfer of an acyl group from PC to the nitrogen of PE. In C. elegans this reaction is so far not known. It is unknown if the sn1 or sn2 position is transferred. Since C. elegans contains about equal amounts of PE, PE-O and PE-P it might be possible that the acyl group is transferred to all of them producing NAPE, NAPE-O and NAPE-P.

transfer of Sn1 fatty acyl to PE

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "",
    reaction_formula = "M_PE + M_PC = M_NAPE + M_2-LPC",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "")
results <-  .create_reaction(substrates = list(PE = PE, PC = PC), 
    template = template, reaction = "pe_to_nape_sn1")

results[[2]][1:5, "reaction_formula"]

## check if produced sn2LPC are in previous list
if (all(results[[1]][["sn2LPC"]] %in% sn2LPC)) {

    print("all fine...")

    ## get NAPE for further reactions
    NAPE <- results[[1]][["NAPE"]]

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
    lipid_info <- rgoslin::parseLipidNames(NAPE)
    lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)
}

transfer of Sn1 fatty acyl to PE-O

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "",
    reaction_formula = "M_PE-O + M_PC = M_NAPEO + M_2-LPC",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "")
results <-  .create_reaction(substrates = list(PEO = PEO, PC = PC), 
    template = template, reaction = "peo_to_napeo_sn1")

results[[2]][1:5, "reaction_formula"]

## check if produced sn2LPC are in previous list
if (all(results[[1]][["sn2LPC"]] %in% sn2LPC)) {

    print("all fine...")

    ## get NAPEO for further reactions
    NAPEO <- results[[1]][["NAPEO"]]

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
    lipid_info <- rgoslin::parseLipidNames(NAPEO)
    lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)
}

transfer of Sn1 fatty acyl to PE-P

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "",
    reaction_formula = "M_PE-P + M_PC = M_alkenac2nape + M_2-LPC",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "")
results <-  .create_reaction(substrates = list(PEP = PEP, PC = PC), 
    template = template, reaction = "pep_to_napep_sn1")

results[[2]][1:5, "reaction_formula"]

## check if produced sn2LPC are in previous list
if (all(results[[1]][["sn2LPC"]] %in% sn2LPC)) {

    print("all fine...")

    ## get NAPEP for further reactions
    NAPEP <- results[[1]][["NAPEP"]]

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
    lipid_info <- rgoslin::parseLipidNames(NAPEP)
    lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)
}

transfer of Sn2 fatty acyl to PE

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "",
    reaction_formula = "M_PE + M_PC = M_NAPE + M_1-LPC",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "")
results <-  .create_reaction(substrates = list(PE = PE, PC = PC),
    template = template, reaction = "pe_to_nape_sn2")

results[[2]][1:5, "reaction_formula"]

## check if produced sn1LPC and NAPE are in previous list
if (all(results[[1]][["sn1LPC"]] %in% sn1LPC) & all(results[[1]][["NAPE"]] %in% NAPE)) {

    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

transfer of Sn2 fatty acyl to PE-O

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "",
    reaction_formula = "M_PE-O + M_PC = M_NAPEO + M_1-LPC",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "")
results <-  .create_reaction(substrates = list(PEO = PEO, PC = PC), 
    template = template, reaction = "peo_to_napeo_sn2")

results[[2]][1:5, "reaction_formula"]

## check if produced sn1LPC and NAPEO are in previous list
if (all(results[[1]][["sn1LPC"]] %in% sn1LPC) & 
        all(results[[1]][["NAPEO"]] %in% NAPEO)) {

    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

transfer of Sn2 fatty acyl to PE-P

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "",
    reaction_formula = "M_PE-P + M_PC = M_alkenac2nape + M_1-LPC",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "")
results <-  .create_reaction(substrates = list(PEP = PEP, PC = PC),
    template = template, reaction = "pep_to_napep_sn2")

results[[2]][1:5, "reaction_formula"]

## check if produced sn1LPC and NAPEP are in previous list
if (all(results[[1]][["sn1LPC"]] %in% sn1LPC) & 
        all(results[[1]][["NAPEP"]] %in% NAPEP)) {

    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

Biosynthesis of N-Acyl-ethanolamine

From NAPE

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "",
    reaction_formula = "M_NAPE + M_H2O <=> M_NAE + M_PA",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00021371 or WBGene00021370",
    reaction_pathway = "")
results <-  .create_reaction(substrates = list(NAPE = NAPE),
    template = template, reaction = "nape_to_nae")

results[[2]][1:5, "reaction_formula"]

## check if produced PA are in previous list
if (all(results[[1]][["PA"]] %in% PA)) {

    print("all fine...")

    ## get NAE for further reactions
    NAE <- results[[1]][["NAE"]]

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
    lipid_info <- rgoslin::parseLipidNames(NAE)
    lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)
}

From NAPEO

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "",
    reaction_formula = "M_NAPEO + M_H2O <=> M_NAE + M_PA-O",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00021371 or WBGene00021370",
    reaction_pathway = "")
results <-  .create_reaction(substrates = list(NAPEO = NAPEO),
    template = template, reaction = "napeo_to_nae")

results[[2]][1:5, "reaction_formula"]

## check if produced PAO and NAE are in previous list
if (all(results[[1]][["PAO"]] %in% PAO) & all(results[[1]][["NAE"]] %in% NAE)) {

    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}

From NAPEP.

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "",
    reaction_formula = "M_alkenac2nape + M_H2O <=> M_NAE + M_akac2gp",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "WBGene00021371 or WBGene00021370",
    reaction_pathway = "")

Biosynthesis of from NAPE

From NAPE.

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "",
    reaction_formula = "M_LNAPE + M_H2O <=> M_pnae + M_1,2-DG",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "")
results <-  .create_reaction(substrates = list(NAPE = NAPE),
    template = template, reaction = "nape_to_pnae")

results[[2]][1:5, "reaction_formula"]

## check if produced DG are in previous list
if (all(results[[1]][["DG"]] %in% DG)) {

    print("all fine...")

    ## get PNAE for further reactions
    PNAE <- results[[1]][["PNAE"]]

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
    lipid_info <- rgoslin::parseLipidNames(PNAE)
    lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)
}

From NAPEO

From NAPEP

Generation of N-Acyl-Ethanolamines from N-Acyl-Phosphoethanolamines

Generation of LysoNAPE from NAPE

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "",
    reaction_formula = "M_LNAPE + M_H2O <=> M_LNAPE + M_FA",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "")
results <-  .create_reaction(substrates = list(NAPE = NAPE),
    template = template, reaction = "nape_to_lnape")

results[[2]][1:5, "reaction_formula"]

## check if produced FA are in previous list
if (all(results[[1]][["FA"]] %in% FA_GPGL)) {

    print("all fine...")

    ## get LNAPE for further reactions
    LNAPE <- results[[1]][["LNAPE"]]

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
    lipid_info <- rgoslin::parseLipidNames(LNAPE)
    lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)
}

Generation of GPNAE from LysoNAPE

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "",
    reaction_formula = "M_LNAPE + M_H2O = M_gpnae + M_FA",
    reaction_RHEA = "RHEA:45420",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "")
results <-  .create_reaction(substrates = list(LNAPE = LNAPE),
    template = template, reaction = "RHEA:45420")

results[[2]][1:5, "reaction_formula"]

## check if produced FA are in previous list
if (all(results[[1]][["FA"]] %in% FA_GPGL)) {

    print("all fine...")

    ## get GPNAE for further reactions
    GPNAE <- results[[1]][["GPNAE"]]

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
    lipid_info <- rgoslin::parseLipidNames(GPNAE)
    lipid_df <- dplyr::bind_rows(lipid_df, lipid_info)
}

Generation of

Degradation of N-Acyl-Ethanolamines

## template for reaction -------------------------------------------------------
template <- list(reaction_name = "",
    reaction_formula = "M_H2O + M_NAE = M_Ethanolamine + M_H+ + M_FA",
    reaction_RHEA = "",
    reaction_isReversible = "FALSE",
    reaction_geneAssociation = "",
    reaction_pathway = "")
results <-  .create_reaction(substrates = list(NAE = NAE),
    template = template, reaction = "nae_to_fa")

results[[2]][1:5, "reaction_formula"]

## check if produced FA are in previous list
if (all(results[[1]][["FA"]] %in% FA_GPGL)) {

    print("all fine...")

    ## add new reactions and add lipids to data frame
    lipid_reactions <- rbind.data.frame(lipid_reactions, results[[2]])
}


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