plotMA {limma} | R Documentation |
Creates an MA-plot with color coding for control spots.
plotMA(MA, array=1, xlab="A", ylab="M", main=colnames(MA$M)[array], xlim, ylim, status, values, pch, col, cex, legend=TRUE, ...)
MA |
an MAList or RGList object, or any list with components M containing log-ratios and A containing average intensities |
array |
integer giving the array to be plotted. Corresponds to columns of M and A . |
xlab |
character string giving label for x-axis |
ylab |
character string giving label for y-axis |
main |
character string giving title for plot |
xlim |
numeric vector of length 2 giving limits for x-axis, defaults to min and max of the data |
ylim |
numeric vector of length 2 giving limits for y-axis, defaults to min and max of the data |
status |
character vector giving the control status of each spot on the array, of same length as the number of rows of MA$M .
If omitted, all points are plotted in the default color, symbol and size. |
values |
character vector giving values of status to be highlighted on the plot. Defaults to unique values of status .
Ignored if there is no status vector. |
pch |
vector or list of plotting characters. Default to integer code 16.
Ignored is there is no status vector. |
col |
numeric or character vector of colors, of the same length as values . Defaults to 1:length(values) .
Ignored if there is no status vector. |
cex |
numeric vector of plot symbol expansions, of the the same length as values .
Defaults to 0.2 for the most common status value and 1 for the others.
Ignored if there is no status vector. |
legend |
logical, should a legend of plotting symbols and colors be included. Ignored if there is no status vector. |
... |
any other arguments are passed to plot |
The status
vector is intended to specify the control status of each spot, for example "gene", "ratio control", "house keeping gene", "buffer" and so on.
The vector is usually computed using the function controlStatus
and a spot-types file.
However the function may be used to highlight any subset of spots.
The status
can be included as the component MA$genes$Status
instead of being passed as an argument to plotMA
.
The arguments values
, pch
, col
and cex
can be included as attributes to status
instead of being passed as arguments to plotMA
.
See points
for possible values for pch
, col
and cex
.
A plot is created on the current graphics device.
Gordon Smyth
An overview of diagnostic functions available in LIMMA is given in 7.Diagnostics.
MA <- new("MAList") MA$A <- runif(300,4,16) MA$M <- rt(300,df=3) status <- rep("Gene",300) status[1:3] <- "M=0" MA$M[1:3] <- 0 status[4:6] <- "M=3" MA$M[4:6] <- 3 status[7:9] <- "M=-3" MA$M[7:9] <- -3 plotMA(MA,main="MA-Plot with Simulated Data",status=status,values=c("M=0","M=3","M=-3"),col=c("blue","red","green")) # Same as above attr(status,"values") <- c("M=0","M=3","M=-3") attr(status,"col") <- c("blue","red","green") plotMA(MA,main="MA-Plot with Simulated Data",status=status) # Same as above MA$genes$Status <- status plotMA(MA,main="MA-Plot with Simulated Data")