WGCNA how to pick the soft threshold with R
0
0
Entering edit mode
8.9 years ago
madkitty ▴ 690

When following the WGCNA manual, I input the data in a data frame, and determine the soft threshold power. I get an error message when determining the soft threshold power .. which really prevents me from using WGCNA. the original matrix has 20,000 rows (genes) and 20 columns (samples).

library(WGCNA)
options(stringsAsFactors = FALSE);
enableWGCNAThreads()

myData = read.csv("my_matrix.csv");
dataExpr0 = as.data.frame(t(myData))

powers = c(c(1:10), seq(from = 12, to=20, by=2))
sft = pickSoftThreshold(dataExpr0, powerVector = powers, verbose = 5)
pickSoftThreshold: will use block size 29382.
 pickSoftThreshold: calculating connectivity for given powers...
   ..working on genes 1 through 29382 of 34688
Error in { : task 2 failed - "cannot allocate vector of size 1.9 Gb"
In addition: There were 20 warnings (use warnings() to see them)
WGCNA R • 5.1k views
ADD COMMENT
1
Entering edit mode

WGCNA is a hog when it comes to memory. I recall that there are some places where you can process things in blocks, you might see if you can do so at this stage. As is, the error is due to lack of memory.

ADD REPLY
0
Entering edit mode
Actually I decreased the dataset to half of the size, and was able to process it. Will close this post. Thanks~!
ADD REPLY
0
Entering edit mode

What kind of filters you applied to decrease the dataset ?

ADD REPLY

Login before adding your answer.

Traffic: 2455 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