WGCNA Labeled Heatmap
0
0
Entering edit mode
25 days ago
Anand ▴ 10

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!

heatmap wgcna • 212 views
0
Entering edit mode

I've tried quite a few permutations of the above but nothing seems to work well

did you try increasing the margin within par(mar = c(6, 8.5, 3, 3))?

0
Entering edit mode

Hi Andres. I've had to play it around with a lot longer and also tried your suggestion, finally got it to work.