plot_boxplot {omu}R Documentation

Create a box plot

Description

Takes a metabolomics count data frame and creates boxplots. It is recommended to either subset, truncate, or agglomerate by hierarchical metadata.

Usage

plot_boxplot(
  count_data,
  metadata,
  aggregate_by,
  log_transform = FALSE,
  Factor,
  response_variable = "Metabolite",
  fill_list
)

Arguments

count_data

A metabolomics count data frame, either from read_metabo or omu_summary

metadata

The descriptive meta data for the samples

aggregate_by

Hierarchical metadata value to sum metabolite values by, i.e. "Class"

log_transform

TRUE or FALSE. Recommended for visualization purposes. If true data is transformed by the natural log

Factor

The column name for the experimental variable

response_variable

The response variable for the data, i.e. "Metabolite"

fill_list

Colors for the plot which is colored by Factor, in the form of c("")

Examples

c57_nos2KO_mouse_countDF <- c57_nos2KO_mouse_countDF[1:5,]
c57_nos2KO_mouse_countDF <- assign_hierarchy(c57_nos2KO_mouse_countDF, TRUE, "KEGG")

plot_boxplot(count_data = c57_nos2KO_mouse_countDF, metadata = c57_nos2KO_mouse_metadata,
log_transform = TRUE, Factor = "Treatment", response_variable = "Metabolite",
aggregate_by = "Subclass_2", fill_list = c("darkgoldenrod1", "dodgerblue2"))

[Package omu version 1.1.2 Index]