This function conducts Lipid Set Enrichment Analysis (LSEA), a computational method for determining whether a predefined set of lipids shows statistically significant, concordant differences among two or multiple biological states (e.g., phenotypes).
The resulting SummarizedExperiment object from the differential
expression analysis function, such as deSp_twoGroup
and
deSp_multiGroup
.
Character/NULL. A lipid characteristic selected from the common list
returned by list_lipid_char
. Enter NULL to plot all characteristics.
Character. The method to rank lipids. Allowed rankings include
"log2FC," "pval," "padj," and "statistic". "log2FC" is only permitted for two-group data.
Default is 'statistic'
.
Character. The p-value to be used for the statistically
significant. Must be one of "pval" or "padj". Default is 'pval'
.
Numeric. The threshold to distinguish enriched lipid-sets
from not-enriched ones. Default is 0.05
.
Numeric. The minimum number of lipids in a lipid set to be
included in enrichment. Default is 2
.
Return a list of enrichment result, 1 interactive plot, 1 static plot, 1 table, and 2 lists.
enrich_result: a table of enrichment result.
static_barPlot: a static bar plot with the top 10 significant up-regulated and down-regulated terms for datasets involving two groups and the top 20 for multiple groups.
interactive_barPlot: an interactive bar plot with the top 10 significant up-regulated and down-regulated terms for datasets involving two groups and the top 20 for multiple groups.
table_barPlot: table for plotting bar plots.
lipid_set: a list of lipid set.
ranked_list: lipid ranking list.
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')
lsea_all_twoGroup <- enrichment_lsea(
deSp_se_twoGroup, char=NULL, rank_by='statistic', 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"
lsea_one_twoGroup <- enrichment_lsea(
deSp_se_twoGroup, char='class', rank_by='statistic', 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')
lsea_all_multiGroup <- enrichment_lsea(
deSp_se_multiGroup, char=NULL, 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".
#> Warning: There were 3 pathways for which P-values were not calculated properly due to unbalanced (positive and negative) gene-level statistic values. For such pathways pval, padj, NES, log2err are set to NA. You can try to increase the value of the argument nPermSimple (for example set it nPermSimple = 50000)
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"
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".