From b32f4ee074d55d8ab78863d4c5acc652ec9cd839 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Tue, 14 Sep 2021 23:18:18 +0300 Subject: plot plotDendroAndColors and generate png --- scripts/wgcna_analysis.R | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'scripts') diff --git a/scripts/wgcna_analysis.R b/scripts/wgcna_analysis.R index 29f0259..65ff36e 100644 --- a/scripts/wgcna_analysis.R +++ b/scripts/wgcna_analysis.R @@ -54,6 +54,24 @@ network <- blockwiseModules(dataExpr, PamRespectsDendro = FALSE ) +# plot dendro add color + +# Convert labels to colors for plotting +mergedColors = labels2colors(net$colors) +# Plot the dendrogram and the module colors underneath + + +# generate random name for png && save the image location + + + +png("WGCNAoutput.png",width=1000,height=600,type='cairo-png') + +plotDendroAndColors(network$dendrograms[[1]],mergedColors[net$blockGenes[[1]]], +"Module colors", +dendroLabels = FALSE, hang = 0.03, +addGuide = TRUE, guideHang = 0.05) + -- cgit v1.2.3