plot_voom | R Documentation |
This function visualizes the mean-variance relationship of count data after applying the voom transformation.
plot_voom( dat, design = NULL, lib.size = NULL, normalize.method = "none", span = 0.5, size = NULL, alpha = NULL, title = "Voom Plot", legend = "right", hover = FALSE, ... )
dat |
Raw count matrix, or an |
design |
Optional design matrix with rows corresponding to samples and columns to coefficients to be estimated. |
lib.size |
Numeric vector containing total library sizes for each
sample. If |
normalize.method |
Normalization method to be applied to the transformed
counts. Choices are the same as for the |
span |
Width of the LOWESS smoothing window as a proportion. |
size |
Point size. |
alpha |
Point transparency. |
title |
Optional plot title. |
legend |
Legend position. Must be one of |
hover |
Show probe name by hovering mouse over data point? If |
... |
Additional arguments to be passed to |
The voom
function from the limma
package offers a unique
approach to modeling count data. Rather than fitting negative binomial
regressions directly to genewise counts, voom
applies a log2-CPM
transformation that renders the distribution approximately normal. A
(preliminary) linear model is fit to the transformed counts, from which a
mean-variance trend is estimated using LOWESS. Observation weights are then
computed as inverse predicted residual variance. These can be applied during
a final linear model fitting stage to counteract the heteroskedasticity
inherent to count data.
The voom
function optionally plots mean log2-CPM counts against
quarter-root residual variance. This plot is similar in principle to the
output of plot_mv
, although the y-axis in that case represents
raw, not residual variance.
Law, C.W., Chen, Y., Shi, W., & Smyth, G.K. (2014). voom: precision weights unlock linear model analysis tools for RNA-seq read counts. Genome Biology, 15: R29.
voom
library(limma) mat <- matrix(rnbinom(1000 * 10, mu = 5, size = 5)) grp <- rep(c("ctl", "trt"), each = 5) des <- model.matrix(~ grp) plot_voom(mat, design = des)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.