How to build similarity matrix in WGCNA?
0
0
Entering edit mode
8.9 years ago
madkitty ▴ 690

We're looking to compare 2 datasets to 3 control datasets, all of these are very large exceeding 20,000 genes. We are using WGCNA, and when reading other articles, I can't seem to find how to build similarity matrix.

  • A) I get an error message when creating the adjacency matrix, and
  • B) I do not know how to build the similarity matrix with the given formula Sij = 0.5 + 0.5 cor(i,j)

Any hint will be appreciated :)

myData = read.csv("mydata.csv");
myExpr0 = as.data.frame(t(myData))
rownames(myExpr0) = names(myData);

# Define soft power threshold, here we found that
sft = pickSoftThreshold(yanExpr0, powerVector = powers, verbose = 3)
softpower_my = 3;
adjacency <- adjacency(myExpr0, type = "signed", power = 3, corFnc = "bicor")

Warning message:
In bicor(datExpr, use = "p") : NAs introduced by coercion
r software-error wgcna matrix • 3.2k views
ADD COMMENT

Login before adding your answer.

Traffic: 3389 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6