aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexander Kabui2021-09-14 23:18:18 +0300
committerAlexander Kabui2021-09-14 23:18:18 +0300
commitb32f4ee074d55d8ab78863d4c5acc652ec9cd839 (patch)
treea46021b00b1a3a3356130e0af9cbfaa68ad50725 /scripts
parent1c98a10bf5015a85b856f9e937417d51ec05d781 (diff)
downloadgenenetwork3-b32f4ee074d55d8ab78863d4c5acc652ec9cd839.tar.gz
plot plotDendroAndColors and generate png
Diffstat (limited to 'scripts')
-rw-r--r--scripts/wgcna_analysis.R18
1 files changed, 18 insertions, 0 deletions
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)
+