Description Usage Arguments Value Examples
The function makes a heatmap out of given ScoreMatrix
object. If desired
it can use clustering using given clustering function
(e.g. kmeans) and plot cluster color codes as a sidebar.
In addition, user can define groups of rows using 'group' argument.
1 2 3 4 5 
mat 
a 
grid 
if TRUE, grid graphics will be used. if FALSE, base graphics will be used on the top level, so users can use par(mfrow) or par(mfcol) prior to calling the function. Default:FALSE 
col 
a vector of colors, such as the ones created by heat.colors(10). If NULL (which is default), jet color scheme (common in matlab plots) will be used. 
xcoords 
a vector of numbers showing relative positions of the bases or
windows. It must match the number of columns in the 
group 
a list of vectors of row numbers or a factor. This grouping is
used for rowside colors of the heatmap. If it is a list,
each element of the list must be a vector of row numbers. Names
of the elements of the list will be used as names of groups.
If 
group.col 
a vector of color names to be used at the rowside colors if

order 
Logical indicating if the rows should be ordered or not
(Default:FALSE). If 
user.order 
a numerical vector indicating the order of groups/clusters (it works only
when 
winsorize 
Numeric vector of two, defaults to c(0,100). This vector determines the upper and lower percentile values to limit the extreme values. For example, c(0,99) will limit the values to only 99th percentile, everything above the 99 percentile will be equalized to the value of 99th percentile.This is useful for visualization of matrices that have outliers. 
clustfun 
a function for clustering
rows of 
main 
a character string for the plot title 
legend.name 
a character label plotted next to the legend 
cex.legend 
A numerical value giving the amount by which legend axis marks should be magnified relative to the default 
xlab 
label a character string for xaxis of the heatmap 
cex.main 
A numerical value giving the amount by which plot title should be magnified 
cex.lab 
A numerical value giving the amount by which axis labels (including 'legend.name') should be magnified relative to the default. 
cex.axis 
A numerical value giving the amount by which axis marks should be magnified relative to the default 
newpage 
logical indicating if 
returns clustering result invisibly, if clustfun is definied
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  data(cage)
data(promoters)
scores1=ScoreMatrix(target=cage,windows=promoters,strand.aware=TRUE,
weight.col="tpm")
set.seed(1000)
heatMatrix(mat=scores1,legend.name="tpm",winsorize=c(0,99),xlab="region around TSS",
xcoords=1000:1000,
cex.legend=0.8,main="CAGE clusters on promoters",cex.lab=1,
cex.axis=0.9,grid=FALSE)
## examples using clustering functions
## kmeans
cl1 < function(x) kmeans(x, centers=3)$cluster
set.seed(1000)
heatMatrix(mat=scores1,legend.name="tpm",winsorize=c(0,99),xlab="region around TSS",
xcoords=1000:1000,clustfun=cl1,
cex.legend=0.8,main="CAGE clusters on promoters",cex.lab=1,
cex.axis=0.9,grid=FALSE,
user.order=c(1,3,2))
## hierarchical clustering
cl2 < function(x) cutree(hclust(dist(x), method="complete"), k=3)
set.seed(1000)
heatMatrix(mat=scores1,legend.name="tpm",winsorize=c(0,99),xlab="region around TSS",
xcoords=1000:1000,clustfun=cl2,
cex.legend=0.8,main="CAGE clusters on promoters",cex.lab=1,
cex.axis=0.9,grid=FALSE)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.