plotPlate {prada} | R Documentation |
Plot a well statistic in false color representation. The plot is supposed to resemble the physical geometry of a microtitre plate.
plotPlate(x, nrow = 8, ncol = 12, ind = 1:(ncol*nrow), main, xrange, col, device, file, width, na.action = "zero", desc = as.character(c(NA, NA)), char)
x |
Numeric vector of length ncol*nrow (except if argument
ind is specified). |
nrow |
Numeric of length 1. The number of rows of the plate. |
ncol |
Numeric of length 1. The number of columns of the plate. |
ind |
Optional integer vector of equal length as x . It
indicates the position of the respective value of
x on the plate. Can be used to adress the problem of missing
values. Each well that is not allocated a value of x by
ind will not be plotted. |
main |
Character of length 1. Plot title. This arguments gets passed
on to text as the argument labels . |
xrange |
Range of x that is mapped into the color scale. |
col |
Character vector. Usually the names of two or three colors
between which the color map is interpolated, using the function
colorRampPalette . |
device |
Character. Name of a valid graphics device,
e.g. x11 , png , pdf . |
file |
The file argument of the call to
device , i.e. the name of the graphics output file. |
width |
The width argument of the call to
device , i.e. the width of the graphic. |
na.action |
Character. One of "zero" "omit" or
"xout" .
How should the wells for which x is NA be treated?
For "zero" , they are plotted as if the value were 0.
For "omit" , they are omitted.
For "xout" , they are crossed out. |
desc |
Character of length 2. Legend for the two ends of the colorbar, e.g. 'act' and 'inh'. |
char |
An optional character vector of equal length as x
(except if argument ind is specified). Each element of the
vector may contain one single char to be superimposed on
the respective well or NA for no plotting. |
Argumentind
allows the user to indicate the position (well
number) for each element of vector x
on the plate. This can be
used either to change the order in which elements of x
are to be
plotted or to deal with the problem of missing data for some of the
wells on a plate.
To further increase the amount of information of the platePlot one may
decorate wells with single characters using argument char
. Each
element of char
!= NA
will be superimposed on the respective
well (see examples).
The function produces a plot in the graphics device specified by the
device
argument.
It returns a list with two elements. The element which
is a vector with
the indices of those elements in x
that were plotted (see argument
na.action
). The element coord
is a length(which)
by 4
matrix in which each row specifies the corners of a rectangle that contains a
well. It is intended to be use as an argument to a subsequent call to
imageMap
.
Wolfgang Huber http://www.ebi.ac.uk/huber
plotPlate(runif(96), main="example 1", col=c("#0000e0", "#e00000"), width=7, desc=c("act", "inh")) plotPlate(runif(384), nrow=16, ncol=24, main="example 2", col=c("#0000e0", "white", "#e00000"), width=7) plotPlate(runif(48), main="example 3", col=c("#0000e0", "#e00000"), width=7, ind=c(1:24, 73:96)) x <- runif(96) x[sample(96, 10)] <- NA plotPlate(x, main="example 4", col=c("#0000e0", "#e00000"), width=7, char=c(rep(NA, 72), LETTERS[1:24]), na.action="xout")