cor2An: Correlation between two matrices

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function measures the correlation between two matrices containing the results of two decompositions.

Usage

1
2
  cor2An(mat1, mat2, lab,
    type.corr = c("pearson", "spearman"), cutoff_zval = 0)

Arguments

mat1

matrix of dimension features/genes x number of components, e.g the results of an ICA decomposition

mat2

matrix of dimension features/genes x number of components, e.g the results of an ICA decomposition

lab

The vector of labels for mat1 and mat2, e.g the the names of the two datasets on which were calculated the two decompositions

type.corr

Type of correlation, either 'pearson' or 'spearman'

cutoff_zval

cutoff_zval: 0 (default) if all genes are used to compute the correlation between the components, or a threshold to compute the correlation on the genes that have at least a scaled projection higher than cutoff_zval.

Details

Before computing the correlations, the components are scaled and restricted to common row names.

It must be taken into account by the user that if cutoff_zval is different from NULL or zero, the computation will be slowler since each pair of component is treated individually.

When cutoff_zval is specified, for each pair of components, genes that are included in the circle of center 0 and radius cutoff_zval are excluded from the computation of the correlation between the gene projection of the two components.

Value

This function returns a list consisting of:

cor

a matrix of dimensions '(nbcomp1+nbcomp2) x (nbcomp1*nbcomp2)', containing the correlation values between each pair of components,

pval

a matrix of dimension '(nbcomp1+nbcomp2) x (nbcomp1*nbcomp2)', containing the p-value of the correlation tests for each pair of components,

inter

the intersection between the features/genes of mat1 and mat2,

labAn

the labels of the compared matrices.

Author(s)

Anne Biton

See Also

rcorr, cor.test, compareAn

Examples

1
2
cor2An(mat1=matrix(rnorm(10000),nrow=1000,ncol=10), mat2=matrix(rnorm(10000),nrow=1000,ncol=10),
       lab=c("An1","An2"), type.corr="pearson")

MineICA documentation built on Nov. 8, 2020, 5:35 p.m.