dCorMats: Finds differential correlations between matrices.

View source: R/dCorMats.R

dCorMatsR Documentation

Finds differential correlations between matrices.

Description

Takes two corresponding correlation and nsamp matrices and returns matrices for the scaled difference in correlation as well as the p-value of that difference.

Usage

dCorMats(matA, nmatA, matB, nmatB, corr_cutoff = 0.99, corrType = "pearson",
  secondMat = FALSE, signType = "none")

Arguments

matA

Correlation matrix with numeric entries.

nmatA

Number of samples (nsamp) matrix with numeric entries, corresponding to the number of samples used for each of the correlations calculated in matA.

matB

Correlation matrix with numeric entries.

nmatB

Number of samples (nsamp) matrix with numeric entries, corresponding to the number of samples used for each of the correlations calculated in matB.

corr_cutoff

Cutoff specifying correlation values beyond which will be truncated to this value, to reduce the effect of outlier correlation values when using small sample sizes. Note that this does NOT affect the reported underlying correlation values, but does affect the z-score difference of correlation calculation.

corrType

The correlation type of the analysis, limited to "pearson" or "spearman".

secondMat

Logical indicator of whether there is a second matrix in the comparison or not. If no, then computations will only be performed the upper triangle of the input matrices.

signType

Coerce all correlation coefficients to be either positive (via "positive"), negative (via "negative"), or none (via "none"). This could be used if you think that going from a positive to a negative correlation is unlikely to occur biologically and is more likely to be due to noise, and you want to ignore these effects. Note that this does NOT affect the reported underlying correlation values, but does affect the z-score difference of correlation calculation. Default = "none", for no coercing.

Value

A list of two differential correlation matrices: one for the difference in z-scores and one for the corresponding p-values.


andymckenzie/DGCA documentation built on Sept. 15, 2023, 5:04 a.m.