comparecor: Compare gene-gene correlation coefficients under two...

Description Usage Arguments Value Examples

Description

This function calculates correlation coefficients of all gene pairs under two conditions and compare them using Fisher's Z-transformation.

Usage

1
2
3
comparecor(exprs.1, exprs.2, r.method = c("pearson", "spearman")[1],
  q.method = c("BH", "holm", "hochberg", "hommel", "bonferroni", "BY", "fdr",
  "none")[1])

Arguments

exprs.1

a SummarizedExperiment, data frame or matrix for condition 1, with gene IDs as rownames and sample IDs as column names.

exprs.2

a SummarizedExperiment, data frame or matrix for condition 2, with gene IDs as rownames and sample IDs as column names.

r.method

a character string specifying the method to be used to calculate correlation coefficients. It is passed to the cor function of the WGCNA package.

q.method

a character string specifying the method for adjusting p values. It is passed to the p.adjust function of the stats package.

Value

a data frame containing the differences between the correlation coefficients under two consitions and their p values. It has the following columns:

Gene.1

Gene ID

Gene.2

Gene ID

cor.1

correlation coefficients under condition 1

cor.2

correlation coefficients under condition 2

cor.diff

difference between correlation coefficients under condition 2 and condition 1

p.1

p value under null hypothesis that correlation coefficient under condition 1 equals to zero

p.2

p value under null hypothesis that correlation coefficient under condition 2 equals to zero

p.diffcor

p value under null hypothesis that difference between two correlation coefficients under two conditions equals to zero using Fisher's r-to-Z transformation

q.1

adjusted p value under null hypothesis that correlation coefficient under condition 1 equals to zero

q.2

adjusted p value under null hypothesis that correlation coefficient under condition 2 equals to zero

q.diffcor

adjusted p value under null hypothesis that the difference between two correlation coefficients under two conditions equals to zero using Fisher's r-to-Z transformation

Examples

1
2
3
4
5
data(gse4158part)
allowWGCNAThreads()
res=comparecor(exprs.1 = exprs.1, exprs.2 = exprs.2, r.method = "spearman")
#The result is a data frames.
str(res)

diffcoexp documentation built on Nov. 8, 2020, 7:36 p.m.