Generate a boxplot of log-CPM expression values per sample, colored by group.
boxplotExp(x, y, palette, main, selectOrder)
A ggplot object showing per-sample boxplots of log-CPM values.
A DGEList object from "edgeR".
Numeric matrix of log-CPM values (genes × samples), e.g., from edgeR::cpm().
Character. Name of a discrete palette from the paletteer package.
Character. Title for the boxplot.
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.