plot_boxplots {autonomics}R Documentation

Plot sample/feature boxplots

Description

Plot sample/feature boxplots

Usage

plot_boxplots(
  object,
  x,
  fill,
  color = NULL,
  facet = NULL,
  highlight = NULL,
  fixed = list(na.rm = TRUE)
)

plot_sample_boxplots(
  object,
  x = sample_id,
  fill = sample_id,
  color = NULL,
  highlight = NULL,
  fixed = list(na.rm = TRUE)
)

plot_feature_boxplots(
  object,
  x = feature_id,
  fill = feature_id,
  color = NULL,
  highlight = NULL,
  fixed = list(na.rm = TRUE)
)

plot_subgroup_boxplots(
  object,
  subgroup,
  x = !!enquo(subgroup),
  fill = !!enquo(subgroup),
  color = NULL,
  highlight = NULL,
  facet = feature_id,
  fixed = list(na.rm = TRUE)
)

Arguments

object

SummarizedExperiment

x

svar mapped to x

fill

svar mapped to fill

color

svar mapped to color

facet

svar mapped to facet

highlight

fvar expressing which feature should be highlighted

fixed

fixed aesthetics

subgroup

subgroup svar symbol

Value

ggplot object

See Also

plot_sample_densities, plot_sample_violins

Examples

# data
    require(magrittr)
    file <- download_data('halama18.metabolon.xlsx')
    object <- read_metabolon(file, plot = FALSE)
    object %<>% extract(, order(.$Group))
    fdata(object) %<>% cbind(
                        control=.$feature_name %in% c('biotin','phosphate'))
# plot
    plot_boxplots(object[1:9,], x = feature_id, fill = feature_id)
    plot_boxplots(object[,1:9], x = sample_id,  fill = sample_id )
    plot_feature_boxplots(object[1:9, ])
    plot_sample_boxplots(object[, 1:12])
    plot_sample_boxplots(object[, 1:12], highlight = control)
    plot_subgroup_boxplots(object[1:2, ], subgroup = Group)

[Package autonomics version 1.1.7 Index]