Entering edit mode
12 months ago
fluentin44
▴
20
Hi,
I'm using the below code in a WGCNA worfkflow
# memory estimate w.r.t blocksize
bwnet <- blockwiseModules(norm.counts,
maxBlockSize = 14000, # Genes included in one block
TOMType = "signed",
power = soft_power,
mergeCutHeight = 0.25, # Threshold to merge modules Equates to 75% similarity - go and check
numericLabels = FALSE, # Sets module eigengene labels to be names of colours instead of numbers
randomSeed = 1234,
saveTOMs = TRUE,
saveTOMFileBase = "./",
verbose = 3)
and making the subsequent dendrogram.
# Plot the dendrogram and the module colors before and after merging underneath
plotDendroAndColors(bwnet$dendrograms[[1]], cbind(bwnet$unmergedColors, bwnet$colors),
c("unmerged", "merged"),
dendroLabels = FALSE,
addGuide = TRUE,
hang= 0.03,
guideHang = 0.05)
when I plot bwnet$unmergedColors
, bwnet$colors
as above, which I understood to be the unmerged and merged modules I get a dendrogram looking like the below which shows a reasonable merge
However when using the labels2colors function as suggested in the WGCNA tutorial I get a far more dramatic change when plotting out?
mergedColors <- labels2colors(bwnet$colors)
# Plot the dendrogram and the module colors before and after merging underneath
plotDendroAndColors(bwnet$dendrograms[[1]], cbind(bwnet$unmergedColors, mergedColors[bwnet$blockGenes[[1]]]),
c("unmerged", "merged"),
dendroLabels = FALSE,
addGuide = TRUE,
hang= 0.03,
guideHang = 0.05)
Would anyone be able to tell me:
- Which are the merged modules I should be using?
- What is the purpose of
labels2colors
if theblockwiseModules
function I used specifiednumericLabels = FALSE
?
Thanks,
Matt
I don't really understand what is going on here. It seems that
just changed the colors of the merged Modules -> eg
gray to black
orturquoise to midnightblue
etc.In terms of gene content they are the same. I would go with the first set of merged modules because the "grey" color is typically used for the unassigned genes.
update: After looking at the
blockwiseModules
function it seems that thenumericLabels
argument is bypassed by default when performing the merging module step.Apologies for neglecting - followed the manual method in the end and wored great.
Thanks, Matt