Quantify the similarity of gene coexpression between a reference and a test dataset. Statistical significance is calculated using permutation of the genes.
calcCCD( refCor, emat, groupVec = NULL, refEmat = NULL, nPerm = 1000, geneNames = NULL, dopar = FALSE )
refCor  Correlation matrix to be used as the reference, such as comes
from 

emat  Matrix of expression values, where each row corresponds to a
gene and each column corresponds to a sample. The rownames and colnames of

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. 
refEmat  Optional expression matrix for calculating coexpression for
the reference, with the same organization as 
nPerm  Number of permutations for assessing statistical significance. 
geneNames  Optional vector indicating a subset of genes in 
dopar  Logical indicating whether to process features in parallel. Make sure to register a parallel backend first. 
A data frame with columns for group name, CCD, and pvalue.
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, 'nontumor', dopar = TRUE) pRef = plotRefHeatmap(refCor) pTest = plotHeatmap(rownames(refCor), GSE19188$emat, GSE19188$groupVec) }