diagDivHeatmap: diagDivHeatmap

View source: R/heatmaps.R

diagDivHeatmapR Documentation

diagDivHeatmap

Description

Plot a diagonally divided heatmap u

Usage

diagDivHeatmap(
  ml,
  mr,
  col.l = NULL,
  col.r = NULL,
  name.l = "Lower left",
  name.r = "Upper right",
  cluster = FALSE,
  cell.val.text = FALSE,
  cell.val.text.round = 2,
  ...
)

Arguments

ml

the first value matrix (the left-lower diagonal matrix will be in the result)

mr

the first value matrix (the right-upper diagonal matrix will be in the result)

col.l

color scheme for the left-lower diagonal matrix. Should be generated by circlize::colorRamp2. Alternatively can be a character vector specifying color levels/breaks. If NULL a default color scheme will be used.

col.r

color scheme for the upper-right diagonal matrix. Should be generated by circlize::colorRamp2. Alternatively can be a character vector specifying color levels/breaks. If NULL a default color scheme will be used.

name.l

Name for the lower-left submatrix

name.r

Name for the upper-right submatrix

cluster

logical or clustering object. will be passed to the cluster_rows and cluster_columns arguments of Heatmap

cell.val.text

logical indicating whether the cells value should be added as text

cell.val.text.round

if the cell value is numeric, the number of digits to which the cell text is rounded

...

parameters passed on to ComplexHeatmap::Heatmap

Value

a ComplexHeatmap::Heatmap object containing the heatmap

Author(s)

Fabian Mueller

Examples

m1 <- matrix(rnorm(100, mean=0), ncol=10)
m2 <- matrix(rnorm(100, mean=2), ncol=10)
rownames(m1) <- rownames(m2) <- colnames(m1) <- colnames(m2) <- paste0("Idx", 1:10)
diagDivHeatmap(m1, m2)
diagDivHeatmap(m1, m2, cell.val.text=TRUE, cell.val.text.round=3)
cres <- as.hclust(muRtools::getClusteringDendrogram(m1, distMethod="euclidean", linkMethod="ward.D", corMethod="pearson"))
diagDivHeatmap(m1, m2, cluster=cres, cell.val.text=TRUE, cell.val.text.round=2)

demuellae/muRtools documentation built on Sept. 8, 2023, 4:32 p.m.