View source: R/CorrPlotHeatmaply.R
CorrPlotHeatmaply | R Documentation |
Create an interactive correlation heatmap of top variable genes using Heatmaply.
CorrPlotHeatmaply(x, Color, type, cluster, scale, show_names, NumGenes)
x |
Numeric matrix of log-CPM values (genes × samples), e.g., from "edgeR::cpm()". |
Color |
Character. Name of a continuous palette from the "paletteer" package. |
type |
Character. Correlation method passed to "Hmisc::rcorr()": "pearson", "spearman", or "kendall". |
cluster |
Character or logical. Clustering option for dendrogram: "both", "row", "column", or "none". |
scale |
Character. Scaling mode for the heatmap: "row", "column", or "none". |
show_names |
Character. One of "both", "row", "column", or "none" to display row/column labels. |
NumGenes |
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 (and p-values) with "Hmisc::rcorr()", and renders an interactive correlation heatmap via "heatmaply::heatmaply_cor()", using clustering and scaling options derived from "pheatmap" call.
Compute per-gene variance and select the top "NumGenes".
Subset the matrix and compute correlations (and p-values) via "Hmisc::rcorr()".
Generate a temporary static heatmap with "pheatmap" to extract dendrograms.
Render an interactive heatmap with "heatmaply::heatmaply_cor()", passing in color, clustering, scaling, tick-label visibility, and point size based on -log10(p-value).
A Plotly object (heatmaply) representing the interactive correlation heatmap.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.