WGCNA_coexprNetwork | R Documentation |
WGCNA main function.
WGCNA_coexprNetwork(
datExpr,
power,
maxBlockSize = NULL,
minModuleSize = NULL,
networkType = "signed",
mergeCutHeight = 0.2,
numericLabels = TRUE,
pamRespectsDendro = FALSE,
saveTOMs = TRUE,
corType = "bicor",
maxPOutliers = NULL,
loadTOM = TRUE,
TOMDenom = "min",
deepSplit = 1,
stabilityCriterion = "Individual fraction",
saveTOMFileBase = "blockwiseTOM",
verbose = 3,
randomSeed = 1117,
saveplot = NULL,
width = 14,
height = 7,
noplot = FALSE,
dynamicCutPlot = TRUE,
...
)
datExpr |
Expression data. A matrix (preferred) or
data frame in which columns are genes and rows ar samples. NAs are
allowed, but not too many. See |
power |
soft-thresholding power for network construction. |
maxBlockSize |
integer giving maximum block size for module detection. Ignored if |
minModuleSize |
minimum module size for module detection. See
|
networkType |
network type. Allowed values are (unique abbreviations of) |
mergeCutHeight |
dendrogram cut height for module merging. |
numericLabels |
logical: should the returned modules be labeled by colors ( |
pamRespectsDendro |
Logical, only used when |
saveTOMs |
logical: should the consensus topological overlap matrices for each block be saved and returned? |
corType |
character string specifying the correlation to be used. Allowed values are (unique
abbreviations of) |
maxPOutliers |
only used for |
loadTOM |
logical: should Topological Overlap Matrices be loaded from previously saved files ( |
TOMDenom |
a character string specifying the TOM variant to be used. Recognized values are
|
deepSplit |
integer value between 0 and 4. Provides a simplified control over how sensitive
module detection should be to module splitting, with 0 least and 4 most sensitive. See
|
stabilityCriterion |
One of |
saveTOMFileBase |
character string containing the file name base for files containing the
consensus topological overlaps. The full file names have |
verbose |
integer level of verbosity. Zero means silent, higher values make the output progressively more and more verbose. |
randomSeed |
integer to be used as seed for the random number generator before the function
starts. If a current seed exists, it is saved and restored upon exit. If |
saveplot |
Save plot to given file "a.pdf", "b.png". |
width |
Width of graphics in inches. Default 14. |
height |
Height of graphics in inches. Default 7. |
noplot |
Return construccted net object only. |
dynamicCutPlot |
Plot merged modules as well as dynamic cutted modules before merge. |
... |
Other parameters given to |
A network
maxBlockSize: Maximum allowed number of genes in one block. Default "all genes in one block". Please check http://www.peterlangfelder.com/blockwise-network-analysis-of-large-data/ for more explanations. Analyzing a set of 20,000 genes requires between 8 and 16 GB of memory; 40,000 genes would increase the requirement to 32-64 GB. A full network analysis of 500,000 genes would theoretically require some 7 TB of memory.
Quote: I emphasize that the blockwise analysis creates an approximation to the network that would result from a single block analysis. The approximation is often very good but the modules are not quite the same. If possible, I recommend running the analysis in a single block; if not, use the largest blocks your computer can handle.
mergeCutHeight The larger the less number of merged modules. Normally 0.15-0.3.
networkType: "signed" is recommended. However, number of genes in modules would also
be less for "signed" netwrok. Check WGCNA_softpower
for the detail.
corType: biweight mid-correlation (bicor) recommended.
df = generateAbundanceDF(nSample=30, nGrp=3, sd=5)
datExpr <- WGCNA_dataFilter(df)
datExpr <- WGCNA_sampleClusterDetectOutlier(datExpr)
power <- WGCNA_softpower(datExpr)
net <- WGCNA_coexprNetwork(datExpr, power)
#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)
net <- WGCNA_coexprNetwork(datExpr, power)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.