plotModules | R Documentation |
Make several image plots, one for each bicluster, and optionally one for the original data as well.
images(matrices, names=NULL, ...) ## S4 method for signature 'list' plotModules(modules, ...)
matrices |
A list of matrices to plot. Please note that this argument is always interpreted as a list, even if want to plot a single matrix, put it into a list. |
names |
Character vector, the labels to show above the image
plots. If you give the |
... |
Additional arguments, for |
modules |
The object with the ISA modules, as returned by the
|
images
creates image plots for a series of matrices, using
levelplot
from the lattice
package.
plotModules
calls images
from the
to create image plots for a set of modules. It can be called as
plotModules(modules, to.plot=seq_len(ncol(modules$rows)), data, binary=TRUE, names=NULL, xlab="", ylab="", \dots)
where the arguments are:
The object with the ISA modules, as returned by the
isa
function or other such functions.
Numeric vector, the modules to plot, the numbers
correspond to the columns in modules$rows
and
modules$columns
. By default all modules will be plot.
An optional data matrix to plot. Most often this is the
original data. If given, its dimension must much the dimensions in
the modules
object. If given, then this matrix is plotted
first, before the modules.
Logical scalar, whether to binarize the biclusters before plotting or use the actual ISA scores. By default the biclusters are binarized.
Character vector, the labels to show above the image
plots. If you give the data
argument to plotModules
,
then the first label corresponds to that.
Character scalar, the label to put on the horizontal axis.
Character scalar, the label to put on the vertical axis.
Further arguments are passed to
levelplot
.
Note, that if you want to export these plots to a file, then a bitmap-based format might be more appropriate. For larger matrices vector formats tend to generate huge file because of the many dots.
Since these function use the lattice
package, they return an
object of class trellis
. You will need to print
this
object to create the actual plots.
Gabor Csardi Gabor.Csardi@unil.ch
image
and the other version: image
from the Matrix
package, for alternatives to create image
plots.
## The following should plot the input matrix and the four modules ## found by ISA set.seed(1) # to get same plot every time data <- isa.in.silico(100, 100, num.fact=4) modules <- isa(data[[1]], thr.row=2, thr.col=2) plotModules(modules, data=data[[1]], binary=FALSE, names=c("Input matrix", paste("Module", seq_len(ncol(modules$rows)))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.