plot_md | R Documentation |
This function plots probewise means vs. log2 fold changes for a test of differential expression or between-sample comparison.
plot_md(dat, title = "Mean-Difference Plot", legend = "right", ...) ## S3 method for class 'DGEList' plot_md( dat, design = NULL, sample = 1L, ctrls = NULL, lfc = NULL, size = NULL, alpha = NULL, title = "Mean-Difference Plot", xlab = NULL, legend = "right", hover = FALSE ) ## S3 method for class 'DESeqDataSet' plot_md( dat, sample = 1L, ctrls = NULL, lfc = NULL, size = NULL, alpha = NULL, title = "Mean-Difference Plot", xlab = NULL, legend = "right", hover = FALSE ) ## S3 method for class 'DESeqTransform' plot_md( dat, sample = 1L, ctrls = NULL, lfc = NULL, size = NULL, alpha = NULL, title = "Mean-Difference Plot", xlab = NULL, legend = "right", hover = FALSE ) ## S3 method for class 'DESeqResults' plot_md( dat, fdr = 0.05, lfc = NULL, size = NULL, alpha = NULL, title = "Mean-Difference Plot", xlab = NULL, legend = "right", hover = FALSE ) ## S3 method for class 'TopTags' plot_md( dat, fdr = 0.05, lfc = NULL, size = NULL, alpha = NULL, title = "Mean-Difference Plot", xlab = NULL, legend = "right", hover = FALSE ) ## S3 method for class 'data.frame' plot_md( dat, probes = NULL, fdr = 0.05, lfc = NULL, size = NULL, alpha = NULL, title = "Mean-Difference Plot", xlab = NULL, legend = "right", hover = FALSE ) ## Default S3 method: plot_md( dat, sample = 1L, ctrls = NULL, lfc = NULL, size = NULL, alpha = NULL, title = "Mean-Difference Plot", xlab = NULL, legend = "right", hover = FALSE )
dat |
Either a data frame representing the results of a test for differential expression, or a probe by sample omic data matrix. The former will render a study-wide MD plot, the latter a between-sample MD plot. Suitable objects from familiar packages are also acceptable. See Details. |
title |
Optional plot title. |
legend |
Legend position. Must be one of |
design |
Optional design matrix with rows corresponding to samples and
columns to coefficients to be estimated. Only relevant for |
sample |
Column number or name specifying which sample in |
ctrls |
Optional vector of length equal to |
lfc |
Optional effect size threshold for declaring a probe differentially expressed. Only relevant for study-wide MD plots. |
size |
Point size. |
alpha |
Point transparency. |
xlab |
Optional label for x-axis. |
hover |
Show probe name by hovering mouse over data point? If |
fdr |
Optional significance threshold for declaring a probe differentially expressed. Only relevant for study-wide MD plots. |
probes |
Optional column number or name specifying where probe names are
stored, presuming they are not stored in |
MD plots (also known as "Bland-Altman plots" or "MA plots") visualize the relationship between a probe's mean value and its log2 fold change versus some relevant reference group. These figures help to evaluate the symmetry, magnitude, and significance of differential effects across the full omic range.
If dat
summarizes the results of a test for differential expression,
then each point's x-coordinate correponds to its average expression across
all samples, while y-coordinates represent the log2 fold change for the given
contrast. Points are colored to distinguish between those that do and do not
meet a user-defined FDR threshold. plot_md
accepts output from
limma::topTable
, edgeR::topTags
, or
DESeq2::results
. Alternatively, any object with columns
for log fold changes, probewise means, and FDR is acceptable.
If dat
is probe by sample matrix or matrix-like object, then
sample
must be specified. An artificial array is created by averaging
probewise values for all other samples in the data. The figure will then
represent the mean vs. the difference of expression values for the specified
sample vs. the artificial array. Acceptable inputs for between-sample MD
plots include all limma
expression set objects, as well as
DGEList
, DESeqDataSet
, and
DESeqTransform
objects.
Bolstad, B.M., Irizarry, R.A., Åstrand, M. & Speed, T.P. (2003). A comparison of normalization methods for high density oligonucleotide array data based on variance and bias. Bioinformatics, 19(2): 185–193.
Dudoit, S., Yang, Y.H., Callow, M.J. & Speed, T.P. (2002). Statistical methods for identifying differentially expressed genes in replicated cDNA microarray experiments. Stat. Sin., 12, 111–140.
Martin, B.J. & Altman, D.G. (1986). Statistical methods for assessing agreement between two methods of clinical measurement. The Lancet, 327(8476): 307–310.
Ritchie, M.E., Phipson, B., Wu, D., Hu, Y., Law, C.W., Shi, W., & Smyth, G.K. (2015). limma powers differential expression analyses for RNA-sequencing and microarray studies. Nucleic Acids Res., 43(7): e47.
plotMD
, plotMA
,
glMDPlot
library(DESeq2) dds <- makeExampleDESeqDataSet() # Between-sample MD plot rld <- rlog(dds) plot_md(rld) # Study-wide MD plot dds <- DESeq(dds) res <- results(dds) plot_md(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.