heattile: Heatmap with Biclusters

Description Usage Arguments Value Author(s) See Also Examples

View source: R/heattile.R

Description

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

Usage

1
2
3
4
5
heattile(x, biclust = NULL, Is = NULL,  shape = "r", fluct = FALSE, 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", sym = FALSE,
 breaks = 20+ 10*sym, clust.col = NULL, clust.palette = "rgb", hm.palette = "div",
 clust.col.opt = list(), hm.col.opt = list(revert = TRUE))

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. getIs or getIs2 return such lists and the row and column orders are changed with respect to the clusters.

shape

Shape of the tiles, see fluctile.

fluct

Plots polygons whose sizes are proportional to their corresponding values, see fluctile. If FALSE (default) a colored same-binsize plot is produced.

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.

sym

Whether or not the colors should be on a symmetric scale around zero.

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 rainbow_hcl. "seq" and "div" stand for sequential_hcl and diverge_hcl.

hm.palette

The color vector for the heatmap or a color palette. Usually "seq" and "div" which stand for sequential_hcl and diverge_hcl respectively will make sense. "rgb" for rainbow and "hcl" for rainbow_hcl are useful if the matrix entries are categorical. "terrain" and "heat" are also available.

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

Author(s)

Alexander Pilhoefer

See Also

fluctile

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
## Not run: 

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

## End(Not run)

extracat documentation built on July 17, 2018, 5:05 p.m.

Related to heattile in extracat...