This function conducts Over-Representation Analysis (ORA) to determine whether significant lipid species are enriched in specific lipid class categories.

enrichment_ora(
  deSp_se,
  char = NULL,
  significant = c("pval", "padj"),
  p_cutoff = 0.05
)

Arguments

deSp_se

The resulting SummarizedExperiment object from the differential expression analysis function, such as deSp_twoGroup and deSp_multiGroup.

char

Character. A lipid characteristic selected from the common list returned by list_lipid_char. Enter NULL to plot all characteristics.

significant

Character. The p-value to be used for the statistically significant. Must be one of "pval" or "padj". Default is 'pval'.

p_cutoff

Numeric. The threshold to distinguish enriched lipid-sets from not-enriched ones. Default is 0.05.

Value

Return a list of enrichment result, 1 interactive plot, 1 static plot, and 1 table.

  1. enrich_result: a table of enrichment result.

  2. static_barPlot: a static bar plot that classifies significant lipid species into 'up-regulated' or 'down-regulated' categories.

  3. interactive_barPlot: an interactive bar plot that classifies significant lipid species into 'up-regulated' or 'down-regulated' categories.

  4. table_barPlot: table for plotting bar plots.

Examples

data("de_data_twoGroup")
processed_se_twoGroup <- data_process(
    se=de_data_twoGroup, exclude_missing=TRUE, exclude_missing_pct=70,
    replace_na_method='min', replace_na_method_ref=0.5,
    normalization='Percentage')
deSp_se_twoGroup <- deSp_twoGroup(
    processed_se_twoGroup, ref_group='ctrl', test='t-test',
    significant='pval', p_cutoff=0.05, FC_cutoff=1, transform='log10')
ora_all_twoGroup <- enrichment_ora(
    deSp_se_twoGroup, char=NULL, significant='pval', p_cutoff=0.05)
char_list <- list_lipid_char(processed_se_twoGroup)$common_list
#> There are 4 ratio characteristics that can be converted in your dataset.
print(char_list)
#>            Lipid classification            Lipid classification 
#>                      "Category"                    "Main.Class" 
#>            Lipid classification            Lipid classification 
#>                     "Sub.Class"                         "class" 
#>           Fatty acid properties           Fatty acid properties 
#>                            "FA"                          "FA.C" 
#>           Fatty acid properties           Fatty acid properties 
#>     "FA.Chain.Length.Category1"     "FA.Chain.Length.Category2" 
#>           Fatty acid properties           Fatty acid properties 
#>     "FA.Chain.Length.Category3"                         "FA.DB" 
#>           Fatty acid properties           Fatty acid properties 
#>                         "FA.OH"     "FA.Unsaturation.Category1" 
#>           Fatty acid properties           Fatty acid properties 
#>     "FA.Unsaturation.Category2"                       "Total.C" 
#>           Fatty acid properties           Fatty acid properties 
#>                      "Total.DB"                      "Total.FA" 
#>           Fatty acid properties Physical or chemical properties 
#>                      "Total.OH"             "Bilayer.Thickness" 
#> Physical or chemical properties Physical or chemical properties 
#>                     "Bond.type"              "Headgroup.Charge" 
#> Physical or chemical properties Physical or chemical properties 
#>           "Intrinsic.Curvature"             "Lateral.Diffusion" 
#> Physical or chemical properties              Cellular component 
#>        "Transition.Temperature"            "Cellular.Component" 
#>                        Function 
#>                      "Function" 
ora_one_twoGroup <- enrichment_ora(
    deSp_se_twoGroup, char='class', significant='pval', p_cutoff=0.05)

data("se_multiGroup")
processed_se_multiGroup <- data_process(
    se=se_multiGroup, exclude_missing=TRUE, exclude_missing_pct=70,
    replace_na_method='min', replace_na_method_ref=0.5,
    normalization='Percentage')
deSp_se_multiGroup <- deSp_multiGroup(
    processed_se_multiGroup, ref_group='ctrl', test='One-way ANOVA',
    significant='pval', p_cutoff=0.05, transform='log10')
ora_all_multiGroup <- enrichment_ora(
    deSp_se_multiGroup, char=NULL, significant='pval', p_cutoff=0.05)
char_list <- list_lipid_char(processed_se_multiGroup)$common_list
#> Warning: longer object length is not a multiple of shorter object length
#> There are 4 ratio characteristics that can be converted in your dataset.
print(char_list)
#>            Lipid classification            Lipid classification 
#>                      "Category"                    "Main.Class" 
#>            Lipid classification            Lipid classification 
#>                     "Sub.Class"                         "class" 
#>           Fatty acid properties           Fatty acid properties 
#>                            "FA"                          "FA.C" 
#>           Fatty acid properties           Fatty acid properties 
#>     "FA.Chain.Length.Category1"     "FA.Chain.Length.Category2" 
#>           Fatty acid properties           Fatty acid properties 
#>     "FA.Chain.Length.Category3"                         "FA.DB" 
#>           Fatty acid properties           Fatty acid properties 
#>                         "FA.OH"     "FA.Unsaturation.Category1" 
#>           Fatty acid properties           Fatty acid properties 
#>     "FA.Unsaturation.Category2"                       "Total.C" 
#>           Fatty acid properties           Fatty acid properties 
#>                      "Total.DB"                      "Total.FA" 
#>           Fatty acid properties Physical or chemical properties 
#>                      "Total.OH"             "Bilayer.Thickness" 
#> Physical or chemical properties Physical or chemical properties 
#>                     "Bond.type"              "Headgroup.Charge" 
#> Physical or chemical properties Physical or chemical properties 
#>           "Intrinsic.Curvature"             "Lateral.Diffusion" 
#> Physical or chemical properties              Cellular component 
#>        "Transition.Temperature"            "Cellular.Component" 
#>                        Function 
#>                      "Function" 
ora_one_multiGroup <- enrichment_ora(
    deSp_se_multiGroup, char='class', significant='pval', p_cutoff=0.05)