This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to build similarity matrix in WGCNA?

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

0 answers

No answers yet.

Log in to answer this question.