aboutsummaryrefslogtreecommitdiff
path: root/scripts/wgcna_analysis.R
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/wgcna_analysis.R')
-rw-r--r--scripts/wgcna_analysis.R18
1 files changed, 11 insertions, 7 deletions
diff --git a/scripts/wgcna_analysis.R b/scripts/wgcna_analysis.R
index c3b1ac8..e641652 100644
--- a/scripts/wgcna_analysis.R
+++ b/scripts/wgcna_analysis.R
@@ -53,6 +53,8 @@ dataExpr <- dataExpr[gsg$goodSamples, gsg$goodGenes]
## network constructions and modules
+names(dataExpr) = inputData$trait_names
+
# Allow multi-threading within WGCNA
enableWGCNAThreads()
@@ -82,6 +84,7 @@ network <- blockwiseModules(dataExpr,
TOMtype = TOMtype,
#module indentification
+ verbose = 3,
minmodulesSize = minModuleSize,
deepSplit = 3,
@@ -108,13 +111,14 @@ dendroLabels = FALSE, hang = 0.03,
addGuide = TRUE, guideHang = 0.05)
-
-
-json_data <- list(input = inputData,output = list(ModEigens=network$MEs,soft_threshold=sft$fitIndices,
- blockGenes =network$blockGenes[[1]],
- net_colors =network$colors,
- net_unmerged=network$unmergedColors,
- imageLoc=imageLoc))
+json_data <- list(input = inputData,
+ output = list(ModEigens=network$MEs,
+ soft_threshold=sft$fitIndices,
+ blockGenes =network$blockGenes[[1]],
+ net_colors =network$colors,
+ power_used_for_analy=powerEst,
+ net_unmerged=network$unmergedColors,
+ imageLoc=imageLoc))
json_data <- toJSON(json_data)