Question: Error running TOMplot in WGCNA package
0
gravatar for Jon Bråte
5.1 years ago by
Jon Bråte160
Norway
Jon Bråte160 wrote:

Hi,

This question may not be related to bioconductor, but I get an error running TOMplot in the WGCNA package. I got the heatmap and the color bars, but the dendrograms on the sides did not finish:

> TOMplot(plotTOM, geneTree, moduleColors, main = "Network heatmap plot, all genes")
Error in structure(NextMethod("[["), class = "dendrogram") :
  node stack overflow
Error during wrapup: node stack overflow
Error in dev.flush() : node stack overflow
Error during wrapup: node stack overflow

> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] WGCNA_1.41-1        flashClust_1.01-2   dynamicTreeCut_1.62 impute_1.38.1      

loaded via a namespace (and not attached):
 [1] Formula_1.1-2       Hmisc_3.14-4        R.methodsS3_1.6.1   RColorBrewer_1.0-5
 [5] Rcpp_0.11.2         cluster_1.15.3      codetools_0.2-9     doParallel_1.0.8   
 [9] foreach_1.4.2       grid_3.1.0          iterators_1.0.7     lattice_0.20-29    
[13] latticeExtra_0.6-26 matrixStats_0.10.0  parallel_3.1.0      plyr_1.8.1         
[17] reshape_0.8.5       splines_3.1.0       survival_2.37-7     tools_3.1.0   
network wgcna • 2.5k views
ADD COMMENTlink modified 5.1 years ago by Keith Hughitt120 • written 5.1 years ago by Jon Bråte160

I've never used the WGCNA, but I'm curious if you can try reducing the size of your dataset and replotting it to see if you get the same errors?

ADD REPLYlink written 5.1 years ago by Steve Lianoglou12k

I think you're right that it has to do with the size of the dataset. I have about 4400 genes. Will try to reduce it. Thanks.

ADD REPLYlink written 5.1 years ago by Jon Bråte160
Answer: Error running TOMplot in WGCNA package
1
gravatar for Peter Langfelder
5.1 years ago by
United States
Peter Langfelder2.3k wrote:

How big is the data set (how many genes)? Is it bigger than options("expressions")? If so, try running options(expressions = 50000) or some number bigger than the number of columns in the TOM matrix you are trying to plot.

The underlying problem is that plot.dendrogram is written recursively and needs (roughly) as many recursions as there are nodes to plot (number of genes in your TOM).

Be aware though that TOMplot is very slow with large matrices, it may take up to several hours to plot the heatmap, which is due to some inefficiency in the heatmap function.

HTH,

Peter

 

ADD COMMENTlink written 5.1 years ago by Peter Langfelder2.3k

Thanks! I'm testing this right now. I have about 4400 genes in my TOM, and yes, it took about 2 hours to plot the heatmap.

Edit: I still get the same error. And plotting only the dendrogram works fine, so maybe it is something with memory usage and plotting the heatmap that creates problems?

ADD REPLYlink modified 5.1 years ago • written 5.1 years ago by Jon Bråte160

Hi Peter,

I've been getting the same node stack overflow error when plotting the TOM. I'm using 20,000 genes in the TOM, I don't think its the issue with memory of the system since I'm running it on 250 gb RAM machine. Here's the error I'm getting it.

Error in structure(r, class = "dendrogram") : node stack overflow

Calls: TOMplot ... rev.dendrogram -> rev -> [[ -> [[.dendrogram -> structure

Execution halted Error in (function (e) : node stack overflow

I did try this hack mentioned by Gregory in the post on stack overflow (https://stackoverflow.com/questions/16559250/error-in-heatmap-2-gplots) as @keith Hughitt suggested but it gives the same error even when I fix the (expression = 50000). I want to include all the 20000 genes in my analysis. Does this have to anything with version of R I'm using? I ran the script on R v3.2.2. Can you please help me on how to fix this error. 

ADD REPLYlink modified 2.2 years ago • written 2.2 years ago by chetana.vr6290
Answer: Error running TOMplot in WGCNA package
1
gravatar for Keith Hughitt
5.1 years ago by
Keith Hughitt120
United States
Keith Hughitt120 wrote:

There is an explanation and work-around for dealing with the same issue for `heatmap.2` from the `gplots` library. It might be worth a shot in your case. If it does help, please give credit to the original poster on SO.

ADD COMMENTlink modified 5.1 years ago • written 5.1 years ago by Keith Hughitt120
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 205 users visited in the last hour