{"id":13857403,"url":"https://github.com/stemangiola/tidyHeatmap","last_synced_at":"2025-07-13T21:32:31.882Z","repository":{"id":39978930,"uuid":"233531789","full_name":"stemangiola/tidyHeatmap","owner":"stemangiola","description":"Draw heatmap simply using a tidy data frame","archived":false,"fork":false,"pushed_at":"2025-07-09T12:09:25.000Z","size":65137,"stargazers_count":345,"open_issues_count":2,"forks_count":25,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-11T04:02:51.868Z","etag":null,"topics":["brewer","complexheatmap","custom-palette","dplyr","graphviz","heatmap","mtcars","plotting","r","rstudio","scale","tibble","tidy","tidy-data-frame","tidybulk","tidyverse","viridis"],"latest_commit_sha":null,"homepage":"https://stemangiola.github.io/tidyHeatmap/articles/introduction.html","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stemangiola.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-01-13T06:59:37.000Z","updated_at":"2025-07-10T03:02:58.000Z","dependencies_parsed_at":"2023-02-09T01:32:20.485Z","dependency_job_id":"7024f354-ed7d-4e20-b0f3-e947ee1e3f4f","html_url":"https://github.com/stemangiola/tidyHeatmap","commit_stats":{"total_commits":378,"total_committers":6,"mean_commits":63.0,"dds":0.03439153439153442,"last_synced_commit":"68db5953b5d419359e5243cf6ebad2eb440690dd"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/stemangiola/tidyHeatmap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stemangiola%2FtidyHeatmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stemangiola%2FtidyHeatmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stemangiola%2FtidyHeatmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stemangiola%2FtidyHeatmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stemangiola","download_url":"https://codeload.github.com/stemangiola/tidyHeatmap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stemangiola%2FtidyHeatmap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264922605,"owners_count":23683678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brewer","complexheatmap","custom-palette","dplyr","graphviz","heatmap","mtcars","plotting","r","rstudio","scale","tibble","tidy","tidy-data-frame","tidybulk","tidyverse","viridis"],"created_at":"2024-08-05T03:01:35.701Z","updated_at":"2025-07-13T21:32:31.862Z","avatar_url":"https://github.com/stemangiola.png","language":"R","readme":"The tidyHeatmap package\n================\nStefano Mangiola\n2025-01-26\n\n\u003c!-- badges: start --\u003e\n\n[![Lifecycle:maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html)\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.02472/status.svg)](https://doi.org/10.21105/joss.02472)\n\u003c!-- badges: end --\u003e\n\n`tidyHeatmap` is a package that introduces tidy principles to the\ncreation of information-rich heatmaps. This package uses\n[ComplexHeatmap](https://bioconductor.org/packages/release/bioc/html/ComplexHeatmap.html)\nas graphical engine.\n\n## Citation\n\nMangiola et al., (2020). tidyHeatmap: an R package for modular heatmap\nproduction based on tidy principles. Journal of Open Source Software,\n5(52), 2472, \u003chttps://doi.org/10.21105/joss.02472\u003e\n\nPlease have a look also to\n\n- [tidygate](https://github.com/stemangiola/tidygate/) for adding custom\n  gate information to your tibble\n- [tidySingleCellExperiment](https://stemangiola.github.io/tidySingleCellExperiment/)\n  for tidy manipulation of Seurat objects\n- [tidyseurat](https://stemangiola.github.io/tidyseurat/) for tidy\n  manipulation of Seurat objects\n- [tidybulk](https://stemangiola.github.io/tidybulk/) for tidy\n  high-level data analysis and manipulation\n- [tidySummarizedExperiment](https://stemangiola.github.io/tidySummarizedExperiment/)\n  for heatmaps produced with tidy principles\n\n## Full documentation [here](https://stemangiola.github.io/tidyHeatmap/articles/introduction.html)\n\n``` r\n# Create some more data points\npasilla_plus \u003c- \n\ttidyHeatmap::pasilla |\u003e\n\tdplyr::mutate(activation_2 = activation, activation_3 = activation) |\u003e \n\ttidyr::nest(data = -sample) |\u003e\n\tdplyr::mutate(size = rnorm(n(), 4,0.5)) |\u003e\n\tdplyr::mutate(age = runif(n(), 50, 200)) |\u003e\n\ttidyr::unnest(data) \n\n# Plot\npasilla_plus |\u003e\n    heatmap(\n        .column = sample,\n        .row = symbol,\n        .value = `count normalised adjusted`,   \n        scale = \"row\"\n    ) |\u003e\n    annotation_group(location) |\u003e\n    annotation_tile(condition, show_legend = FALSE) |\u003e\n    annotation_point(activation) |\u003e\n    annotation_numeric(activation_3) |\u003e\n    annotation_tile(activation_2) |\u003e\n    annotation_bar(size) |\u003e\n    annotation_line(age)\n```\n\n\u003cimg src=\"man/figures/example_plot.png\" width=\"100%\" /\u003e\n\n**Advantages:**\n\n- Modular annotation with just specifying column names\n- Custom grouping of rows/columns is easy to specify with `annotation_group`, e.g. `heatmap(...) |\u003e annotation_group(...)`\n- Labels size adjusted by row and column total number\n- Default use of Brewer and Viridis palettes\n\n## Retrieve heatmap data and dendrograms\n\nAfter creating a heatmap, you can extract the matrix and dendrograms exactly as they appear in the plot:\n\n``` r\n# Create heatmap\nhm \u003c- tidyHeatmap::N52 |\u003e\n  tidyHeatmap::heatmap(\n    .row = symbol_ct,\n    .column = UBR,\n    .value = `read count normalised log`\n  )\n\n# Extract heatmap data as plotted\nresult \u003c- hm |\u003e get_heatmap_data()\nordered_matrix \u003c- result$matrix        # Matrix with rows/columns in heatmap order\nrow_dendrogram \u003c- result$row_dend      # Row dendrogram object\ncolumn_dendrogram \u003c- result$column_dend # Column dendrogram object\n\n# All have consistent row and column names\nprint(rownames(ordered_matrix))\nprint(labels(row_dendrogram))\n```\n\n## Functions/utilities available\n\n| Function             | Description                                                                 |\n|----------------------|-----------------------------------------------------------------------------|\n| `heatmap`            | Plots base heatmap                                                          |\n| `annotation_group`   | Adds group annotation strips and grouping to the heatmap                    |\n| `annotation_tile`    | Adds tile annotation to the heatmap                                         |\n| `annotation_point`   | Adds point annotation to the heatmap                                        |\n| `annotation_bar`     | Adds bar annotation to the heatmap                                          |\n| `annotation_numeric` | Adds bar + number annotation to the heatmap                                 |\n| `annotation_line`    | Adds line annotation to the heatmap                                         |\n| `layer_text`         | Add layer of text on top of the heatmap                                     |\n| `layer_point`        | Adds layer of symbols on top of the heatmap                                 |\n| `layer_square`       | Adds layer of symbols on top of the heatmap                                 |\n| `layer_diamond`      | Adds layer of symbols on top of the heatmap                                 |\n| `layer_arrow_up`     | Adds layer of symbols on top of the heatmap                                 |\n| `layer_arrow_down`   | Add layer of symbols on top of the heatmap                                  |\n| `layer_star`         | Add layer of symbols on top of the heatmap                                  |\n| `layer_asterisk`     | Add layer of symbols on top of the heatmap                                  |\n| `split_rows`         | Splits the rows based on the dendogram                                      |\n| `split_columns`      | Splits the columns based on the dendogram                                   |\n| `get_heatmap_data`   | Retrieves matrix and dendrograms exactly as plotted                       |\n| `save_pdf`           | Saves the PDF of the heatmap                                                |\n| `+`                  | Integrate heatmaps side-by-side                                             |\n| `as_ComplexHeatmap`  | Convert the tidyHeatmap output to ComplexHeatmap for non-standard \"drawing\" |\n| `wrap_heatmap`       | Allows the integration with the `patchwork` package                         |\n\n## Installation\n\nTo install the most up-to-date version\n\n``` r\ndevtools::install_github(\"stemangiola/tidyHeatmap\")\n```\n\nTo install the most stable version (however please keep in mind that\nthis package is under a maturing lifecycle stage)\n\n``` r\ninstall.packages(\"tidyHeatmap\")\n```\n\n## Contribution\n\nIf you want to contribute to the software, report issues or problems\nwith the software or seek support please open an issue\n[here](https://github.com/stemangiola/tidyHeatmap/issues)\n\n\n","funding_links":[],"categories":["R"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstemangiola%2FtidyHeatmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstemangiola%2FtidyHeatmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstemangiola%2FtidyHeatmap/lists"}