HeatmapExp | R Documentation |
Plot a heatmap of the top variable genes across samples.
HeatmapExp(
x,
ColorPanel,
scale,
cutree_rows,
cutree_cols,
cluster,
show_names,
NumGenes
)
x |
Numeric matrix of log-CPM values (genes × samples), e.g., from edgeR::cpm(). |
ColorPanel |
Character. Name of a continuous palette from the paletteer package. |
scale |
Character. Scaling mode for heatmap: "row", "column", or "none". |
cutree_rows |
Integer. Number of clusters for rows (genes). |
cutree_cols |
Integer. Number of clusters for columns (samples). |
cluster |
Character. One of "both", "row", "column", or "none" to specify clustering. |
show_names |
Character. One of "both", "row", "column", or "none" to show row/col names. |
NumGenes |
Integer. Number of top-variance genes to include in the heatmap. |
This function selects the highest-variance genes from a log-CPM matrix, transposes the data, and renders a heatmap with customizable clustering, scaling, and color palettes using pheatmap.
Compute per-gene variance and select the top "NumGenes".
Transpose the subsetted matrix so samples are rows.
Apply the specified color palette (n = 50) via paletteer::paletteer_c().
Determine clustering and name-display options from "cluster" and "show_names".
Render the heatmap with "pheatmap::pheatmap()", saving to a temporary file to suppress autosave.
A "pheatmap" object containing the heatmap and clustering information.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.