tidyHeatmap

tidyHeatmap: an R package for modular heatmap production based on tidy principles - Published in JOSS (2020)

https://github.com/stemangiola/tidyheatmap

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
    2 of 9 committers (22.2%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

brewer complexheatmap custom-palette dplyr graphviz heatmap mtcars plotting r rstudio scale tibble tidy tidy-data-frame tidybulk tidyverse viridis
Last synced: 4 months ago · JSON representation

Repository

Draw heatmap simply using a tidy data frame

Basic Info
Statistics
  • Stars: 347
  • Watchers: 6
  • Forks: 25
  • Open Issues: 2
  • Releases: 15
Topics
brewer complexheatmap custom-palette dplyr graphviz heatmap mtcars plotting r rstudio scale tibble tidy tidy-data-frame tidybulk tidyverse viridis
Created almost 6 years ago · Last pushed 6 months ago
Metadata Files
Readme

README.md

The tidyHeatmap package

Stefano Mangiola 2025-01-26

Lifecycle:maturing DOI <!-- badges: end -->

tidyHeatmap is a package that introduces tidy principles to the creation of information-rich heatmaps. This package uses ComplexHeatmap as graphical engine.

Citation

Mangiola et al., (2020). tidyHeatmap: an R package for modular heatmap production based on tidy principles. Journal of Open Source Software, 5(52), 2472, https://doi.org/10.21105/joss.02472

Full documentation here

``` r

Create some more data points

pasillaplus <- tidyHeatmap::pasilla |> dplyr::mutate(activation2 = activation, activation_3 = activation) |> tidyr::nest(data = -sample) |> dplyr::mutate(size = rnorm(n(), 4,0.5)) |> dplyr::mutate(age = runif(n(), 50, 200)) |> tidyr::unnest(data)

Plot

pasillaplus |> heatmap( .column = sample, .row = symbol, .value = count normalised adjusted,
scale = "row" ) |> annotation
group(location) |> annotationtile(condition, showlegend = FALSE) |> annotationpoint(activation) |> annotationnumeric(activation3) |> annotationtile(activation2) |> annotationbar(size) |> annotation_line(age) ```

Advantages:

  • Modular annotation with just specifying column names
  • Custom grouping of rows/columns is easy to specify with annotation_group, e.g. heatmap(...) |> annotation_group(...)
  • Labels size adjusted by row and column total number
  • Default use of Brewer and Viridis palettes

Retrieve heatmap data and dendrograms

After creating a heatmap, you can extract the matrix and dendrograms exactly as they appear in the plot:

``` r

Create heatmap

hm <- tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = read count normalised log )

Extract heatmap data as plotted

result <- hm |> getheatmapdata() orderedmatrix <- result$matrix # Matrix with rows/columns in heatmap order rowdendrogram <- result$rowdend # Row dendrogram object columndendrogram <- result$column_dend # Column dendrogram object

All have consistent row and column names

print(rownames(orderedmatrix)) print(labels(rowdendrogram)) ```

Functions/utilities available

| Function | Description | |----------------------|-----------------------------------------------------------------------------| | heatmap | Plots base heatmap | | annotation_group | Adds group annotation strips and grouping to the heatmap | | annotation_tile | Adds tile annotation to the heatmap | | annotation_point | Adds point annotation to the heatmap | | annotation_bar | Adds bar annotation to the heatmap | | annotation_numeric | Adds bar + number annotation to the heatmap | | annotation_line | Adds line annotation to the heatmap | | layer_text | Add layer of text on top of the heatmap | | layer_point | Adds layer of symbols on top of the heatmap | | layer_square | Adds layer of symbols on top of the heatmap | | layer_diamond | Adds layer of symbols on top of the heatmap | | layer_arrow_up | Adds layer of symbols on top of the heatmap | | layer_arrow_down | Add layer of symbols on top of the heatmap | | layer_star | Add layer of symbols on top of the heatmap | | layer_asterisk | Add layer of symbols on top of the heatmap | | split_rows | Splits the rows based on the dendogram | | split_columns | Splits the columns based on the dendogram | | get_heatmap_data | Retrieves matrix and dendrograms exactly as plotted | | save_pdf | Saves the PDF of the heatmap | | + | Integrate heatmaps side-by-side | | as_ComplexHeatmap | Convert the tidyHeatmap output to ComplexHeatmap for non-standard "drawing" | | wrap_heatmap | Allows the integration with the patchwork package |

Installation

To install the most up-to-date version

r devtools::install_github("stemangiola/tidyHeatmap")

To install the most stable version (however please keep in mind that this package is under a maturing lifecycle stage)

r install.packages("tidyHeatmap")

Contribution

If you want to contribute to the software, report issues or problems with the software or seek support please open an issue here

Owner

  • Name: Stefano Mangiola
  • Login: stemangiola
  • Kind: user
  • Location: Melbourne
  • Company: Walter and Eliza Hall Institute of Medical Research

JOSS Publication

tidyHeatmap: an R package for modular heatmap production based on tidy principles
Published
August 03, 2020
Volume 5, Issue 52, Page 2472
Authors
Stefano Mangiola ORCID
Bioinformatics Division, The Walter and Eliza Hall Institute of Medical Research, Parkville, Victoria, Australia, Department of Medical Biology, University of Melbourne, Melbourne, Victoria, Australia.
Anthony T. Papenfuss ORCID
Bioinformatics Division, The Walter and Eliza Hall Institute of Medical Research, Parkville, Victoria, Australia, Department of Medical Biology, University of Melbourne, Melbourne, Victoria, Australia., Peter MacCallum Cancer Centre, Melbourne, VIC 3000, Australia., School of Mathematics and Statistics, University of Melbourne, Melbourne, VIC 3010, Australia.
Editor
Karthik Ram ORCID
Tags
tidyverse tidy heatmap data visualization

Papers & Mentions

Total mentions: 2

A Transcriptional Signature of PDGF-DD Activated Natural Killer Cells Predicts More Favorable Prognosis in Low-Grade Glioma
Last synced: 3 months ago
tidybulk: an R tidy framework for modular transcriptomic data analysis
Last synced: 3 months ago

GitHub Events

Total
  • Create event: 15
  • Release event: 3
  • Issues event: 24
  • Watch event: 40
  • Issue comment event: 50
  • Push event: 85
  • Pull request review comment event: 12
  • Pull request review event: 12
  • Pull request event: 23
  • Fork event: 3
Last Year
  • Create event: 15
  • Release event: 3
  • Issues event: 24
  • Watch event: 40
  • Issue comment event: 50
  • Push event: 85
  • Pull request review comment event: 12
  • Pull request review event: 12
  • Pull request event: 23
  • Fork event: 3

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 451
  • Total Committers: 9
  • Avg Commits per committer: 50.111
  • Development Distribution Score (DDS): 0.058
Past Year
  • Commits: 66
  • Committers: 2
  • Avg Commits per committer: 33.0
  • Development Distribution Score (DDS): 0.091
Top Committers
Name Email Commits
stemangiola m****o@g****m 425
William Hutchison w****1@f****m 6
Cursor Agent c****t@c****m 6
Liam Fitzstevens 7****s 4
Gregor Sturm m****l@g****e 3
Tony Papenfuss p****s@w****u 2
Matthew Galbraith m****h@c****u 2
Kristen Thyng k****g@g****m 2
Mengyuan Shen m****n@o****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 57
  • Total pull requests: 92
  • Average time to close issues: 11 months
  • Average time to close pull requests: 23 days
  • Total issue authors: 43
  • Total pull request authors: 9
  • Average comments per issue: 3.53
  • Average comments per pull request: 0.27
  • Merged pull requests: 77
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 7
  • Pull requests: 27
  • Average time to close issues: 2 months
  • Average time to close pull requests: 1 day
  • Issue authors: 7
  • Pull request authors: 1
  • Average comments per issue: 3.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 19
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • stemangiola (8)
  • raivivek (4)
  • micwij (2)
  • bishimonster (2)
  • MatteoRiva95 (2)
  • liamfitzstevens (1)
  • shaman-narayanasamy (1)
  • drejom (1)
  • bioPG (1)
  • alhafidzhamdan (1)
  • seb-mueller (1)
  • mblue9 (1)
  • AliciaSchep (1)
  • jantusan (1)
  • lorenzoFabbri (1)
Pull Request Authors
  • stemangiola (80)
  • frankyan (2)
  • papenfuss (2)
  • kthyng (2)
  • william-hutchison (2)
  • myushen (2)
  • liamfitzstevens (1)
  • mattgalbraith (1)
  • grst (1)
Top Labels
Issue Labels
enhancement (5) question (4)
Pull Request Labels
enhancement (1) documentation (1)

Packages

  • Total packages: 3
  • Total downloads:
    • cran 1,646 last-month
  • Total docker downloads: 48
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 11
    (may contain duplicates)
  • Total versions: 42
  • Total maintainers: 1
proxy.golang.org: github.com/stemangiola/tidyHeatmap
  • Versions: 15
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 4 months ago
proxy.golang.org: github.com/stemangiola/tidyheatmap
  • Versions: 15
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 4 months ago
cran.r-project.org: tidyHeatmap

A Tidy Implementation of Heatmap

  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 11
  • Downloads: 1,646 Last month
  • Docker Downloads: 48
Rankings
Stargazers count: 1.5%
Forks count: 3.5%
Dependent repos count: 8.8%
Average: 11.3%
Downloads: 14.1%
Dependent packages count: 28.7%
Maintainers (1)
Last synced: 4 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.6 depends
  • ComplexHeatmap >= 2.2.0 imports
  • RColorBrewer >= 1.1 imports
  • circlize >= 0.4.8 imports
  • dendextend * imports
  • dplyr >= 0.8.5 imports
  • grDevices * imports
  • grid * imports
  • lifecycle >= 0.2.0 imports
  • magrittr >= 1.5 imports
  • methods * imports
  • patchwork * imports
  • purrr >= 0.3.3 imports
  • rlang >= 0.4.5 imports
  • stats * imports
  • tibble * imports
  • tidyr >= 1.0.3 imports
  • utils * imports
  • viridis >= 0.5.1 imports
  • BiocManager * suggests
  • covr * suggests
  • forcats * suggests
  • ggplot2 * suggests
  • knitr * suggests
  • qpdf * suggests
  • rmarkdown * suggests
  • roxygen2 * suggests
  • spelling * suggests
  • testthat * suggests
  • vdiffr * suggests
.github/workflows/R-CMD-check.yml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite