Entering edit mode
5.0 years ago
mbk0asis
▴
700
Hi.
I'm running WGCNA to find consensus modules between two experiments.
I'm stuck at 'plotDendroAndColor' step due to the mismatch of the number of 'consTree' and 'moduleColors' as shown below. As a result, the plot showed only the dendrogram but no colored modules.
> length(moduleColors)
[1] 17459
>consTree
Call:
fastcluster::hclust(d = consTomDS, method = "average")
Cluster method : average
Number of objects: 17398
I set the maxBlockSize=30000 to contain all the object in a single cluster, but still some of the objects seemed to be gone after running 'blockwiseConsensusModules'.
> net = blockwiseConsensusModules(
multiExpr, power = 6, minModuleSize = 30, deepSplit = 2,
pamRespectsDendro = FALSE, maxBlockSize=30000,
mergeCutHeight = 0.25, numericLabels = TRUE,
minKMEtoStay = 0,
saveTOMs = TRUE, verbose = 5)
> consMEs = net$multiMEs;
> moduleLabels = net$colors;
> moduleColors = labels2colors(moduleLabels)
> consTree = net$dendrograms[[1]];
> plotDendroAndColors(consTree, moduleColors,
"Module colors",
dendroLabels = FALSE, hang = 0.03,
addGuide = TRUE, guideHang = 0.05,
main = "Consensus gene dendrogram and module colors")
Can anyone help me to solve this?
Thank you!