tidyHeatmap is a package that introduces tidy principles to the creation of information-rich heatmaps. This package uses ComplexHeatmap as graphical engine. The goal of this package is to interface a tidy data frame with this powerful tool. Some of the advantages are: Row and/or columns colour annotations are easy to integrate just specifying one parameter (column names). Custom grouping of rows is easy to specify providing a grouped tbl. For example: df Labels size adjusted by row and column total number. Default use of Brewer and Viridis palettes.
Stefano Mangiola
The tidyHeatmap package provides a tidy interface to create information-rich heatmaps using the powerful ComplexHeatmap engine. The package integrates seamlessly with the tidyverse ecosystem, allowing you to use familiar dplyr and tidyr verbs.
The main functions and methods are:
heatmap - Create a heatmap from a tidy data frame
annotation_group - Add group annotation strips
annotation_tile - Add tile annotations
annotation_point - Add point annotations
annotation_bar - Add bar annotations
annotation_numeric - Add numeric annotations
annotation_line - Add line annotations
layer_text - Add text layers
layer_point - Add point layers
layer_square - Add square symbol layers
layer_diamond - Add diamond symbol layers
layer_arrow_up - Add arrow up symbol layers
layer_arrow_down - Add arrow down symbol layers
layer_asterisk - Add asterisk symbol layers
layer_star - Add star symbol layers
get_heatmap_data - Extract matrix and dendrograms from heatmap
as_ComplexHeatmap - Convert to ComplexHeatmap object
save_pdf - Save heatmap to PDF
scale_robust - Robust scaling function
split_columns - Split columns in heatmap
The package uses a pipe-friendly syntax that allows you to build complex heatmaps by adding layers of annotations and customizations step by step.
For detailed information on usage, see the package vignette, by typing
vignette("introduction", package = "tidyHeatmap").
The code can be viewed at the GitHub repository:
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software, 5(52), 2472. tools:::Rd_expr_doi("10.21105/joss.02472")
Gu, Z., Eils, R., and Schlesner, M. 2016. "Complex heatmaps reveal patterns and correlations in multidimensional genomic data." Bioinformatics, 32(18), 2847-2849.
Useful links: