Skip to contents

This function generates bar plots for a specified feature across different groups in the metadata, performing ANOVA and Tukey's HSD test for post-hoc analysis.

Usage

AnovaBarPlot(
  mmo,
  ID_list,
  outdir,
  normalization = "None",
  filter_group = FALSE,
  group_list = NULL
)

Arguments

mmo

The mmo object containing metadata and feature data

ID_list

A list of feature IDs to analyze. Use FeatureToID() to convert feature names to IDs.

outdir

The output directory to save the bar plots and ANOVA results

normalization

The normalization method to use for feature data. Options are 'None', 'Log', 'Meancentered', or 'Z' (default: 'None')

filter_group

A boolean indicating whether to filter the feature values by a specific group list (default: FALSE)

group_list

A list of groups to filter the feature values by, if filter_group is TRUE (default: NULL)

Examples

if (FALSE) {
AnovaBarPlot(mmo, ID_list = c("ID_1", "ID_2"), outdir = "output_directory", normalization = 'Z')
AnovaBarPlot(
 mmo, ID_list = c("ID_1", "ID_2"), outdir = "output_directory", normalization = 'Z', 
 filter_group = TRUE, group_list = c("Group1", "Group2")
)
}