1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plots.R
\docType{methods}
\name{plotMA}
\alias{plotMA}
\alias{plotMA,DESeqDataSet-method}
\alias{plotMA,DESeqResults-method}
\title{MA-plot from base means and log fold changes}
\usage{
\S4method{plotMA}{DESeqDataSet}(
object,
alpha = 0.1,
main = "",
xlab = "mean of normalized counts",
ylim,
colNonSig = "gray60",
colSig = "blue",
colLine = "grey40",
returnData = FALSE,
MLE = FALSE,
...
)
\S4method{plotMA}{DESeqResults}(
object,
alpha,
main = "",
xlab = "mean of normalized counts",
ylim,
colNonSig = "gray60",
colSig = "blue",
colLine = "grey40",
returnData = FALSE,
MLE = FALSE,
...
)
}
\arguments{
\item{object}{a \code{DESeqResults} object produced by \code{\link{results}};
or a \code{DESeqDataSet} processed by \code{\link{DESeq}}, or the
individual functions \code{\link{nbinomWaldTest}} or \code{\link{nbinomLRT}}}
\item{alpha}{the significance level for thresholding adjusted p-values}
\item{main}{optional title for the plot}
\item{xlab}{optional defaults to "mean of normalized counts"}
\item{ylim}{optional y limits}
\item{colNonSig}{color to use for non-significant data points}
\item{colSig}{color to use for significant data points}
\item{colLine}{color to use for the horizontal (y=0) line}
\item{returnData}{logical, whether to return the data.frame used for plotting}
\item{MLE}{if \code{betaPrior=TRUE} was used,
whether to plot the MLE (unshrunken estimates), defaults to FALSE.
Requires that \code{\link{results}} was run with \code{addMLE=TRUE}.
Note that the MLE will be plotted regardless of this argument,
if DESeq() was run with \code{betaPrior=FALSE}. See \code{\link{lfcShrink}}
for examples on how to plot shrunken log2 fold changes.}
\item{...}{further arguments passed to \code{plotMA} if object
is \code{DESeqResults} or to \code{\link{results}} if object is
\code{DESeqDataSet}}
}
\description{
A simple helper function that makes a so-called "MA-plot", i.e. a
scatter plot of log2 fold changes (on the y-axis) versus the mean of
normalized counts (on the x-axis).
}
\details{
This function is essentially two lines of code: building a
\code{data.frame} and passing this to the \code{plotMA} method
for \code{data.frame}, now copied from the geneplotter package.
The code was modified in version 1.28 to change from red to blue points
for better visibility for users with color-blindness. The original plots
can still be made via the use of \code{returnData=TRUE} and passing the
resulting data.frame directly to \code{geneplotter::plotMA}.
The code of this function can be seen with:
\code{getMethod("plotMA","DESeqDataSet")}
If the \code{object} contains a column \code{svalue} then these
will be used for coloring the points (with a default \code{alpha=0.005}).
}
\examples{
dds <- makeExampleDESeqDataSet()
dds <- DESeq(dds)
plotMA(dds)
res <- results(dds)
plotMA(res)
}
\author{
Michael Love
}
|