diff options
author | Alexander Kabui | 2021-09-14 23:18:18 +0300 |
---|---|---|
committer | Alexander Kabui | 2021-09-14 23:18:18 +0300 |
commit | b32f4ee074d55d8ab78863d4c5acc652ec9cd839 (patch) | |
tree | a46021b00b1a3a3356130e0af9cbfaa68ad50725 | |
parent | 1c98a10bf5015a85b856f9e937417d51ec05d781 (diff) | |
download | genenetwork3-b32f4ee074d55d8ab78863d4c5acc652ec9cd839.tar.gz |
plot plotDendroAndColors and generate png
-rw-r--r-- | scripts/wgcna_analysis.R | 18 |
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) + |