Quantify the similarity of gene co-expression between a reference and a test dataset. Statistical significance is calculated using permutation of the genes.
Usage
calcCCD(
refCor,
emat,
groupVec = NULL,
refEmat = NULL,
nPerm = 1000,
geneNames = NULL,
dopar = FALSE,
scale = FALSE
)Arguments
- refCor
Correlation matrix to be used as the reference, such as comes from
getRefCor(). Should contain Spearman correlation values.- emat
Matrix of expression values, where each row corresponds to a gene and each column corresponds to a sample. The rownames and colnames of
refCorshould be present in the rownames ofemat. For the p-value calculation, it is important thatematinclude all measured genes, not just those inrefCor.- 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 co-expression for the reference, with the same organization as
emat. Only used ifrefCoris not provided.- nPerm
Number of permutations for assessing statistical significance.
- geneNames
Optional vector indicating a subset of genes in
refCor,emat, and/orrefEmatto use for calculating the CCD.- dopar
Logical indicating whether to process features in parallel. Make sure to register a parallel backend first.
- scale
Logical indicating whether to scale CCD by the number of gene pairs.