From 42c120dff2b3cac8a6b6546ebab9daf021aac11a Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Tue, 14 Sep 2021 22:42:43 +0300 Subject: compute the softthreshhold --- scripts/wgcna_analysis.R | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/wgcna_analysis.R b/scripts/wgcna_analysis.R index 8e90d7d..cb93492 100644 --- a/scripts/wgcna_analysis.R +++ b/scripts/wgcna_analysis.R @@ -5,15 +5,12 @@ stringsAsFactors = FALSE # load expression data **assumes csv format row(traits)(columns info+samples) - wgcnaRawData <- read.csv(file = "wgcna_data.csv") # transform expressionData dataExpr <- as.data.frame(t(wgcnaRawData)); - - # data cleaning # adopted from docs @@ -32,6 +29,17 @@ printFlush(paste("Removing samples:", paste(rownames(datExpr0)[!gsg$goodSamples] dataExpr <- dataExpr[gsg$goodSamples, gsg$goodGenes] } +# network constructions and modules + +# choose softthreshhold (Calculate soft threshold if the user specified the) + +powers = c(c(1:10), seq(from = 12, to=20, by=2)) +sft = pickSoftThreshold(dataExpr, powerVector = powers, verbose = 5) + + + + + -- cgit v1.2.3