Plot a correlation heatmap of top variable genes across samples.
CorrPlotHeatmap(
x,
scale,
Color,
type,
display,
round_number,
cutree_rows,
cutree_cols,
cluster,
show_names,
NumGenes
)
A "pheatmap" object representing the correlation heatmap with clustering.
Numeric matrix of log-CPM values (genes × samples), e.g., from "edgeR::cpm()".
Character. Scaling mode for the heatmap: "row", "column", or "none".
Character. Name of a continuous palette from the "paletteer" package.
Character. Correlation method passed to "Hmisc::rcorr()": "pearson", "spearman", or "kendall".
Character. Which matrix to display: "correlation" (coefficients) or "pvalue".
Integer. Number of decimal places to round displayed numbers.
Integer. Number of clusters to cut for row dendrogram.
Integer. Number of clusters to cut for column dendrogram.
Character. Clustering mode: one of "both", "row", "column", or "none".
Character. One of "both", "row", "column", or "none" to display row/column labels.
Integer. Number of top-variance genes to include in the correlation.
This function selects the highest-variance genes from a log-CPM matrix, computes pairwise correlation coefficients (or p-values) with "Hmisc::rcorr()", and renders a heatmap via "pheatmap", with options for clustering, scaling, and number display.
Compute per-gene variance and select the top "NumGenes".
Subset the matrix and compute correlations (and p-values) via "Hmisc::rcorr()".
Choose to display correlation coefficients or p-values, rounded to "round_number".
Determine clustering and label visibility from cluster and "show_names".
Render the heatmap with "pheatmap::pheatmap()", passing in custom distance, color, clustering, and "display" number settings, saving to a temporary file to suppress autosave.