Lipid set enrichment analysis (LSEA)

  de.results, = c("logFC", "P.Value", "adj.P.Val"),
  min_size = 2,

significant_lipidsets(enrich.results, p.cutoff = 0.05, size.cutoff = 2)

plot_class_enrichment(de.results, significant.sets, measure = "logFC")



Output of de_analysis().

Statistic used to rank the lipid list. Default is logFC.


Minimum number of molecules in a set to be included in enrichment.


Extra parameters passed to fgsea::fgsea().


Output of lsea().


Significance threshold. Default is 0.05.


Minimum number of lipids in a set tested for enrichment. Default is 2.


List of significantly changed lipid sets (output of significant_lipidsets()).


Which measure to plot the distribution of: logFC, P.Value, Adj.P.Val. Default is logFC.


lsea returns enrichment results (data.frame) as returned from fgsea::fgsea(). The results also contain the following attributes:

  • de.results Original de.results input.

  • Measure used to rank lipid molecules.

  • sets Lipid sets tested, with their member molecules.

significant_lipidsets returns a list of character vectors of significantly enriched sets for each contrast.

plot_class_enrichment returns a ggplot object.


  • significant_lipidsets: gets a list of significantly changed lipid sets

  • plot_class_enrichment: is usually used to look at log2 fold change distribution of lipids in each class, marking significantly enriched classes. Can also be used to plot P.Value or Adj.P.Val.


data(data_normalized) de_results <- de_analysis( data_normalized, HighFat_water - NormalDiet_water, measure = "Area" ) enrich_results <- lsea( de_results, = "logFC", min_size = 4, nperm = 1000 )
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (5.78% of the list). #> The order of those tied genes will be arbitrary, which may produce unexpected results.
sig_lipidsets <- significant_lipidsets(enrich_results) plot_class_enrichment(de_results, sig_lipidsets)