Given a data matrix, cluster by sample (if desired), and plot the
dendrogram and heatmap along chromosome coordinates. This function
reuses code from the gplots heatmap.2
function. Note that this
function makes assumptions about the current layout of the display
device, and so should generally be called only via plotChrMap
.
drawMapDendro(x, start, end, col = "heat.colors", dendrogram = TRUE, Rowv = TRUE, margins = c(6, 6), na.rm=TRUE, hclustfun = hclust, distfun = dist, breaks, RowSideColors, cexRow, cexCol, xlab, ylab, labRow, labCol, na.color = 'gray', ...)
createChrMatrix
.dendrogram
, then it is used "as-is", i.e.,
without any reordering. If a vector of integers, then the dendrogram
is computed and reordered based on the order of the vector. Set this
argument to FALSE or NULL to draw the heatmap without any sample
reordering.Rowv
is not a dendrogram object. Defaults to hclust
.dist
.x
into colors, or a integer number of
break points to be used, in which case the break points will be
spaced equally between min(x)
and max(x)
.nrow(x)
containing the color names for a vertical side bar that may
be used to annotate the rows of x
.cex.axis
in for the row or column axis labeling. If these
arguments are omitted the function will try and calculate a sane
axis font size based on the number of rows or columns respectively.rownames(x)
or colnames(x)
, respectively.NA
). Defaults
to gray.image
function.chrHeatMap
function. Typically neither of these
functions should be called directly, but rather via the wrapper
plotChrMap
function.
plotChrMap
, createChrMatrix
, chrHeatMap
data('demo')
stranddata <- createChrMatrix( chrdata, chr=22, strand='forward',
start=21925000, end=24300000 )
layout(matrix(1:2, ncol=2), widths=c(0.1,1))
drawMapDendro( stranddata, margins=c(0,0) )
Run the code above in your browser using DataLab