Make Complex Heatmaps (original) (raw)
Complex heatmaps are efficient to visualize associations between different sources of data sets and reveal potential patterns. Here the ComplexHeatmap package provides a highly flexible way to arrange multiple heatmaps and supports various annotation graphics.
Install
ComplexHeatmap
is available on Bioconductor, you can install it by:
{r} if (!requireNamespace("BiocManager", quietly=TRUE)) install.packages("BiocManager") BiocManager::install("ComplexHeatmap")
If you want the latest version, install it directly from GitHub:
{r} library(devtools) install_github("jokergoo/ComplexHeatmap")
Usage
Make a single heatmap:
{r} Heatmap(mat, ...)
A single Heatmap with column annotations:
{r} ha = HeatmapAnnotation(df = anno1, anno_fun = anno2, ...) Heatmap(mat, ..., top_annotation = ha)
Make a list of heatmaps:
{r} Heatmap(mat1, ...) + Heatmap(mat2, ...)
Make a list of heatmaps and row annotations:
{r} ha = HeatmapAnnotation(df = anno1, anno_fun = anno2, ..., which = "row") Heatmap(mat1, ...) + Heatmap(mat2, ...) + ha