plot_sample_boxplots: Plot a boxplot for each sample

View source: R/qc_visualizations.R

plot_sample_boxplotsR Documentation

Plot a boxplot for each sample

Description

Plots a boxplot of the distribution of the metabolite values for each sample. The boxplots can be ordered and filled by any combination of columns in the pheno data. By default, order and fill are both determined by the combination of group and time columns.

Usage

plot_sample_boxplots(
  object,
  all_features = FALSE,
  order_by = as.character(na.omit(c(group_col(object), time_col(object)))),
  fill_by = as.character(na.omit(c(group_col(object), time_col(object)))),
  title = "Boxplot of samples",
  subtitle = NULL,
  fill_scale = getOption("notame.fill_scale_dis"),
  zoom_boxplot = TRUE
)

Arguments

object

a MetaboSet object

all_features

logical, should all features be used? If FALSE (the default), flagged features are removed before visualization.

order_by

character vector, names of columns used to order the samples

fill_by

character vector, names of columns used to fill the boxplots

title, subtitle

character, title and subtitle of the plot

fill_scale

a scale for the fill of the boxplots, as returned by a ggplot function

zoom_boxplot

logical, whether outliers should be left outside the plot and only the boxplots shown. Defaults to TRUE.

Value

a ggplot object

Examples

plot_sample_boxplots(merged_sample, order_by = "Group", fill_by = "Group")


antonvsdata/notame documentation built on Sept. 14, 2024, 11:09 p.m.