diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/wgcna_analysis.R | 18 | ||||
-rw-r--r-- | scripts/wgcna_test_data.json | 3 |
2 files changed, 13 insertions, 8 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) diff --git a/scripts/wgcna_test_data.json b/scripts/wgcna_test_data.json index 7348b4e..1d469f4 100644 --- a/scripts/wgcna_test_data.json +++ b/scripts/wgcna_test_data.json @@ -1,4 +1,5 @@ { + "trait_names":["1455537_at","1425637_at","1449593_at","1421945_a_at","1450423_s_at","1423841_at","1451144_at"], "trait_sample_data":[ { "129S1/SvImJ": 7.142, @@ -61,4 +62,4 @@ "minModuleSize": 30, "corType": "pearson" -}
\ No newline at end of file +} |