A review of WGCNA (1.23-1)

5

WGCNA: Combining block-wise dendrograms and m

Hello fellow R users,

I am currently learning to use R, so please forgive me if there is an obvious explanation for the following problem. My goal is to perform WGCNA on a dataset of 19776 genes, so I opted to follow the block-wise network construction (Section 2c) in the WGCNA R Tutorial by Peter Langfelder and Steve Horvath.

I ended up with 10 blocks and am able to plot the dendrograms and module colors for each block, but I am having trouble grouping all of the blocks together for a single dendrogram/module color figure. On page 4 of section 2c in the WGCNA tutorial, the single-block network construction workspace is loaded and it contains a variable called ‘geneTree’. geneTree references block 1 of the single-block network construction, which encompasses the entire dendrogram.

geneTree = net$dendrograms1

The problem here is that I cannot perform single-block construction because I do not have enough RAM, so I do not know how to reproduce the complete dendrogram using the blocks that I am currently working with. If I had simply reused the same definition for geneTree using the block-wise network, it would simply print block 1 out of 10 blocks (I have already tried this).

Session Information:

R version 2.15.1 (2012-06-22) Platform: i386-pc-mingw32/i386 (32-bit)

locale: 1 LC_COLLATE=English_United States.1252 2 LC_CTYPE=English_United States.1252
3 LC_MONETARY=English_United States.1252 4 LC_NUMERIC=C
5 LC_TIME=English_United States.1252

attached base packages: 1 splines stats graphics grDevices utils datasets methods
8 base

other attached packages: 1 WGCNA_1.23-1 MASS_7.3-18 reshape_0.8.4
4 plyr_1.7.1 cluster_1.14.2 Hmisc_3.9-3
7 survival_2.36-14 flashClust_1.01-2 dynamicTreeCut_1.21 10 impute_1.32.0

loaded via a namespace (and not attached): 1 grid_2.15.1 lattice_0.20-6

I have tried several methods for compiling the separate dendrograms together for the complete figure:

Input:

plotDendroAndColors(bwnet$dendrograms1:10, bwModuleColorsbwnet$blockGenes1:10, "Module colors", dendroLabels = FALSE, hang = 0.03, addGuide = TRUE, guideHang = 0.05)

Above, ‘bwnew$dendrogramsx’ is equivalent to the parameter specified by ‘geneTree’, but must be changed each time to plot blocks 1-10

In addition, bwModuleColorsbwnet$blockGenesx should be changed with the parameters for the geneTree equivalent

Output:

"Error in bwnet$blockGenes1:10 : recursive indexing failed at level 2"

Input:

Same as above, changing bwnet$dendrograms1:10 to bwnet$dendrograms1:10 and bwModuleColorsbwnet$blockGenes1:10 to bwModuleColorsbwnet$blockGenes1:10

Output:

"Error in bwModuleColorsbwnet$blockGenes1:10 : invalid subscript type ‘list’ "

Input:

Same as above, but changed bwModuleColorsbwnet$blockGenes1:10 back to bwModuleColorsbwnet$blockGenes1:10

Output:

"Error in bwnet$blockGenes1:10 : recursive indexing failed at level 2"

Any of these examples could be replicated straight from the tutorial using the mouse data and trying to combine block 1 and block 2 without loading and referencing the auto-network construction workspace.

Thank you very much for your time and input,

~Derek