plotModules {isa2}R Documentation

Image plots of biclusters

Description

Make several image plots, one for each bicluster, and optionally one for the original data as well.

Usage

images(matrices, names=NULL, ...)
## S4 method for signature 'list'
 plotModules(modules, ...)

Arguments

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 data argument to plotModules, then the first label corresponds to that.

...

Additional arguments, for images these are passed to levelplot, for plotModules see the details below.

modules

The object with the ISA modules, as returned by the isa function or other such functions.

Details

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:

modules

The object with the ISA modules, as returned by the isa function or other such functions.

to.plot

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.

data

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.

binary

Logical scalar, whether to binarize the biclusters before plotting or use the actual ISA scores. By default the biclusters are binarized.

names

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.

xlab

Character scalar, the label to put on the horizontal axis.

ylab

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.

Value

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.

Author(s)

Gabor Csardi Gabor.Csardi@unil.ch

See Also

image and the other version: image from the Matrix package, for alternatives to create image plots.

Examples

## 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)))))

[Package isa2 version 0.3.6 Index]