ggplot_boxplot | R Documentation |
A simple function using ggplot2
to make a sample boxplot
ggplot_boxplot(
plotmatrices,
experiment,
colorby = NULL,
palette = NULL,
expressiontype = "expression",
whisker_distance = 1.5,
base_size = 11,
palette_name = "Set1",
annotate_samples = FALSE,
should_transform = NULL
)
plotmatrices |
Expression/ other data matrix, or named list thereof |
experiment |
Annotation for the columns of plotmatrix |
colorby |
Column name in |
palette |
Palette of colors, one for each unique value derived from
|
expressiontype |
Expression type for use in y axis label |
whisker_distance |
Passed to |
base_size |
Passed to ggplot's |
palette_name |
Valid R color palette name |
annotate_samples |
Add a suffix to sample labels reflecting their group? |
should_transform |
A boolean indicating if the log2 transformation should be applied. If TRUE, log2 transformation is applied unconditionally. If FALSE, no transformation is applied. If NULL, a conditional transformation based on threshold is applied. |
output A ggplot
output
require(airway)
data(airway, package = "airway")
ggplot_boxplot(assays(airway)[[1]], data.frame(colData(airway)), colorby = "dex")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.