do_CorrelationHeatmap() | Feature correlation matrix

Correlation heatmaps show pairwise Pearson correlations between samples, groups, or features. Use them to identify similar or distinct populations based on their expression profiles.


Basic usage

Correlate cell populations using highly variable genes:

p <- SCpubr::do_CorrelationHeatmap(sample = sample)
p


Group by custom variable

p <- SCpubr::do_CorrelationHeatmap(sample = sample,
                                   group.by = "ID")
p


Keep diagonal

p <- SCpubr::do_CorrelationHeatmap(sample = sample,
                                   remove.diagonal = FALSE)
p


Disable clustering

p <- SCpubr::do_CorrelationHeatmap(sample = sample,
                                   cluster = FALSE)
p


Show values

p <- SCpubr::do_CorrelationHeatmap(sample = sample,
                                   values.show = TRUE,
                                   values.threshold = 0.5)
p


Parameter reference

Note

For parameters shared across many functions (color palettes, typography, legend styling, grid), see Shared features.

Core parameters

Parameter Description Default
input_gene_list Genes for correlation NULL (uses HVGs)
mode Correlation mode "hvg"
cluster Hierarchical clustering TRUE
remove.diagonal Set diagonal to NA TRUE

Values display

Parameter Description Default
values.show Show numeric values FALSE
values.size Value text size 3
values.threshold Threshold on which the text changes color NULL
values.round Decimal places 1

See also