Entering edit mode
15 months ago
bioinformaticssrm2011
▴
90
This is a cross question posted in bioconductor.
I am running the WGCNA, but getting an error. As I can see that the minimum module size that I am getting is 1, but by default it should not give anything less than 30.
modules <- blockwiseModules(transcriptomics,
power = 9,
networkType = "signed",
TOMType = "signed",
corType = "bicor",
numericLabels = TRUE,
saveTOMs = save_TOM,
saveTOMFileBase = "TOM",
verbose = 3,
maxBlockSize=8000,
nThreads = 11)
rownames(modules$MEs) <- rownames(metatranscriptomics)
names(modules$colors) <- colnames(metatranscriptomics)
hubs_M <- chooseTopHubInEachModule(metatranscriptomics, modules$colors, power = 9, omitColors = "0")
Error in hubs[m] <- colnames(adj)[hub] : replacement has length zero
I checked, how many modules I got-
table(modules$colors)
0 1 2 3 4 5 6 7 8 9 10 11
60409 8629 3608 3204 1909 483 111 88 32 31 4 1
table(names(modules$colors) == colnames(metatranscriptomics))
TRUE
78509
I have looked at this post- https://bioinformatics.stackexchange.com/questions/17598/wgcna-hub-genes-error
But I can't solve this issue. Any suggestions?
You can use
intramodularConnectivity
to calculate the connectivity of genes and identity the top hub in each module (gene with the highest connectiviy).Regarding the error
Can you try to convert the module names with colors?