Hi!
I'm following the WGCNA tutorials for my own dataset and things were going smoothly and detected 25 modules for my RNA-seq dataset. But when I tried to plot the cluster Dendrogram, there are only two colors, rather than 26 (25 plus cluster 0) showed up. Please help me to make the plot display correctly! The codes are as following:
> net = blockwiseModules(fm75, power = 5,
+ TOMType = "unsigned", minModuleSize = 30,
+ reassignThreshold = 0, mergeCutHeight = 0.25,
+ numericLabels = TRUE, pamRespectsDendro = FALSE,
+ saveTOMs = TRUE,
+ saveTOMFileBase = "fm75TOM",
+ verbose = 3)
Calculating module eigengenes block-wise from all genes
Flagging genes and samples with too many missing values...
..step 1
....pre-clustering genes to determine blocks..
...
mergeCloseModules: Merging modules whose distance is less than 0.25
Calculating new MEs...
> table(net$colors)
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
640 5853 2530 2190 1612 1097 768 570 359 308 298 280 277 237 203 176 136 123 112
19 20 21 22 23 24 25
111 102 77 74 64 57 49
> sizeGrWindow(12, 9)
NULL
> # Convert labels to colors for plotting
> mergedColors = labels2colors(net$colors)
> # Plot the dendrogram and the module colors underneath
> plotDendroAndColors(net$dendrograms[[1]], mergedColors[net$blockGenes[[1]]],
+ "Module colors",
+ dendroLabels = FALSE, hang = 0.03,
+ addGuide = TRUE, guideHang = 0.05)
# the plot is in the following link:
https://drive.google.com/file/d/107raMtSw7Q4TGU0Erir01fP5BtPdnS_X/view?usp=sharing
# however mergedColors seemed to show the colors of modules correctly:
> mergedColors
[1] "blue" "turquoise" "grey" "orange" "green"
[6] "turquoise" "turquoise" "brown" "red" "blue"
...
[ reached getOption("max.print") -- omitted 17303 entries ]
>
Thanks!!
Thanks for the reply! And it is indeed the problem of being broken up into several blocks, and increase the maxBlockSize made the new dendrogram displaying colors correctly -- sorry I should have noticed that!
However, this new run with increased maxBlockSize changed the number of TOM of the result: it changed from 25 (as in the first post to 10):
Is this also due to the fact that my first run was broken into four blocks and thus similar modules were not merged between different blocks?
Thanks!
My guess is that you are correct. If you want more modules, increase deepSplit to 2 or 2.5; the default is 1 and is perhaps a bit too conservative.