ComplexHeatmap

repository·master·Indexed 23 days ago

https://github.com/jokergoo/complexheatmap

An R package for flexible visualization of associations between data sets. It supports creating single or multiple heatmaps, adding column and row annotations via HeatmapAnnotation, and arranging heatmaps using the + operator. It is available on Bioconductor and can be extended into interactive Shiny apps using the InteractiveComplexHeatmap package.

Tokens
492
Snippets
5
Records
6
Agent score
31%

What's inside ComplexHeatmap

  1. Install ComplexHeatmap

    master

    ComplexHeatmap is available on Bioconductor. You can install it using BiocManager. Alternatively, you can install the latest development version directly from GitHub using devtools.

    # Install via Bioconductor
    if (!requireNamespace("BiocManager", quietly=TRUE))
        install.packages("BiocManager")
    BiocManager::install("ComplexHeatmap")
    
    # Install latest version from GitHub
    library(devtools)
    install_github("jokergoo/ComplexHeatmap")
  2. Add row annotations to a list of heatmaps

    master

    When creating a list of heatmaps, you can add row annotations by creating a HeatmapAnnotation object with the which = "row" argument and adding it to the heatmap list using the + operator.

    ha = HeatmapAnnotation(df = anno1, anno_fun = anno2, ..., which = "row")
    Heatmap(mat1, ...) + Heatmap(mat2, ...) + ha
  3. Add column annotations to a heatmap

    master

    To add annotations to the columns of a heatmap, create a HeatmapAnnotation object and pass it to the top_annotation argument of the Heatmap() function.

    ha = HeatmapAnnotation(df = anno1, anno_fun = anno2, ...)
    Heatmap(mat, ..., top_annotation = ha)