5 请问各位老师,WGCNA分析中没有性状数据,但分析了两份基因表达数据,我想要得到Module-module relationships的图,应该怎样修改这部分打的代码呢?

#############################relate modules to external clinical triats######################################

# Define numbers of genes and samples

nGenes = ncol(datExpr0)

nSamples = nrow(datExpr0)


moduleTraitCor = cor(MEs, datTraits, use = "p")

moduleTraitPvalue = corPvalueStudent(moduleTraitCor, nSamples)


sizeGrWindow(10,6)

#pdf(file="8_Module-trait relationships.pdf",width=10,height=6)

# Will display correlations and their p-values

textMatrix = paste(signif(moduleTraitCor, 2), "\n(",

                   signif(moduleTraitPvalue, 1), ")", sep = "")


dim(textMatrix) = dim(moduleTraitCor)

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


# Display the correlation values within a heatmap plot

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"))

#dev.off()


请先 登录 后评论

2 个回答

Daitoue

?代码是module-trait的吧,你要的是module-module?我记得课程里面有一个moudle之间的关系热图吧,类似下图:

attachments-2019-05-KgskwN6L5ce1fe1a66a7a.jpg

你仔细听听课程吧:WGCNA-加权基因共表达网络分析

请先 登录 后评论
南瓜饼

attachments-2019-05-yElgz6DE5ce28ff89a584.jpg

这样的比较

请先 登录 后评论
  • 2 关注
  • 0 收藏,5249 浏览
  • 南瓜饼 提出于 2019-05-19 20:35

相似问题