tidyHeatmap
tidyHeatmap: an R package for modular heatmap production based on tidy principles - Published in JOSS (2020)
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
Repository
Draw heatmap simply using a tidy data frame
Basic Info
- Host: GitHub
- Owner: stemangiola
- Language: R
- Default Branch: master
- Homepage: https://stemangiola.github.io/tidyHeatmap/articles/introduction.html
- Size: 62.2 MB
Statistics
- Stars: 347
- Watchers: 6
- Forks: 25
- Open Issues: 2
- Releases: 15
Topics
Metadata Files
README.md
The tidyHeatmap package
Stefano Mangiola 2025-01-26
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"
) |>
annotationgroup(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
- Twitter: steman_research
- Repositories: 26
- Profile: https://github.com/stemangiola
JOSS Publication
tidyHeatmap: an R package for modular heatmap production based on tidy principles
Authors
Bioinformatics Division, The Walter and Eliza Hall Institute of Medical Research, Parkville, Victoria, Australia, Department of Medical Biology, University of Melbourne, Melbourne, Victoria, Australia.
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.
Tags
tidyverse tidy heatmap data visualizationPapers & Mentions
Total mentions: 2
A Transcriptional Signature of PDGF-DD Activated Natural Killer Cells Predicts More Favorable Prognosis in Low-Grade Glioma
- DOI: 10.3389/fimmu.2021.668391
- OpenAlex ID: https://openalex.org/W3196516945
- Published: September 2021
tidybulk: an R tidy framework for modular transcriptomic data analysis
- DOI: 10.1186/s13059-020-02233-7
- OpenAlex ID: https://openalex.org/W3124968121
- Published: January 2021
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
Top Committers
| Name | 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
Pull Request Labels
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
- Documentation: https://pkg.go.dev/github.com/stemangiola/tidyHeatmap#section-documentation
-
Latest release: v1.12.0
published 6 months ago
Rankings
proxy.golang.org: github.com/stemangiola/tidyheatmap
- Documentation: https://pkg.go.dev/github.com/stemangiola/tidyheatmap#section-documentation
-
Latest release: v1.12.0
published 6 months ago
Rankings
cran.r-project.org: tidyHeatmap
A Tidy Implementation of Heatmap
- Homepage: https://www.r-project.org
- Documentation: http://cran.r-project.org/web/packages/tidyHeatmap/tidyHeatmap.pdf
- License: GPL-3
-
Latest release: 1.12.2
published 6 months ago
Rankings
Maintainers (1)
Dependencies
- 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
- 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