This function plots an abundance box plot between multiple groups for a user-selected feature (lipid).

boxPlot_feature_multiGroup(
  processed_se,
  feature,
  ref_group,
  test = c("One-way ANOVA", "Kruskal–Wallis test"),
  post_hoc_sig = c("pval", "padj"),
  transform = c("none", "log10", "square", "cube")
)

Arguments

processed_se

A SummarizedExperiment object constructed by as_summarized_experiment and processed by data_process.

feature

Character. A feature (lipid) for plotting. It must be one of the lipids in the lipid abundance data.

ref_group

Character. Group name of the reference group. It must be one of the group names in the group information table's group column.

test

Character. The method for comparing means. Allowed method include "One-way ANOVA" and "Kruskal–Wallis test". Default is 'One-way ANOVA'.

post_hoc_sig

Character. The p-value to be used for to determine significance, which is only applicable for the post hoc test after the Kruskal-Wallis test. Must be one of "padj" (adjusted p-value) or "pval" (p-value). Default is 'pval'. ##One-way ANOVA只能是padj, Kruskal-Wallis test可以是pval or padj

transform

Character. Method for data transformation. Allowed methods include "none", "log10", "square", and "cube". Select 'none' to skip data transformation. Default is 'log10'.

Value

Return a list of a box plot and a table.

  1. static_boxPlot: abundance box plot of the selected feature.

  2. table_boxplot: table for plotting.

  3. table_stat: statistical table.

Examples

data("se_multiGroup")
processed_se <- data_process(
    se=se_multiGroup, exclude_missing=TRUE, exclude_missing_pct=70,
    replace_na_method='min', replace_na_method_ref=0.5,
    normalization='Percentage')
boxPlot_result <- boxPlot_feature_multiGroup(
    processed_se, feature='PE O- 17:0;0_20:3;0', ref_group='ctrl',
    test='One-way ANOVA', post_hoc_sig='padj', transform='log10')