WGCNA convenience function
0
0
Entering edit mode
5 months ago
fluentin44 • 0

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

version1

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)

version2

Would anyone be able to tell me:

  • Which are the merged modules I should be using?
  • What is the purpose of labels2colors if the blockwiseModules function I used specified numericLabels = FALSE?

Thanks,
Matt

WGCNA • 411 views
ADD COMMENT
1
Entering edit mode

I don't really understand what is going on here. It seems that

mergedColors <- labels2colors(bwnet$colors)

just changed the colors of the merged Modules -> eg gray to black or turquoise to midnightblue etc.

Which are the merged modules I should be using?

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.

What is the purpose of labels2colors if the blockwiseModules function I used specified numericLabels = FALSE?


update: After looking at the blockwiseModules function it seems that the numericLabels argument is bypassed by default when performing the merging module step.

ADD REPLY
0
Entering edit mode

Apologies for neglecting - followed the manual method in the end and wored great.

Thanks, Matt

ADD REPLY

Login before adding your answer.

Traffic: 1750 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