This function calculates a correlation matrix based on gene expression per sample. By default, this function processes all gene counts per sample to calculate the corrlation matrix. This behavior can be overrided with the input of gene identifier vector. In this case, only the expression of the desired genes will be used to calculate the correlation matrix.

plotCorrelationHeatmap(object, ...)

# S4 method for bcbioRNASeq
plotCorrelationHeatmap(object, transform = "rlog",
  method = "pearson", interestingGroups, genes = NULL, samples = NULL,
  title = NULL, color = inferno(256), legendColor = viridis)

Arguments

object

Object.

...

Passthrough arguments to pheatmap::pheatmap().

transform

String specifying rlog (recommended) or vst (varianceStabilizingTransformation) DESeqTransform object slotted inside the bcbioRNASeq object.

method

Correlation coefficient (or covariance) method to be computed. Defaults to pearson but spearman can also be used. Consult the stats::cor() documentation for more information.

interestingGroups

Category to use to group samples. In the plotting functions, this will define color and shape, where applicable. If unset, this is automatically determined by the metadata set inside the bcbioRNASeq object. When set to NULL, this will default to sampleName.

genes

Optional. Character vector of specific gene identifiers to plot.

samples

Optional. Character vector of specific samples.

title

Optional. Plot title.

color

Colors to use for plot. Defaults to inferno() palette.

legendColor

Colors to use for legend labels. Defaults to viridis() palette.

Value

Graphical output only.

See also

Other Heatmaps: plotDEGHeatmap, plotHeatmap

Examples

# Pearson correlation (default) plotCorrelationHeatmap(bcb)
# Spearman correlation plotCorrelationHeatmap(bcb, method = "spearman")
# Flip the palettes used for plot and legend
# NOT RUN { plotCorrelationHeatmap( bcb, color = viridis(256), legendColor = inferno) # }
# Default pheatmap palette
# NOT RUN { plotCorrelationHeatmap( bcb, color = NULL, legendColor = NULL) # }