pruneAndMergeConsensusModules {WGCNA} | R Documentation |
Iterative pruning and merging of (hierarchical) consensus modules
Description
This function prunes genes with low consensus eigengene-based intramodular connectivity (kME) from modules and merges modules whose consensus similarity is high. The process is repeated until the modules become stable.
Usage
pruneAndMergeConsensusModules(
multiExpr,
multiWeights = NULL,
multiExpr.imputed = NULL,
labels,
unassignedLabel = if (is.numeric(labels)) 0 else "grey",
networkOptions,
consensusTree,
# Pruning options
minModuleSize,
minCoreKMESize = minModuleSize/3,
minCoreKME = 0.5,
minKMEtoStay = 0.2,
# Module eigengene calculation and merging options
impute = TRUE,
trapErrors = FALSE,
calibrateMergingSimilarities = FALSE,
mergeCutHeight = 0.15,
# Behavior
iterate = TRUE,
collectGarbage = FALSE,
getDetails = TRUE,
verbose = 1, indent=0)
Arguments
multiExpr |
Expression data in the multi-set format (see |
multiWeights |
optional observation weights in the same format (and dimensions) as |
multiExpr.imputed |
If |
labels |
A vector (numeric, character or a factor) giving module labels for each variable (gene) in multiExpr. |
unassignedLabel |
The label (value in |
networkOptions |
A single list of class |
consensusTree |
A list of class |
minModuleSize |
Minimum number of genes in a module. Modules that have fewer genes (after trimming) will be removed (i.e., their genes will be given the unassigned label). |
minCoreKME |
a number between 0 and 1. If a detected module does not have at least
|
minCoreKMESize |
see |
minKMEtoStay |
genes whose consensus eigengene connectivity to their module eigengene is lower than
|
impute |
logical: should imputation be used for module eigengene calculation? See
|
trapErrors |
logical: should errors in calculations be trapped? |
calibrateMergingSimilarities |
Logical: should module eigengene similarities be calibrated before calculating the consensus? Although calibration is in principle desirable, the calibration methods currently available assume large data and do not work very well on eigengene similarities. |
mergeCutHeight |
Dendrogram cut height for module merging. |
iterate |
Logical: should the pruning and merging process be iterated until no changes occur? If |
collectGarbage |
Logical: should garbage be collected after some of the memory-intensive steps? |
getDetails |
Logical: should certain intermediate results be returned? These include labels and module merging information at each iteration (see return value). |
verbose |
integer level of verbosity. Zero means silent, higher values make the output progressively more and more verbose. |
indent |
indentation for diagnostic messages. Zero means no indentation, each unit adds two spaces. |
Value
If input getDetails
is FALSE
, a vector the resulting module labels. If getDetails
is
TRUE
, a list with these components:
labels |
The resulting module labels |
details |
A list. The first component, named |
Author(s)
Peter Langfelder
See Also
The underlying functions pruneConsensusModules
and hierarchicalMergeCloseModules
.