Generate barplots for each feature and perform ANOVA
AnovaBarPlot.RdThis 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,
save_output = TRUE,
width = 6,
height = 6,
colors = NULL,
posthoc = 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)
- save_output
A logical value indicating whether to save the output plot (default: TRUE)
- width
The width of the output plot in inches (default: 6)
- height
The height of the output plot in inches (default: 6)
- colors
A vector of colors for the groups (default: NULL)
- posthoc
A character string indicating the post-hoc test to perform (default: NULL)