cim {integrOmics} | R Documentation |
This function generates color-coded Clustered Image Maps (CIMs) ("heat maps") to represent "high-dimensional" data sets.
## Default S3 method: cim(mat, breaks, col = jet.colors, distfun = dist, hclustfun = hclust, labRow = NULL, labCol = NULL, symkey = TRUE, zoom = FALSE, main = NULL, xlab = NULL, ylab = NULL, keysize = 1, cexRow = min(1, 0.2 + 1/log10(nr)), cexCol = min(1, 0.2 + 1/log10(nc)), margins = c(5, 5), lhei = NULL, lwid = NULL, ...) ## S3 method for class 'rcc': cim(object, dim, X.names = NULL, Y.names = NULL, ...) ## S3 method for class 'spls': cim(object, dim, X.names = NULL, Y.names = NULL, keep.var = TRUE, ...)
mat |
numeric matrix of values to be plotted. |
object |
object returned by rcc . |
dim |
the dimensionality to adequately account for the data association. |
X.names, Y.names |
character vector containing the names of X- and Y-variables. |
keep.var |
boolean. If TRUE only the variables with loadings not zero are plotted
(as selected by spls ). Defaults to TRUE . |
distfun |
function used to compute the distance (dissimilarity) between both rows and columns.
Defaults to dist . |
hclustfun |
function used to compute the hierarchical clustering for both rows and columns.
Defaults to hclust . Should take as argument a result of distfun and return
an object to which as.dendrogram can be applied. |
breaks |
(optional) either a numeric vector indicating the splitting points for
binning mat into colors, or a integer number of break points to be used, in
which case the break points will be spaced equally between min(mat)
and max(mat) . |
col |
a character string specifying the colors function to use:
terrain.colors , topo.colors ,
rainbow or similar functions. Defaults to jet.colors . |
labRow |
character vectors with row labels to use.
Defaults to rownames(mat) . |
labCol |
character vectors with column labels to use.
Defaults to colnames(mat) . |
symkey |
boolean indicating whether the color key should be made symmetric about 0.
Defaults to TRUE . |
zoom |
logical. Whether to use zoom for interactively zooming-out. See Details. |
main, xlab, ylab |
main, x- and y-axis titles; defaults to none. |
cexRow, cexCol |
positive numbers, used as cex.axis in for the row or column
axis labeling. The defaults currently only use number of rows or columns, respectively. |
keysize |
numeric value indicating the size of the color key. |
margins |
numeric vector of length two containing the margins (see par(mar) )
for co-lumn and row names respectively. |
lhei, lwid |
arguments passed to layout to divide the device up into two
rows and two columns, with the row-heights lhei and the column-widths lwid . |
... |
arguments passed to cim.default . |
One matrix Clustered Image Map (default method) is a 2-dimensional visualization of a
real-valued matrix (basically image(t(mat))
) with a dendrogram added to the
left side and to the top. The rows and columns are reordered according to some hierarchical
clustering method to identify interesting patterns. By default the used clustering method for
rows and columns is the complete linkage method and the used distance measure is the distance
euclidean.
In cim.rcc
method, the matrix mat
is created where element (i,j) is the
scalar product value between every pairs of vectors in dimension dim
representing
the variables X_i and Y_j on the axis defined by (Z_1,... ,Z_dim
), where
Z_i, i=1, ... ,dim
, is the bisector vector between the i-th X and
Y canonical variate.
In spls
, the element (i,j) of the similarity matrix mat
is given
by the scalar product value between every pairs of vectors in dimension dim
representing
the variables X_i and Y_j on the axis defined by (U_1,... ,U_dim
), where
U_i, i=1, ... ,dim
, is the i-th X variate.
For visualization of "high-dimensional" data sets, a nice zooming tool was created.
zoom=TRUE
open a new device, one for CIM, one for zoom-out region and
define an interactive `zoom' process: click two points at imagen map region by pressing
the first mouse button. It then draws a rectangle around the selected region and zoom-out
this at new device. The process can be repeated to zoom-out other regions of interest.
The zoom process is terminated by clicking the second button and selecting 'Stop' from the menu, or from the 'Stop' menu on the graphics window.
A object of class "rcc"
, a list containing the following components:
rowInd |
row index permutation vectors as returned
by order.dendrogram . |
colInd |
column index permutation vectors as returned
by order.dendrogram . |
ddr, ddc |
object of class "dendrogram" which describes the row and
column trees produced by cim . |
labRow, labCol |
character vectors with row and column labels used. |
Sébastien Déjean and Ignacio González.
Eisen, M. B., Spellman, P. T., Brown, P. O. and Botstein, D. (1998). Cluster analysis and display of genome-wide expression patterns. Proceeding of the National Academy of Sciences of the USA 95, 14863-14868.
Weinstein, J. N., Myers, T. G., O'Connor, P. M., Friend, S. H., Fornace Jr., A. J., Kohn, K. W., Fojo, T., Bates, S. E., Rubinstein, L. V., Anderson, N. L., Buolamwini, J. K., van Osdol, W. W., Monks, A. P., Scudiero, D. A., Sausville, E. A., Zaharevitz, D. W., Bunow, B., Viswanadhan, V. N., Johnson, G. S., Wittes, R. E. and Paull, K. D. (1997). An information-intensive approach to the molecular pharmacology of cancer. Science 275, 343-349.
image
, heatmap
, hclust
, plotVar
,
plot3dVar
, network
.
## default method data(nutrimouse) X <- nutrimouse$lipid Y <- nutrimouse$gene cim(cor(X, Y)) ## CIM representation for objects of class 'rcc' nutri.res <- rcc(X, Y, lambda1 = 0.064, lambda2 = 0.008) dends <- cim(nutri.res, dim = 3, xlab = "genes", ylab = "lipids", margins = c(5, 6)) op <- par(mar = c(5, 4, 4, 4), cex = 0.8) plot(dends$ddr, axes = FALSE, horiz = TRUE) par(op) ## interactive 'zoom' ## Not run: cim(nutri.res, dim = 3, zoom = TRUE) ## select the region and "see" the zoom-out region ## End(Not run) ## CIM representation for objects of class 'spls' data(liver.toxicity) X <- liver.toxicity$gene Y <- liver.toxicity$clinic toxicity.spls <- spls(X, Y, ncomp = 3, keepX = c(50, 50, 50), keepY = c(10, 10, 10)) cim(toxicity.spls, dim = 3)