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

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. 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. 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()

## Examples

if (FALSE) {
library('deltaccd')
library('doParallel')
library('doRNG')

registerDoParallel(cores = 2)
set.seed(35813)

refCor = getRefCor()
ccdResult = calcCCD(refCor, GSE19188$emat, GSE19188$groupVec, dopar = TRUE)
deltaCcdResult = calcDeltaCCD(refCor, GSE19188$emat, GSE19188$groupVec,
'non-tumor', dopar = TRUE)

pRef = plotRefHeatmap(refCor)
pTest = plotHeatmap(rownames(refCor), GSE19188$emat, GSE19188$groupVec)
}