aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexander Kabui2021-12-22 09:40:15 +0300
committerGitHub2021-12-22 09:40:15 +0300
commit27d54257735156ebc9d12f3ce638ea469d14e15e (patch)
treecf6ce655a8b3e8790571eec863bbec6c4cd84426 /scripts
parent65aeebd3bef1c3fe563226b1dd8222783ee405bf (diff)
downloadgenenetwork3-27d54257735156ebc9d12f3ce638ea469d14e15e.tar.gz
Refactor wgcna (#63)
* add r as a gn3 input * calculate powers from user input * fix merge conflict
Diffstat (limited to 'scripts')
-rw-r--r--scripts/wgcna_analysis.R7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/wgcna_analysis.R b/scripts/wgcna_analysis.R
index b0d25a9..d368013 100644
--- a/scripts/wgcna_analysis.R
+++ b/scripts/wgcna_analysis.R
@@ -25,6 +25,7 @@ if (length(args)==0) {
inputData <- fromJSON(file = json_file_path)
imgDir = inputData$TMPDIR
+inputData
trait_sample_data <- do.call(rbind, inputData$trait_sample_data)
@@ -51,10 +52,8 @@ names(dataExpr) = inputData$trait_names
# Allow multi-threading within WGCNA
enableWGCNAThreads()
-# choose softthreshhold (Calculate soft threshold)
-# xtodo allow users to pass args
-
-powers <- c(c(1:10), seq(from = 12, to=20, by=2))
+# powers <- c(c(1:10), seq(from = 12, to=20, by=2))
+powers <- unlist(c(inputData$SoftThresholds))
sft <- pickSoftThreshold(dataExpr, powerVector = powers, verbose = 5)
# check the power estimate