From 1c98a10bf5015a85b856f9e937417d51ec05d781 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Tue, 14 Sep 2021 22:49:43 +0300 Subject: construct gene co-expression network & module detection --- scripts/wgcna_analysis.R | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/scripts/wgcna_analysis.R b/scripts/wgcna_analysis.R index cb93492..29f0259 100644 --- a/scripts/wgcna_analysis.R +++ b/scripts/wgcna_analysis.R @@ -33,9 +33,26 @@ dataExpr <- dataExpr[gsg$goodSamples, gsg$goodGenes] # 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) - +powers <- c(c(1:10), seq(from = 12, to=20, by=2)) +sft <- pickSoftThreshold(dataExpr, powerVector = powers, verbose = 5) + +# pass user options +network <- blockwiseModules(dataExpr, + #similarity matrix options + corType = "pearson", + #adjacency matrix options + + power = sft$powerEstimate, + networkType = "unsigned", + #TOM options + TOMtype = "unsigned", + + #module indentification + + minmodulesSize = 30, + deepSplit = 5, + PamRespectsDendro = FALSE + ) -- cgit v1.2.3