Last chance! 50% off unlimited learning
Sale ends in
"plotMA"(object, array = 1, xlab = "Average log-expression", ylab = "Expression log-ratio (this sample vs others)", main = colnames(object)[array], status=NULL, ...)
"plotMA"(object, array = 1, xlab = "Average log-expression", ylab = "Expression log-ratio (this sample vs others)", main = colnames(object)[array], status=object$genes$Status, zero.weights = FALSE, ...)
"plotMA"(object, array = 1, xlab = "A", ylab = "M", main = colnames(object)[array], status=object$genes$Status, zero.weights = FALSE, ...)
"plotMA"(object, array = 1, xlab = "A", ylab = "M", main = colnames(object)[array], status=object$genes$Status, zero.weights = FALSE, ...)
"plotMA"(object, coef = ncol(object), xlab = "Average log-expression", ylab = "log-fold-change", main = colnames(object)[coef], status=object$genes$Status, zero.weights = FALSE, ...)
RGList
, MAList
, EList
, ExpressionSet
or MArrayLM
object.
Alternatively a numeric matrix
.object
.
If NULL
, then all points are plotted in the default color, symbol and size.plotWithHighlights
.For two color data objects, a within-array MA-plot is produced with the M and A values computed from the two channels for the specified array.
This is the same as a mean-difference plot (mdplot
) with the red and green log2-intensities of the array providing the two columns.
For single channel data objects, a between-array MA-plot is produced. An artificial array is produced by averaging all the arrays other than the array specified. A mean-difference plot is then producing from the specified array and the artificial array. Note that this procedure reduces to an ordinary mean-difference plot when there are just two arrays total.
If object
is an MArrayLM
object, then the plot is an fitted model MA-plot in which the estimated coefficient is on the y-axis and the average A-value is on the x-axis.
The status
vector can correspond to any grouping of the probes that is of interest.
If object
is a fitted model object, then status
vector is often used to indicate statistically significance, so that differentially expressed points are highlighted.
If object
is a microarray data object, then status
might distinguish control probes from regular probes so that different types of controls are highlighted.
The status
can be included as the component object$genes$Status
instead of being passed as an argument to plotMA
.
See plotWithHighlights
for how to set colors and graphics parameters for the highlighted and non-highlighted points.
plotMA
is plotWithHighlights
.An overview of plot functions available in LIMMA is given in 09.Diagnostics.
A <- runif(1000,4,16)
y <- A + matrix(rnorm(1000*3,sd=0.2),1000,3)
status <- rep(c(0,-1,1),c(950,40,10))
y[,1] <- y[,1] + status
plotMA(y, array=1, status=status, values=c(-1,1), hl.col=c("blue","red"))
MA <- new("MAList")
MA$A <- runif(300,4,16)
MA$M <- rt(300,df=3)
# Spike-in values
MA$M[1:3] <- 0
MA$M[4:6] <- 3
MA$M[7:9] <- -3
status <- rep("Gene",300)
status[1:3] <- "M=0"
status[4:6] <- "M=3"
status[7:9] <- "M=-3"
values <- c("M=0","M=3","M=-3")
col <- c("blue","red","green")
plotMA(MA,main="MA-Plot with 12 spiked-in points",
status=status, values=values, hl.col=col)
# Same as above but setting graphical parameters as attributes
attr(status,"values") <- values
attr(status,"col") <- col
plotMA(MA, main="MA-Plot with 12 spiked-in points", status=status)
# Same as above but passing status as part of object
MA$genes$Status <- status
plotMA(MA, main="MA-Plot with 12 spiked-in points")
# Change settings for background points
MA$genes$Status <- status
plotMA(MA, bg.pch=1, bg.cex=0.5)
Run the code above in your browser using DataLab