WGCNA_softpower: Select soft power, the minimum number to get scale Free...

Description Usage Arguments Value Examples

View source: R/WGCNA.R

Description

Select soft power, the minimum number to get scale Free Topology Model Fit value (R2) larger than 0.85.

Usage

1
2
3
4
5
6
7
8
WGCNA_softpower(
  datExpr,
  networkType = "signed",
  saveplot = NULL,
  maxPower = NULL,
  RsquaredCut = 0.85,
  ...
)

Arguments

networkType

Default "signed". Allowed values are (unique abbreviations of) "unsigned", "signed", "signed hybrid". Correlation and distance are transformed as follows:

  1. for type = "unsigned", adjacency = |cor|^power;

  2. for type = "signed", adjacency = (0.5 * (1+cor) )^power;

  3. for type = "signed hybrid", adjacency = cor^power if cor>0 and 0 otherwise;

and for type = "distance", adjacency = (1-(dist/max(dist))^2)^power.

saveplot

Save plot to given file "a.pdf", "b.png".

maxPower

Specify maximum power to check. Default 30 for "unsigned" network and 40 for other type. Any number less than 20 would be treated as 20.

RsquaredCut

R2 for defining scale-free network (default 0.85). Any number larger than 1 would be treated as 0.99.

...

Additional parameters given to plot output (pdf, png,...) like "width", "height", .etc.

Value

A list

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
df = generateAbundanceDF(nSample=30, nGrp=3, sd=5)
datExpr <- WGCNA_dataFilter(df)
datExpr <- WGCNA_sampleClusterDetectOutlier(datExpr)
power <- WGCNA_softpower(datExpr)

#2
exprMat <- "test.file"
wgcnaL <- WGCNA_readindata(exprMat)

traitData <- 'trait.file'
wgcnaL <- WGCNA_readindata(exprMat, traitData)
datExpr <- wgcnaL$datExpr
WGCNA_dataCheck(datExpr)
datExpr <- WGCNA_dataFilter(datExpr)
datExpr <- WGCNA_sampleClusterDetectOutlier(datExpr)
#datExpr <- WGCNA_sampleClusterDetectOutlier(datExpr, traitColors=wgcnaL$traitColors)
power <- WGCNA_softpower(datExpr)

Tong-Chen/YSX documentation built on Jan. 25, 2021, 2:49 a.m.