QSG-Group / WISH

5 stars 3 forks source link

Error in generate.modules and a couple of other fixes #6

Open josieparis opened 4 years ago

josieparis commented 4 years ago

Hi guys,

thanks for a cool software! Looking forward to using it on my real data. Am just trying to run the functions through the test data, and have made it nearly to the end but I'm getting bugged out at the generate.modules function:

Error in seq.default(from = min(k), to = max(k), length = nBreaks + 1) : 
  'from' must be a finite number
Called from: seq.default(from = min(k), to = max(k), length = nBreaks + 1)

But does print:

Allowing multi-threading with up to 4 threads.
pickSoftThreshold: will use block size 1103.
 pickSoftThreshold: calculating connectivity for given powers...
   ..working on genes 1 through 1103 of 1103
    Power SFT.R.sq   slope truncated.R.sq mean.k. median.k. max.k.
1     1.0 0.000115  0.0622        0.99400 111.000  1.11e+02 151.00
2     1.1 0.001820 -0.2260        0.99600  91.200  9.11e+01 128.00
3     1.2 0.007150 -0.4100        0.99100  75.300  7.51e+01 109.00
4     1.3 0.005280 -0.3220        0.98700  62.500  6.22e+01  93.00

I'm assuming that's why you have these catches in place (avoid NAs and other non-finites)

correlations$Coefficients[(is.na(correlations$Coefficients))]<-0
correlations$Pvalues[(is.na(correlations$Pvalues))]<-1

(I also sanity checked k, where k=correlations$Coefficients and performed various filters of this as in the top of the generate.modules function). I can print min(k), and it's a finite value, so not that

So I delved into the function for pickSoftThreshold and found that min(k) isn't in the function either. I can't actually find where the for loop is and why min(k) isn't being read as finite.

Any suggestions?!

Thanks!

Also, I'm running R v4.0 and found these few things too in the WISH functions: changing .inorder=T to .inorder=TRUE changing enableWGCNAThreads() to allowWGCNAThreads()

Palash63 commented 4 years ago

Hey Josieparis, I am not sure however I might have this issue with my dataset too. I used thread = 2. Mine is working after that. What I did Once I generate the epistatic correlation matrix using the WISH package, I use that in the Original WGCNA package to generate soft threshold and module. I checked with the inner function. They have similar functionality. I might be wrong but so far working with no issue. Also, instead of here, try to contact with the author from the WISH package manuscript. He helped me to resolve my previous issue. Thanks.

josieparis commented 4 years ago

Thanks Palash! I'll try what you said and if no luck I'll email the authors.

Josie