Correlation heatmap

plotCorrelationHeatmap(object, ...)

# S4 method for SummarizedExperiment
plotCorrelationHeatmap(object,
  assay = 1L, interestingGroups = NULL, method = c("pearson",
  "kendall", "spearman"), clusteringMethod = "ward.D2",
  showRownames = TRUE, showColnames = TRUE, treeheightRow = 0L,
  treeheightCol = 50L, color = getOption(x = "acid.heatmap.color",
  default = acidplots::synesthesia), legendColor = getOption(x =
  "acid.heatmap.color", default = acidplots::synesthesia),
  borderColor = NULL, title = TRUE, ...)

# S4 method for SingleCellExperiment
plotCorrelationHeatmap(object, ...)

Arguments

object

Object.

assay

vector(1). Assay name or index position.

interestingGroups

character. Groups of interest to use for visualization. Corresponds to factors describing the columns of the object.

method

character(1). Correlation coefficient (or covariance) method to be computed. Defaults to pearson, but spearman or kendall can also be used. Refer to the cor() documentation for details.

clusteringMethod

character(1). Clustering method. Accepts the same values as hclust().

showRownames

logical(1). Show row or column names.

showColnames

logical(1). Show row or column names.

treeheightRow

integer(1). Size of the row and column dendrograms. Use 0 to disable.

treeheightCol

integer(1). Size of the row and column dendrograms. Use 0 to disable.

color

function, character, or NULL. Hexadecimal color function or values to use for plot.

We generally recommend these hexadecimal functions from the viridis package, in addition to our synesthesia() palette:

Alternatively, colors can be defined manually using hexadecimal values (e.g. c("#FF0000", "#0000FF")), but this is not generally recommended. Refer to the RColorBrewer package for hexadecimal color palettes that may be suitable. If set NULL, will use the default pheatmap colors.

legendColor

function or NULL. Hexadecimal color function to use for legend labels. Note that hexadecimal values are not supported. If set NULL, will use the default pheatmap colors.

borderColor

character(1) or NULL. Border color.

title

character(1). Title.

...

Additional arguments.

Value

pheatmap.

Methods (by class)

  • SingleCellExperiment: Applies pseudobulk() calculation to average gene expression at sample level prior to plotting.
    Passes ... to SummarizedExperiment method.

Note

Updated 2019-09-15.

Examples

data( RangedSummarizedExperiment, SingleCellExperiment, package = "acidtest" ) ## SummarizedExperiment ==== object <- RangedSummarizedExperiment plotCorrelationHeatmap(object)
#> Calculating correlation matrix using 'pearson' method.
## SingleCellExperiment ==== object <- SingleCellExperiment plotCorrelationHeatmap(object)
#> Aggregating counts using 'mean()'.
#> Calculating correlation matrix using 'pearson' method.