Learn R Programming

extracat (version 1.6-3)

heattile: Heatmap with Biclusters

Description

Draws a heatmap using fluctile as the workhorse and offers the possibility to add rectangles which visualize the biclusters.

Usage

heattile(x, biclust = NULL, Is = NULL,  shape = "r", gap.prop = 0,
 border = c(0.05, 0.03, 0.03, 0.05), label = c(TRUE,FALSE) ,
 lab.opt = list(abbrev = 24, lab.cex = 1, rot = 0), bg.col = "lightgrey",
 breaks = 20, clust.col = NULL, clust.palette = "rgb", hm.palette = "div",
 clust.col.opt = list(), hm.col.opt = list())

Arguments

x
A two-was data matrix.
biclust
A biclustering object. The matrix is displayed in its original order.
Is
Instead of biclust one can define the indices of the clusters as a list where each element represents a cluster and is itself a list of length 2 containing the row indices and the column indices respectively.
shape
Shape of the tiles, see fluctile.
gap.prop
gaps between the tiles, see fluctile.
border
plot margins, see fluctile.
label
Whether or not to draw labels, see fluctile.
lab.opt
Label options, see fluctile.
bg.col
A background color, see fluctile.
breaks
The matrix entries are cut into intervals via fluctile. see fluctile.
clust.col
A color vector for the cluster rectangles.
clust.palette
If no colors are specified a palette is used to obtain them: Usually a quantitative palette is a reasonable choice, e.g. "rbg" for rainbow and "hcl" for
hm.palette
The color vector for the heatmap or a color palette. Usually "seq" and "div" which stand for sequential_hcl and diverge_hcl r
clust.col.opt
Options for the cluster color palette. See col.opt for rmb.
hm.col.opt
Options for the heatmap color palette. See col.opt for rmb.

Value

  • TRUE

See Also

fluctile

Examples

Run this code
ss <- sample(1:nrow(plants), 500)
M <- t(as.matrix(plants[ ss, -1]))
M <- optME(M)
heattile(M, hm.palette = "seq")

	require(biclust)
	
	GE <- t(na.omit(GeneEx[,3:52]))
 
 	# draw a sample of 1000 genes
	ss <- sample(1:ncol(GE),1000)

	EY <- GE[,ss]
	SEY <- scale(EY)

	# compute sensible initial row and column orders:
	require(seriation)
	s1 <- seriate(dist(SEY),method="GW")
	s2 <- seriate(dist(t(SEY)),method="GW")

	o1 <- get_order(s1,1)
	o2 <- get_order(s2,1)

	SEY <- SEY[o1,o2]
	
	# A plaid model with row effects
	b1 <- biclust(SEY,method=BCPlaid(),row.release=0.4,
	 col.release=0.4, fit.model = y ~ m + a )

	# index sets from b1
	Is2 <- getIs(b1,dim(SEY), nstart = 1)

	# clusters in seriated matirx:
	heattile(SEY,biclust=b1,clust.palette="hsv",hm.palette="div",
	 label = TRUE, border = c(0.1,0.01,0.03,0.03))

	#clusters in optimized matrix
	heattile(SEY,Is=Is2,clust.palette="hsv",hm.palette="div",
	 label = TRUE, border = c(0.1,0.01,0.03,0.03))

Run the code above in your browser using DataLab