Entering edit mode
When I run WGCNA according to tutorial 2.c
I am stuck since this step (2.c.3: comparing single block and block-wise network analysis).
The previous auto- and step-by-step analysis worked fine exactly as the tutorial instructed. Not sure what I missed with this block-wise analysis.
1) #code chunk 5:
plotDendroAndColors(bwnet$dendrograms[[2]], bwModuleColors[bwnet$blockGenes[[2]]],
"Module colors", main = "Gene dendrogram and module colors in block 2",
dendroLabels = FALSE, hang = 0.03, addGuide = TRUE, guideHang = 0.05)
# Error in bwnet$blockGenes[[2]] : subscript out of bounds
although it was fine for blockGenes[[1]]
plotDendroAndColors(bwnet$dendrograms[[1]], bwModuleColors[bwnet$blockGenes[[1]]], "Module colors", main = "Gene dendrogram and module colors in block 2", dendroLabels = FALSE, hang = 0.03, addGuide = TRUE, guideHang = 0.05) 2) plotDendroAndColors(geneTree, cbind(moduleColors, bwModuleColors, c("Single block", "2 blocks"), main = "Single block gene dendrogram and module colors", dendroLabels = FALSE, hang = 0.03, addGuide = TRUE, guideHang = 0.05)
# Code chunk 6: Comparing the single block and block-wise network analysis Error in plotOrderedColors(dendro$order, colors = colors, rowLabels = rowLabels, : ERROR: length of colors vector not compatible with number of objects in 'order'. 3) signif(diag(cor(blockwiseMEs[, single2blockwise], singleBlockMEs)), 3) # Code chunk 8 Error in `[.data.frame`(blockwiseMEs, , single2blockwise) : undefined columns selected bwnet = blockwiseModules(datExpr, (omitted for space)) table(bwLabels) bwLabels # 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 22 24 28 30 #1848 1949 1549 912 563 450 535 401 290 417 262 77 58 49 41 50 74 43 37 38 31 36 45 net = blockwiseModules(datExpr, power = 6, ...) net ...... Block sizes: gBlocks 1 2 3 3664 3274 2957
I appreciate any advice on this.
Thanks!
Yifang
It seems like you are mixing objects from the first dendrogram with the second one. But I am unsure if the code you show us is the real one or not
Thank for the advice!
My code are real fragment. I need more work on my code before I come back soon.
Hi,
I have problem, exactly, same as you. I appreciate if you share your solution with me.
Best Regards,
Mohammad