A GPU-accelerated heatmap for large expression matrices (samples x genes).
The matrix is uploaded to the GPU as a single texture and colormapped in a
fragment shader (via regl), so matrices with a million or more cells pan
and zoom smoothly. The colorbar legend and row/column tick labels are drawn
as crisp vector overlays; ticks appear only when few enough to be legible.
Usage
bioheatmap(
mat,
colormap = c("viridis", "rdbu"),
z_score = FALSE,
vmin = NULL,
vmax = NULL,
show_colorbar = TRUE,
theme = NULL,
width = NULL,
height = NULL,
element_id = NULL
)
heatmap_plotomics(
mat,
colormap = c("viridis", "rdbu"),
z_score = FALSE,
vmin = NULL,
vmax = NULL,
show_colorbar = TRUE,
theme = NULL,
width = NULL,
height = NULL,
element_id = NULL
)Arguments
- mat
A numeric matrix (rows x columns).
rownames(mat)andcolnames(mat), when present, are used as row/column tick labels.- colormap
Color ramp:
"viridis"(sequential) or"rdbu"(diverging).- z_score
Logical; if
TRUE, each row is z-score normalized before coloring (a row-centered heatmap).- vmin, vmax
Lower/upper clamp of the color domain.
NULL(the default) auto-scales from the data; for"rdbu"the auto domain is symmetric about zero.- show_colorbar
Logical; draw the colorbar legend.
- theme
Optional named list of theme overrides (colors, fonts, ...) merged over the component defaults in the browser.
NULLuses the default theme.- width, height
Widget dimensions (any valid CSS size).
- element_id
Optional explicit DOM id.
Details
The function is exported as bioheatmap() (and aliased as heatmap_plotomics())
to avoid masking stats::heatmap().