WGCNA error on block number related.
0
0
Entering edit mode
yifangt ▴ 20
@yifangt-9770
Last seen 6.0 years ago
Canada/NRC

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

WGCNA block size subscript out of bounds • 3.1k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Thank for the advice!
My code are real fragment. I need more work on my code before I come back soon.

ADD REPLY
0
Entering edit mode

Hi,

I have problem, exactly, same as you. I appreciate if you share your solution with me.

Best Regards,

Mohammad

ADD REPLY

Login before adding your answer.

Traffic: 464 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6