WGCNA Labeled Heatmap

Hi.

I’m trying to create a labelled heatmap of module trait relationships using the following code from the WGCNA tutorial:

png(filename = "Module-Trait Relationship.png", width = 20, height = 30, res=300, unit="cm")

par(mar = c(6, 8.5, 3, 3))

labeledHeatmap(Matrix = moduleTraitCor, xLabels = names(stressdatTraits), yLabels = names(MEs), ySymbols = names(MEs), colorLabels = FALSE, colors = blueWhiteRed(50), textMatrix = textMatrix, cex.text = 0.5, zlim = c(-1,1), main = paste("Module-trait relationships"))

dev.off()

And this works fine but the labels for the modules are partially cut off. I’ve tried quite a few permutations of the above but nothing seems to work well. It’s probably a really small edit I need to make but at this stage, i can’t see what it should be. Help!

enter image description here

Read more here: Source link