boxplotExp | R Documentation |
Generate a boxplot of log-CPM expression values per sample, colored by group.
boxplotExp(x, y, palette, main, selectOrder)
x |
A DGEList object from "edgeR". |
y |
Numeric matrix of log-CPM values (genes × samples), e.g., from edgeR::cpm(). |
palette |
Character. Name of a discrete palette from the paletteer package. |
main |
Character. Title for the boxplot. |
selectOrder |
Character. Either "Groups" (order samples by group) or "Samples" (order by sample name). |
This function orders samples by group or sample name, and produces a ggplot2 boxplot with a horizontal line at the overall median.
Extract sample metadata (Samples, Groups) from "x$samples".
Order columns of y by group or sample name per "selectOrder".
Melt the ordered matrix to long format and join with metadata.
Plot boxplots with no outliers, colored by group, and include a dashed line at the overall median.
A ggplot object showing per-sample boxplots of log-CPM values.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.