From 27d54257735156ebc9d12f3ce638ea469d14e15e Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Wed, 22 Dec 2021 09:40:15 +0300 Subject: Refactor wgcna (#63) * add r as a gn3 input * calculate powers from user input * fix merge conflict--- scripts/wgcna_analysis.R | 7 +++---- 1 file 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 -- cgit v1.2.3