drawMapDendro: Draw a heatmap and dendrogram for a strand-specific data...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

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.

Usage

1
2
3
4
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', ...)

Arguments

x

The strand-specific data matrix to cluster and plot, usually generated using createChrMatrix.

start

The starting genome coordinate for the plot.

end

The ending genome coordinate for the plot.

col

A character vector of colors to use in the heat map, or the name of a function generating such a vector.

dendrogram

A boolean flag indicating whether or not to draw the dendrogram.

Rowv

Determines if and how the sample dendrogram should be reordered. If a 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.

margins

A numeric vector indicating the c(bottom, left) margins of the plot containing X and Y axes labels.

na.rm

Whether or not to remove NA from calculations.

hclustfun

Function used to compute the hierarchical clustering when Rowv is not a dendrogram object. Defaults to hclust.

distfun

Function used to compute the distance (dissimilarity) between both rows and columns. Defaults to dist.

breaks

(Optional) Either a numeric vector indicating the splitting points for binning 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).

RowSideColors

(Optional) Character vector of length nrow(x) containing the color names for a vertical side bar that may be used to annotate the rows of x.

cexRow, cexCol

(Optional) Positive numbers, used as 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.

xlab, ylab

X- and Y- axis titles; defaults to none.

labRow, labCol

Character vectors with row and column labels to use; these default to rownames(x) or colnames(x), respectively.

na.color

Color to use for missing value (NA). Defaults to gray.

...

Additional arguments are passed to the image function.

Details

This function makes assumptions about the plot layout, usually set by the enclosing chrHeatMap function. Typically neither of these functions should be called directly, but rather via the wrapper plotChrMap function.

Value

This function is executed for its side effects.

Author(s)

Tim F Rayner

See Also

plotChrMap, createChrMatrix, chrHeatMap

Examples

1
2
3
4
5
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) )

ChromHeatMap documentation built on Nov. 8, 2020, 7:33 p.m.