diagDivCellHeatmap: diagDivCellHeatmap

View source: R/heatmaps.R

diagDivCellHeatmapR Documentation

diagDivCellHeatmap

Description

Plot a heatmap in which each cell is subdivided into a lower-left and upper-right triangle representing the values of two matrices

Usage

diagDivCellHeatmap(
  ml,
  mr,
  col.l = NULL,
  col.r = NULL,
  name.l = "Lower left",
  name.r = "Upper right",
  ...
)

Arguments

ml

the first value matrix (will be the left-lower diagonal in the cells of the resulting heatmap)

mr

the second value matrix (will be the right-upper diagonal in the cells of the resulting heatmap)

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

...

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)
diagDivCellHeatmap(m1, m2, cluster_rows=FALSE, cluster_columns=FALSE)
cres <- as.hclust(muRtools::getClusteringDendrogram(m1, distMethod="euclidean", linkMethod="ward.D", corMethod="pearson"))
diagDivCellHeatmap(m1, m2, cluster_rows=cres, cluster_columns=cres)

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