Make heatmaps of the co-expression (Spearman correlation) between pairs of selected genes in a dataset.

Usage

plotHeatmap(geneNames, emat, groupVec = NULL)

Arguments

geneNames

Vector indicating the subset of genes in the rownames of emat for which to calculate the correlations in expression.

emat

Matrix of expression values, where each row corresponds to a gene and each column corresponds to a sample. The elements of geneNames should be present in the rownames of emat.

groupVec

Optional vector indicating the group to which group each sample belongs. If not provided, the function assumes all samples belong to the same group.

Value

A ggplot object, which can be saved using ggplot2::ggsave(). Heatmap colors will be directly comparable to any heatmaps created by this function or by plotRefHeatmap().

calcCCD(), calcDeltaCCD(), plotRefHeatmap()
refCor = getRefCor()
pTest = plotHeatmap(rownames(refCor), GSE19188$emat, GSE19188$groupVec)