Hi all,
I do have a correlation matrix and p-value file. Could you please help how I can add p-value into the correlation file and then how to filter significant correlation based on p-value and strong correlation based on correlation value?
cor <- read.table("r.correlation.txt", sep="\t", header=T, blank.lines.skip=F, check.names=F)
head(cor)
Var1 Var2 value
1 1 G1 G1 1
2 2 G2 G1 0.312280701754386
3 3 G3 G1 0.0157894736842105
4 4 G4 G1 -0.101754385964912
5 5 G5 G1 0.0964912280701754
6 6 G6 G1 -0.40477173313538
P <- read.table("pvalues.txt", sep="\t", header=T, blank.lines.skip=F, check.names=F)
head(P)
Var1 Var2 value
1 1 G1 G1 NA
2 2 G2 G1 0.193042467797002
3 3 G3 G1 0.948846126455514
4 4 G4 G1 0.678504619638732
5 5 G5 G1 0.694348438958584
6 6 G6 G1 0.0856060025429972