Hi,
I have working with the following code from Peter Langfelder’s tutorial, it’s about module-trait association in WGCNA but I have a doubt about the heatmap. When we run the following code from Peter Lagnfelder’s tutorial, we can put Matrix = moduleTraitPvalue instead Matrix = moduleTraitCor?
This is the tutorial's code:
nGenes = ncol(datExpr)
nSamples = nrow(datExpr)
MEs0 = moduleEigengenes(datExpr, moduleColors)$eigengenes
MEs = orderMEs(MEs0)
moduleTraitCor = cor(MEs, datTraits, use = "p")
moduleTraitPvalue = corPvalueStudent(moduleTraitCor, nSamples)
textMatrix = paste(signif(moduleTraitCor, 2), "\n(",
signif(moduleTraitPvalue, 1), ")", sep = "")
dim(textMatrix) = dim(moduleTraitCor)
par(mar = c(6, 8.5, 3, 3))
labeledHeatmap(Matrix = moduleTraitCor,
xLabels = names(datTraits),
yLabels = names(MEs),
ySymbols = names(MEs),
colorLabels = FALSE,
colors = greenWhiteRed(50),
textMatrix = textMatrix,
setStdMargins = FALSE,
cex.text = 0.5,
zlim = c(-1,1),
main = paste("Module-trait relationships"))
If I put Matrix=moduleTraitPvalue can I interpretate my results as correct? Can I work with the moduleTraitPvalue?
Thanks,
Silvia
wgcna
heatmap
module-trait association