plot_boxplot: Make a ggplot boxplot of a set of samples.

View source: R/plot_distribution.R

plot_boxplotR Documentation

Make a ggplot boxplot of a set of samples.

Description

Boxplots and density plots provide complementary views of data distributions. The general idea is that if the box for one sample is significantly shifted from the others, then it is likely an outlier in the same way a density plot shifted is an outlier.

Usage

plot_boxplot(
  data,
  colors = NULL,
  plot_title = NULL,
  order = NULL,
  violin = FALSE,
  scale = NULL,
  expt_names = NULL,
  label_chars = 10,
  ...
)

Arguments

data

Expt or data frame set of samples.

colors

Color scheme, if not provided will make its own.

plot_title

A title!

order

Set the order of boxen.

violin

Print this as a violin rather than a just box/whiskers?

scale

Whether to log scale the y-axis.

expt_names

Another version of the sample names for printing.

label_chars

Maximum number of characters for abbreviating sample names.

...

More parameters are more fun!

Value

Ggplot2 boxplot of the samples. Each boxplot contains the following information: a centered line describing the median value of counts of all genes in the sample, a box around the line describing the inner-quartiles around the median (quartiles 2 and 3 for those who are counting), a vertical line above/below the box which shows 1.5x the inner quartile range (a common metric of the non-outliers), and single dots for each gene which is outside that range. A single dot is transparent.

See Also

[ggplot2]

Examples

## Not run: 
 a_boxplot <- plot_boxplot(expt)
 a_boxplot  ## ooo pretty boxplot look at the lines

## End(Not run)

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.