This function plots the result of enrichment_lsea.

plot_enrichment_lsea(lsea_res, char, char_feature)

Arguments

lsea_res

List. A result list of lipid-set enrichment analysis from enrichment_lsea.

char

Character. A lipid characteristic selected from the common list returned by list_lipid_char.

char_feature

Character. A feature selected by users from char to visualize the specific plot for the selected category of that characteristic. For example, if char is 'class' and char_feature is 'Cer', the resulting plots will display data for 'Cer' within the 'class' category.

Value

Return a list with 1 static plot and 1 interactive plot.

  1. static_enrichPlot: a static enriched plot of the selected lipid characteristic and feature.

  2. interactive_enrichPlot: an interactive enriched plot of the selected lipid characteristic and feature.

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')
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" 
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')
lsea_one_twoGroup <- enrichment_lsea(
    deSp_se_twoGroup, char='class', rank_by='statistic', significant='pval',
    p_cutoff=0.05)
lsea_plot_twoGroup <- plot_enrichment_lsea(
    lsea_res=lsea_one_twoGroup, char='class', char_feature='TG')

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')
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" 
deSp_se_multiGroup <- deSp_multiGroup(
    processed_se_multiGroup, ref_group='ctrl', test='One-way ANOVA',
    significant='pval', p_cutoff=0.05, transform='log10')
lsea_one_multiGroup <- enrichment_lsea(
    deSp_se_multiGroup, char='class', rank_by='statistic',
    significant='pval', p_cutoff=0.05)
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
lsea_plot_multiGroup <- plot_enrichment_lsea(
    lsea_res=lsea_one_multiGroup, char='class', char_feature='Cer')