diff options
author | Alexander Kabui | 2021-09-14 22:42:43 +0300 |
---|---|---|
committer | Alexander Kabui | 2021-09-14 22:42:43 +0300 |
commit | 42c120dff2b3cac8a6b6546ebab9daf021aac11a (patch) | |
tree | 558f2bb6f7f8a1279d80ee2e38030e165808f9d5 | |
parent | 49fdd614d4b18f7d28126e4ebbf3adca57f0416f (diff) | |
download | genenetwork3-42c120dff2b3cac8a6b6546ebab9daf021aac11a.tar.gz |
compute the softthreshhold
-rw-r--r-- | scripts/wgcna_analysis.R | 14 |
1 files 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) + + + + + |