Title: | A Tidy Implementation of Heatmap |
---|---|
Description: | This is a tidy implementation for heatmap. At the moment it is based on the (great) package 'ComplexHeatmap'. 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 %>% group_by(...). Labels size adjusted by row and column total number. Default use of Brewer and Viridis palettes. |
Authors: | Stefano Mangiola [aut, cre], Anthony Papenfuss [ctb] |
Maintainer: | Stefano Mangiola <[email protected]> |
License: | GPL-3 |
Version: | 1.10.5 |
Built: | 2024-10-31 03:38:06 UTC |
Source: | https://github.com/stemangiola/tidyheatmap |
add_annotation() takes a tbl object and easily produces a ComplexHeatmap plot, with integration with tibble and dplyr frameworks.
add_annotation( my_input_heatmap, annotation, type = rep("tile", length(quo_names(annotation))), palette_discrete = list(), palette_continuous = list(), size = NULL, ... )
add_annotation( my_input_heatmap, annotation, type = rep("tile", length(quo_names(annotation))), palette_discrete = list(), palette_continuous = list(), size = NULL, ... )
my_input_heatmap |
A 'InputHeatmap' formatted as | <SAMPLE> | <TRANSCRIPT> | <COUNT> | <...> | |
annotation |
Vector of quotes |
type |
A character vector of the set c(\"tile\", \"point\", \"bar\", \"line\") |
palette_discrete |
A list of character vectors. This is the list of palettes that will be used for horizontal and vertical discrete annotations. The discrete classification of annotations depends on the column type of your input tibble (e.g., character and factor). |
palette_continuous |
A list of character vectors. This is the list of palettes that will be used for horizontal and vertical continuous annotations. The continuous classification of annotations depends on the column type of your input tibble (e.g., integer, numerical, double). |
size |
A grid::unit object, e.g. unit(2, "cm"). This is the height or width of the annotation depending on the orientation. |
... |
The arguments that will be passed to top_annotation or left_annotation of the ComplexHeatmap container |
To be added.
A 'ComplexHeatmap' object
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
Add attribute to abject
add_attr(var, attribute, name)
add_attr(var, attribute, name)
var |
A tibble |
attribute |
An object |
name |
A character name of the attribute |
A tibble with an additional attribute
add_bar() from a 'InputHeatmap' object, adds a bar annotation layer.
add_bar() from a 'InputHeatmap' object, adds a bar annotation layer.
add_bar(.data, .column, palette = NULL, size = NULL, ...) add_bar(.data, .column, palette = NULL, size = NULL, ...) ## S4 method for signature 'InputHeatmap' add_bar(.data, .column, palette = NULL, size = NULL, ...)
add_bar(.data, .column, palette = NULL, size = NULL, ...) add_bar(.data, .column, palette = NULL, size = NULL, ...) ## S4 method for signature 'InputHeatmap' add_bar(.data, .column, palette = NULL, size = NULL, ...)
.data |
A 'tbl_df' formatted as | <ELEMENT> | <FEATURE> | <VALUE> | <...> | |
.column |
Vector of quotes |
palette |
A character vector of colors, or a function such as colorRamp2 (see examples). |
size |
A grid::unit object, e.g. unit(2, "cm"). This is the height or width of the annotation depending on the orientation. |
... |
The arguments that will be passed to top_annotation or left_annotation of the ComplexHeatmap container |
It uses 'ComplexHeatmap' as visualisation tool.
It uses 'ComplexHeatmap' as visualisation tool.
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
print("DEPRECATED") print("DEPRECATED")
print("DEPRECATED") print("DEPRECATED")
Add class to abject
add_class(var, name)
add_class(var, name)
var |
A tibble |
name |
A character name of the attribute |
A tibble with an additional attribute
add_line() from a 'InputHeatmap' object, adds a line annotation layer.
add_line(.data, .column, palette = NULL, size = NULL, ...) ## S4 method for signature 'InputHeatmap' add_line(.data, .column, palette = NULL, size = NULL, ...)
add_line(.data, .column, palette = NULL, size = NULL, ...) ## S4 method for signature 'InputHeatmap' add_line(.data, .column, palette = NULL, size = NULL, ...)
.data |
A 'tbl_df' formatted as | <ELEMENT> | <FEATURE> | <VALUE> | <...> | |
.column |
Vector of quotes |
palette |
A character vector of colors, or a function such as colorRamp2 (see examples). |
size |
A grid::unit object, e.g. unit(2, "cm"). This is the height or width of the annotation depending on the orientation. |
... |
The arguments that will be passed to top_annotation or left_annotation of the ComplexHeatmap container |
It uses 'ComplexHeatmap' as visualisation tool.
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
print("DEPRECATED")
print("DEPRECATED")
add_point() from a 'InputHeatmap' object, adds a point annotation layer.
add_point(.data, .column, palette = NULL, size = NULL, ...) ## S4 method for signature 'InputHeatmap' add_point(.data, .column, palette = NULL, size = NULL, ...)
add_point(.data, .column, palette = NULL, size = NULL, ...) ## S4 method for signature 'InputHeatmap' add_point(.data, .column, palette = NULL, size = NULL, ...)
.data |
A 'tbl_df' formatted as | <ELEMENT> | <FEATURE> | <VALUE> | <...> | |
.column |
Vector of quotes |
palette |
A character vector of colors, or a function such as colorRamp2 (see examples). |
size |
A grid::unit object, e.g. unit(2, "cm"). This is the height or width of the annotation depending on the orientation. |
... |
The arguments that will be passed to top_annotation or left_annotation of the ComplexHeatmap container |
It uses 'ComplexHeatmap' as visualisation tool.
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
print("DEPRECATED")
print("DEPRECATED")
add_tile() from a 'InputHeatmap' object, adds a tile annotation layer.
add_tile(.data, .column, palette = NULL, size = NULL, ...) ## S4 method for signature 'InputHeatmap' add_tile(.data, .column, palette = NULL, size = NULL, ...)
add_tile(.data, .column, palette = NULL, size = NULL, ...) ## S4 method for signature 'InputHeatmap' add_tile(.data, .column, palette = NULL, size = NULL, ...)
.data |
A 'tbl_df' formatted as | <ELEMENT> | <FEATURE> | <VALUE> | <...> | |
.column |
Vector of quotes |
palette |
A character vector of colors, or a function such as colorRamp2 (see examples). |
size |
A grid::unit object, e.g. unit(2, "cm"). This is the height or width of the annotation depending on the orientation. |
... |
The arguments that will be passed to top_annotation or left_annotation of the ComplexHeatmap container |
It uses 'ComplexHeatmap' as visualisation tool.
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
print("DEPRECATED")
print("DEPRECATED")
annot_to_list
annot_to_list(.data)
annot_to_list(.data)
.data |
A data frame |
A list
annotation_bar() from a 'InputHeatmap' object, adds a bar annotation layer.
annotation_bar(.data, .column, palette = NULL, size = NULL, ...) ## S4 method for signature 'InputHeatmap' annotation_bar(.data, .column, palette = NULL, size = NULL, ...)
annotation_bar(.data, .column, palette = NULL, size = NULL, ...) ## S4 method for signature 'InputHeatmap' annotation_bar(.data, .column, palette = NULL, size = NULL, ...)
.data |
A 'tbl_df' formatted as | <ELEMENT> | <FEATURE> | <VALUE> | <...> | |
.column |
Vector of quotes |
palette |
A character vector of colors, or a function such as colorRamp2 (see examples). |
size |
A grid::unit object, e.g. unit(2, "cm"). This is the height or width of the annotation depending on the orientation. |
... |
The arguments that will be passed to top_annotation or left_annotation of the ComplexHeatmap container |
It uses 'ComplexHeatmap' as visualisation tool.
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> annotation_bar(inflection)
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> annotation_bar(inflection)
annotation_line() from a 'InputHeatmap' object, adds a line annotation layer.
annotation_line(.data, .column, palette = NULL, size = NULL, ...) ## S4 method for signature 'InputHeatmap' annotation_line(.data, .column, palette = NULL, size = NULL, ...)
annotation_line(.data, .column, palette = NULL, size = NULL, ...) ## S4 method for signature 'InputHeatmap' annotation_line(.data, .column, palette = NULL, size = NULL, ...)
.data |
A 'tbl_df' formatted as | <ELEMENT> | <FEATURE> | <VALUE> | <...> | |
.column |
Vector of quotes |
palette |
A character vector of colors, or a function such as colorRamp2 (see examples). |
size |
A grid::unit object, e.g. unit(2, "cm"). This is the height or width of the annotation depending on the orientation. |
... |
The arguments that will be passed to top_annotation or left_annotation of the ComplexHeatmap container |
It uses 'ComplexHeatmap' as visualisation tool.
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> annotation_line(inflection)
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> annotation_line(inflection)
annotation_point() from a 'InputHeatmap' object, adds a point annotation layer.
annotation_point(.data, .column, palette = NULL, size = NULL, ...) ## S4 method for signature 'InputHeatmap' annotation_point(.data, .column, palette = NULL, size = NULL, ...)
annotation_point(.data, .column, palette = NULL, size = NULL, ...) ## S4 method for signature 'InputHeatmap' annotation_point(.data, .column, palette = NULL, size = NULL, ...)
.data |
A 'tbl_df' formatted as | <ELEMENT> | <FEATURE> | <VALUE> | <...> | |
.column |
Vector of quotes |
palette |
A character vector of colors, or a function such as colorRamp2 (see examples). |
size |
A grid::unit object, e.g. unit(2, "cm"). This is the height or width of the annotation depending on the orientation. |
... |
The arguments that will be passed to top_annotation or left_annotation of the ComplexHeatmap container |
It uses 'ComplexHeatmap' as visualisation tool.
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> annotation_point(inflection)
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> annotation_point(inflection)
annotation_tile() from a 'InputHeatmap' object, adds a tile annotation layer.
annotation_tile(.data, .column, palette = NULL, size = NULL, ...) ## S4 method for signature 'InputHeatmap' annotation_tile(.data, .column, palette = NULL, size = NULL, ...)
annotation_tile(.data, .column, palette = NULL, size = NULL, ...) ## S4 method for signature 'InputHeatmap' annotation_tile(.data, .column, palette = NULL, size = NULL, ...)
.data |
A 'tbl_df' formatted as | <ELEMENT> | <FEATURE> | <VALUE> | <...> | |
.column |
Vector of quotes |
palette |
A character vector of colors, or a function such as colorRamp2 (see examples). |
size |
A grid::unit object, e.g. unit(2, "cm"). This is the height or width of the annotation depending on the orientation. |
... |
The arguments that will be passed to top_annotation or left_annotation of the ComplexHeatmap container |
It uses 'ComplexHeatmap' as visualisation tool.
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> annotation_tile(CAPRA_TOTAL) hm |> annotation_tile( inflection, palette = circlize::colorRamp2(c(0, 3,10), c("white", "green", "red")) )
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> annotation_tile(CAPRA_TOTAL) hm |> annotation_tile( inflection, palette = circlize::colorRamp2(c(0, 3,10), c("white", "green", "red")) )
as_ComplexHeatmap() takes a 'InputHeatmap' object and produces a 'Heatmap' object
as_ComplexHeatmap(tidyHeatmap) ## S4 method for signature 'InputHeatmap' as_ComplexHeatmap(tidyHeatmap)
as_ComplexHeatmap(tidyHeatmap) ## S4 method for signature 'InputHeatmap' as_ComplexHeatmap(tidyHeatmap)
tidyHeatmap |
A 'InputHeatmap' object from tidyHeatmap::heatmap() call |
A 'ComplexHeatmap'
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log`, ) |> as_ComplexHeatmap()
tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log`, ) |> as_ComplexHeatmap()
Get matrix from tibble
as_matrix(tbl, rownames = NULL, do_check = TRUE)
as_matrix(tbl, rownames = NULL, do_check = TRUE)
tbl |
A tibble |
rownames |
A character string of the rownames |
do_check |
A boolean |
A matrix
Check whether there are NA counts
check_if_counts_is_na(.data, .abundance)
check_if_counts_is_na(.data, .abundance)
.data |
A tibble of read counts |
.abundance |
A character name of the read count column |
A tbl
Check whether there are duplicated genes/transcripts
check_if_duplicated_genes(.data, .sample, .transcript, .abundance)
check_if_duplicated_genes(.data, .sample, .transcript, .abundance)
.data |
A tibble of read counts |
.sample |
A character name of the sample column |
.transcript |
A character name of the transcript/gene column |
.abundance |
A character name of the read count column |
A tbl
Check whether there are NA counts
check_if_wrong_input(.data, list_input, expected_type)
check_if_wrong_input(.data, list_input, expected_type)
.data |
A tibble of read counts |
list_input |
A list |
expected_type |
A character string |
A tbl
Remove class to abject
drop_class(var, name)
drop_class(var, name)
var |
A tibble |
name |
A character name of the class |
A tibble with an additional attribute
Check whether a numeric vector has been log transformed
error_if_log_transformed(x, .abundance)
error_if_log_transformed(x, .abundance)
x |
A numeric vector |
.abundance |
A character name of the transcript/gene abundance column |
NA
Get column names either from user or from attributes
get_abundance_norm_if_exists(.data, .abundance)
get_abundance_norm_if_exists(.data, .abundance)
.data |
A tibble |
.abundance |
A character name of the abundance column |
A list of column enquo or error
Get column names either from user or from attributes
get_elements(.data, .element, of_samples = TRUE)
get_elements(.data, .element, of_samples = TRUE)
.data |
A tibble |
.element |
A character name of the sample column |
of_samples |
A boolean |
A list of column enquo or error
Get column names either from user or from attributes
get_elements_features(.data, .element, .feature, of_samples = TRUE)
get_elements_features(.data, .element, .feature, of_samples = TRUE)
.data |
A tibble |
.element |
A character name of the sample column |
.feature |
A character name of the transcript/gene column |
of_samples |
A boolean |
A list of column enquo or error
Get column names either from user or from attributes
get_elements_features_abundance( .data, .element, .feature, .abundance, of_samples = TRUE )
get_elements_features_abundance( .data, .element, .feature, .abundance, of_samples = TRUE )
.data |
A tibble |
.element |
A character name of the sample column |
.feature |
A character name of the transcript/gene column |
.abundance |
A character name of the read count column |
of_samples |
A boolean |
A list of column enquo or error
Get column names either from user or from attributes
get_sample_counts(.data, .sample, .abundance)
get_sample_counts(.data, .sample, .abundance)
.data |
A tibble |
.sample |
A character name of the sample column |
.abundance |
A character name of the read count column |
A list of column enquo or error
Get column names either from user or from attributes
get_sample_transcript(.data, .sample, .transcript)
get_sample_transcript(.data, .sample, .transcript)
.data |
A tibble |
.sample |
A character name of the sample column |
.transcript |
A character name of the transcript/gene column |
A list of column enquo or error
Get column names either from user or from attributes
get_sample_transcript_counts(.data, .sample, .transcript, .abundance)
get_sample_transcript_counts(.data, .sample, .transcript, .abundance)
.data |
A tibble |
.sample |
A character name of the sample column |
.transcript |
A character name of the transcript/gene column |
.abundance |
A character name of the read count column |
A list of column enquo or error
get_x_y_annotation_columns
get_x_y_annotation_columns(.data, .column, .row, .abundance)
get_x_y_annotation_columns(.data, .column, .row, .abundance)
.data |
A 'tbl' formatted as | <SAMPLE> | <TRANSCRIPT> | <COUNT> | <...> | |
.column |
The name of the column horizontally presented in the heatmap |
.row |
The name of the column vertically presented in the heatmap |
.abundance |
The name of the transcript/gene abundance column |
A list
heatmap() takes a tbl object and easily produces a ComplexHeatmap plot, with integration with tibble and dplyr frameworks.
heatmap( .data, .row, .column, .value, transform = NULL, scale = "none", palette_value = c("#440154FF", "#21908CFF", "#fefada"), palette_grouping = list(), .scale = NULL, ... ) heatmap_( .data, .row, .column, .value, transform = NULL, scale = "none", palette_value = c("#440154FF", "#21908CFF", "#fefada"), palette_grouping = list(), .scale = NULL, ... ) ## S4 method for signature 'tbl' heatmap( .data, .row, .column, .value, transform = NULL, scale = "none", palette_value = c("#440154FF", "#21908CFF", "#fefada"), palette_grouping = list(), .scale = NULL, ... ) ## S4 method for signature 'tbl_df' heatmap( .data, .row, .column, .value, transform = NULL, scale = "none", palette_value = c("#440154FF", "#21908CFF", "#fefada"), palette_grouping = list(), .scale = NULL, ... )
heatmap( .data, .row, .column, .value, transform = NULL, scale = "none", palette_value = c("#440154FF", "#21908CFF", "#fefada"), palette_grouping = list(), .scale = NULL, ... ) heatmap_( .data, .row, .column, .value, transform = NULL, scale = "none", palette_value = c("#440154FF", "#21908CFF", "#fefada"), palette_grouping = list(), .scale = NULL, ... ) ## S4 method for signature 'tbl' heatmap( .data, .row, .column, .value, transform = NULL, scale = "none", palette_value = c("#440154FF", "#21908CFF", "#fefada"), palette_grouping = list(), .scale = NULL, ... ) ## S4 method for signature 'tbl_df' heatmap( .data, .row, .column, .value, transform = NULL, scale = "none", palette_value = c("#440154FF", "#21908CFF", "#fefada"), palette_grouping = list(), .scale = NULL, ... )
.data |
A 'tbl_df' formatted as | <ELEMENT> | <FEATURE> | <VALUE> | <...> | |
.row |
The name of the column vertically presented in the heatmap |
.column |
The name of the column horizontally presented in the heatmap |
.value |
The name of the column for the value of the element/feature pair |
transform |
A function, used to transform .value row-wise (e.g., transform = log1p) |
scale |
A character string. Possible values are c(\"none\", \"row\", \"column\", \"both\") |
palette_value |
A character vector This is the palette that will be used as gradient for .value. For example c("red", "white", "blue"). For higher flexibility you can use circlize::colorRamp2\(c\(-2, -1, 0, 1, 2\), viridis::magma\(5\)\) |
palette_grouping |
A list of character vectors. This is the list of palettes that will be used for grouping. For example list(RColorBrewer::brewer.pal(8, "Accent")) or list(c("#B3E2CD", "#FDCDAC", "#CBD5E8")) or list(c("black", "red")) |
.scale |
DEPRECATED. please use scale instead \( with no dot prefix \). |
... |
The arguments that will be passed to the Heatmap function of ComplexHeatmap backend |
This function takes a tbl as an input and creates a 'ComplexHeatmap' plot. The information is stored in a 'InputHeatmap' object that is updated along the pipe statement, for example adding annotation layers.
A 'InputHeatmap' objects that gets evaluated to a 'ComplexHeatmap' object
A 'InputHeatmap' object
A 'InputHeatmap' object
A 'InputHeatmap' object
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
tidyHeatmap::N52 |> dplyr::group_by( `Cell type`) |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log`, )
tidyHeatmap::N52 |> dplyr::group_by( `Cell type`) |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log`, )
This is a generalisation of ifelse that accepts an object and return an objects
ifelse_pipe(.x, .p, .f1, .f2 = NULL)
ifelse_pipe(.x, .p, .f1, .f2 = NULL)
.x |
A tibble |
.p |
A boolean |
.f1 |
A function |
.f2 |
A function |
A tibble
This is a generalisation of ifelse that accepts an object and return an objects
ifelse2_pipe(.x, .p1, .p2, .f1, .f2, .f3 = NULL)
ifelse2_pipe(.x, .p1, .p2, .f1, .f2, .f3 = NULL)
.x |
A tibble |
.p1 |
A boolean |
.p2 |
ELSE IF condition |
.f1 |
A function |
.f2 |
A function |
.f3 |
A function |
A tibble
input_heatmap() takes a tbl object and easily produces a ComplexHeatmap plot, with integration with tibble and dplyr frameworks.
input_heatmap( .data, .horizontal, .vertical, .abundance, transform = NULL, scale = "none", palette_value = c("#440154FF", "#21908CFF", "#fefada"), palette_grouping = list(), ... )
input_heatmap( .data, .horizontal, .vertical, .abundance, transform = NULL, scale = "none", palette_value = c("#440154FF", "#21908CFF", "#fefada"), palette_grouping = list(), ... )
.data |
A 'tbl' formatted as | <SAMPLE> | <TRANSCRIPT> | <COUNT> | <...> | |
.horizontal |
The name of the column horizontally presented in the heatmap |
.vertical |
The name of the column vertically presented in the heatmap |
.abundance |
The name of the transcript/gene abundance column |
transform |
A function, used to transform .value, for example log1p |
scale |
A character string. Possible values are c(\"none\", \"row\", \"column\", \"both\") |
palette_value |
A character vector, or a function for higher customisation (colorRamp2). This is the palette that will be used as gradient for abundance. If palette_value is a vector of hexadecimal colours, it should have 3 values. If you want more customisation, you can pass to palette_value a function, that is derived as for example 'colorRamp2(c(-2, 0, 2), palette_value)' |
palette_grouping |
A list of character vectors. This is the list of palettes that will be used for grouping |
... |
Further arguments to be passed to ComplexHeatmap::Heatmap |
To be added.
A 'ComplexHeatmap' object
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
layer_arrow_down() from a 'InputHeatmap' object, adds a bar annotation layer.
layer_arrow_down(.data, ..., .size = NULL) ## S4 method for signature 'InputHeatmap' layer_arrow_down(.data, ..., .size = NULL)
layer_arrow_down(.data, ..., .size = NULL) ## S4 method for signature 'InputHeatmap' layer_arrow_down(.data, ..., .size = NULL)
.data |
A 'InputHeatmap' |
... |
Expressions that return a logical value, and are defined in terms of the variables in .data. If multiple expressions are included, they are combined with the & operator. Only rows for which all conditions evaluate to TRUE are kept. |
.size |
A column name or a double. The size of the elements of the layer. |
It uses 'ComplexHeatmap' as visualisation tool.
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> layer_arrow_down()
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> layer_arrow_down()
layer_arrow_up() from a 'InputHeatmap' object, adds a bar annotation layer.
layer_arrow_up(.data, ..., .size = NULL) ## S4 method for signature 'InputHeatmap' layer_arrow_up(.data, ..., .size = NULL)
layer_arrow_up(.data, ..., .size = NULL) ## S4 method for signature 'InputHeatmap' layer_arrow_up(.data, ..., .size = NULL)
.data |
A 'InputHeatmap' |
... |
Expressions that return a logical value, and are defined in terms of the variables in .data. If multiple expressions are included, they are combined with the & operator. Only rows for which all conditions evaluate to TRUE are kept. |
.size |
A column name or a double. The size of the elements of the layer. |
It uses 'ComplexHeatmap' as visualisation tool.
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> layer_arrow_up()
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> layer_arrow_up()
layer_asterisk() from a 'InputHeatmap' object, adds a symbol annotation layer over the heatmap tiles.
layer_asterisk(.data, ..., .size = NULL) ## S4 method for signature 'InputHeatmap' layer_asterisk(.data, ..., .size = NULL)
layer_asterisk(.data, ..., .size = NULL) ## S4 method for signature 'InputHeatmap' layer_asterisk(.data, ..., .size = NULL)
.data |
A 'InputHeatmap' |
... |
Expressions that return a logical value, and are defined in terms of the variables in .data. If multiple expressions are included, they are combined with the & operator. Only rows for which all conditions evaluate to TRUE are kept. |
.size |
A column name or a double. The size of the elements of the layer. |
It uses 'ComplexHeatmap' as visualisation tool.
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> layer_asterisk()
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> layer_asterisk()
layer_diamond() from a 'InputHeatmap' object, adds a bar annotation layer.
layer_diamond(.data, ..., .size = NULL) ## S4 method for signature 'InputHeatmap' layer_diamond(.data, ..., .size = NULL)
layer_diamond(.data, ..., .size = NULL) ## S4 method for signature 'InputHeatmap' layer_diamond(.data, ..., .size = NULL)
.data |
A 'InputHeatmap' |
... |
Expressions that return a logical value, and are defined in terms of the variables in .data. If multiple expressions are included, they are combined with the & operator. Only rows for which all conditions evaluate to TRUE are kept. |
.size |
A column name or a double. The size of the elements of the layer. |
It uses 'ComplexHeatmap' as visualisation tool.
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> layer_diamond()
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> layer_diamond()
layer_point() from a 'InputHeatmap' object, adds a bar annotation layer.
layer_point(.data, ..., .size = NULL) ## S4 method for signature 'InputHeatmap' layer_point(.data, ..., .size = NULL)
layer_point(.data, ..., .size = NULL) ## S4 method for signature 'InputHeatmap' layer_point(.data, ..., .size = NULL)
.data |
A 'InputHeatmap' |
... |
Expressions that return a logical value, and are defined in terms of the variables in .data. If multiple expressions are included, they are combined with the & operator. Only rows for which all conditions evaluate to TRUE are kept. |
.size |
A column name or a double. The size of the elements of the layer. |
It uses 'ComplexHeatmap' as visualisation tool.
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> layer_point()
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> layer_point()
layer_square() from a 'InputHeatmap' object, adds a bar annotation layer.
layer_square(.data, ..., .size = NULL) ## S4 method for signature 'InputHeatmap' layer_square(.data, ..., .size = NULL)
layer_square(.data, ..., .size = NULL) ## S4 method for signature 'InputHeatmap' layer_square(.data, ..., .size = NULL)
.data |
A 'InputHeatmap' |
... |
Expressions that return a logical value, and are defined in terms of the variables in .data. If multiple expressions are included, they are combined with the & operator. Only rows for which all conditions evaluate to TRUE are kept. |
.size |
A column name or a double. The size of the elements of the layer. |
It uses 'ComplexHeatmap' as visualisation tool.
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> layer_square()
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> layer_square()
layer_star() from a 'InputHeatmap' object, adds a symbol annotation layer over the heatmap tiles.
layer_star(.data, ..., .size = NULL) ## S4 method for signature 'InputHeatmap' layer_star(.data, ..., .size = NULL)
layer_star(.data, ..., .size = NULL) ## S4 method for signature 'InputHeatmap' layer_star(.data, ..., .size = NULL)
.data |
A 'InputHeatmap' |
... |
Expressions that return a logical value, and are defined in terms of the variables in .data. If multiple expressions are included, they are combined with the & operator. Only rows for which all conditions evaluate to TRUE are kept. |
.size |
A column name or a double. The size of the elements of the layer. |
It uses 'ComplexHeatmap' as visualisation tool.
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> layer_star()
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> layer_star()
layer_text() from a 'InputHeatmap' object, adds a text annotation layer.
layer_text(.data, ..., .value, .size = NULL) ## S4 method for signature 'InputHeatmap' layer_text(.data, ..., .value, .size = NULL)
layer_text(.data, ..., .value, .size = NULL) ## S4 method for signature 'InputHeatmap' layer_text(.data, ..., .value, .size = NULL)
.data |
A 'InputHeatmap' |
... |
Expressions that return a logical value, and are defined in terms of the variables in .data. If multiple expressions are included, they are combined with the & operator. Only rows for which all conditions evaluate to TRUE are kept. |
.value |
A column name or character string. |
.size |
A column name or a double. The size of the elements of the layer. |
It uses 'ComplexHeatmap' as visualisation tool.
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
library(dplyr) hm = tidyHeatmap::N52 |> mutate(my_text = "t") |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> layer_text(.value = "a") hm |> layer_text(.value = my_text)
library(dplyr) hm = tidyHeatmap::N52 |> mutate(my_text = "t") |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> layer_text(.value = "a") hm |> layer_text(.value = my_text)
Example data set N52
N52
N52
An object of class tbl_df
(inherits from tbl
, data.frame
) with 520 rows and 15 columns.
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
.formula parser
parse_formula(fm)
parse_formula(fm)
fm |
a formula |
A character vector
Example data set Pasilla
pasilla
pasilla
An object of class tbl_df
(inherits from tbl
, data.frame
) with 504 rows and 8 columns.
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
From rlang deprecated
prepend(x, values, before = 1)
prepend(x, values, before = 1)
x |
An array |
values |
An array |
before |
A boolean |
An array
Convert array of quosure (e.g. c(col_a, col_b)) into character vector
quo_names(v)
quo_names(v)
v |
A array of quosures (e.g. c(col_a, col_b)) |
A character vector
save_pdf() takes as input a Heatmap from ComplexHeatmap and save it to PDF file
save_pdf( .heatmap, filename, width = NULL, height = NULL, units = c("in", "cm", "mm") )
save_pdf( .heatmap, filename, width = NULL, height = NULL, units = c("in", "cm", "mm") )
.heatmap |
A 'Heatmap' |
filename |
A character string. The name of the output file/path |
width |
A 'double'. Plot width |
height |
A 'double'. Plot height |
units |
A character string. units ("in", "cm", or "mm") |
It simply save an 'Heatmap' to a PDF file use pdf() function in the back end
NA
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
tidyHeatmap::heatmap( dplyr::group_by(tidyHeatmap::pasilla, location, type), .column = sample, .row = symbol, .value = `count normalised adjusted`, ) |> save_pdf(tempfile())
tidyHeatmap::heatmap( dplyr::group_by(tidyHeatmap::pasilla, location, type), .column = sample, .row = symbol, .value = `count normalised adjusted`, ) |> save_pdf(tempfile())
save_pdf
## S4 method for signature 'Heatmap' save_pdf( .heatmap, filename, width = NULL, height = NULL, units = c("in", "cm", "mm") )
## S4 method for signature 'Heatmap' save_pdf( .heatmap, filename, width = NULL, height = NULL, units = c("in", "cm", "mm") )
.heatmap |
A 'Heatmap' |
filename |
A character string. The name of the output file/path |
width |
A 'double'. Plot width |
height |
A 'double'. Plot height |
units |
A character string. units ("in", "cm", or "mm") |
save_pdf
## S4 method for signature 'InputHeatmap' save_pdf( .heatmap, filename, width = NULL, height = NULL, units = c("in", "cm", "mm") )
## S4 method for signature 'InputHeatmap' save_pdf( .heatmap, filename, width = NULL, height = NULL, units = c("in", "cm", "mm") )
.heatmap |
A 'Heatmap' |
filename |
A character string. The name of the output file/path |
width |
A 'double'. Plot width |
height |
A 'double'. Plot height |
units |
A character string. units ("in", "cm", or "mm") |
Scale design matrix
scale_design(df, .formula)
scale_design(df, .formula)
df |
A tibble |
.formula |
a formula |
A tibble
Scale counts in a robust way against sd == 0
scale_robust(y)
scale_robust(y)
y |
A numerical array |
A scaled and centred numerical array
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
Sub function of remove_redundancy_elements_though_reduced_dimensions
select_closest_pairs(df)
select_closest_pairs(df)
df |
A tibble |
A tibble with pairs to drop
split_rows() from a 'InputHeatmap' object, split the row cladogram.
split_columns() from a 'InputHeatmap' object, split the column cladogram.
split_rows(.data, number_of_groups) ## S4 method for signature 'InputHeatmap' split_rows(.data, number_of_groups) split_columns(.data, number_of_groups) ## S4 method for signature 'InputHeatmap' split_columns(.data, number_of_groups)
split_rows(.data, number_of_groups) ## S4 method for signature 'InputHeatmap' split_rows(.data, number_of_groups) split_columns(.data, number_of_groups) ## S4 method for signature 'InputHeatmap' split_columns(.data, number_of_groups)
.data |
A 'InputHeatmap' |
number_of_groups |
An integer. The number of groups to split the cladogram into. |
It uses 'ComplexHeatmap' as visualisation tool.
It uses 'ComplexHeatmap' as visualisation tool.
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
A 'InputHeatmap' object that gets evaluated to a 'ComplexHeatmap'
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> split_rows(2) hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> split_columns(2)
hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> split_rows(2) hm = tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log` ) hm |> split_columns(2)
In order to add tidyHeatmap (ComplexHeatmap) element to a patchwork they can be converted to a compliant representation using the 'wrap_heatmap()' function. This allows you to position either grobs, ggplot objects, patchwork objects, or even base graphics (if passed as a formula) in either the full area, the full plotting area (anything between and including the axis label), or the panel area (only the actual area where data is drawn).
wrap_heatmap( panel = NULL, plot = NULL, full = NULL, clip = TRUE, ignore_tag = FALSE, padding = NULL ) ## S4 method for signature 'InputHeatmap' wrap_heatmap( panel = NULL, plot = NULL, full = NULL, clip = TRUE, ignore_tag = FALSE, padding = NULL )
wrap_heatmap( panel = NULL, plot = NULL, full = NULL, clip = TRUE, ignore_tag = FALSE, padding = NULL ) ## S4 method for signature 'InputHeatmap' wrap_heatmap( panel = NULL, plot = NULL, full = NULL, clip = TRUE, ignore_tag = FALSE, padding = NULL )
panel , plot , full
|
A grob, ggplot, patchwork, formula, raster, or nativeRaster object to add to the respective area. |
clip |
Should the grobs be clipped if expanding outside its area |
ignore_tag |
Should tags be ignored for this patch. This is relevant when using automatic tagging of plots and the content of the patch does not qualify for a tag. |
padding |
A grid::unit object. It defined the padding distance for the plot. It is helpful when the heatmap is assembled with other ggplots through patchwork. |
A wrapped_patch object
A wrapped_patch object
[Mangiola and Papenfuss., 2020](https://joss.theoj.org/papers/10.21105/joss.02472)
Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.
tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log`, ) |> wrap_heatmap()
tidyHeatmap::N52 |> tidyHeatmap::heatmap( .row = symbol_ct, .column = UBR, .value = `read count normalised log`, ) |> wrap_heatmap()