aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexander Kabui2021-09-14 22:49:43 +0300
committerAlexander Kabui2021-09-14 22:49:43 +0300
commit1c98a10bf5015a85b856f9e937417d51ec05d781 (patch)
treee6cb57a5ef8bc0e7e7e69be1421c5a5856e3109f /scripts
parent42c120dff2b3cac8a6b6546ebab9daf021aac11a (diff)
downloadgenenetwork3-1c98a10bf5015a85b856f9e937417d51ec05d781.tar.gz
construct gene co-expression network & module detection
Diffstat (limited to 'scripts')
-rw-r--r--scripts/wgcna_analysis.R23
1 files 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
+ )