Learn R Programming

WGCNA (version 1.73)

pruneConsensusModules: Prune (hierarchical) consensus modules by removing genes with low eigengene-based intramodular connectivity

Description

This function prunes (hierarchical) consensus modules by removing genes with low eigengene-based intramodular connectivity (KME) and by removing modules that do not have a certain minimum number of genes with a required minimum KME.

Usage

pruneConsensusModules(  multiExpr,
  multiWeights = NULL,
  multiExpr.imputed = NULL,
  MEs = NULL,
  labels,

unassignedLabel = if (is.numeric(labels)) 0 else "grey",

networkOptions, consensusTree,

minModuleSize, minCoreKMESize = minModuleSize/3, minCoreKME = 0.5, minKMEtoStay = 0.2,

# Module eigengene calculation options impute = TRUE, collectGarbage = FALSE, checkWeights = TRUE,

verbose = 1, indent=0)

Value

The pruned module labels: a vector of the same form as the input labels.

Arguments

multiExpr

Expression data in the multi-set format (see checkSets). A vector of lists, one per set. Each set must contain a component data that contains the expression data, with rows corresponding to samples and columns to genes or probes.

multiWeights

optional observation weights in the same format (and dimensions) as multiExpr. These weights are used for correlation calculations with data in multiExpr.

multiExpr.imputed

If multiExpr contain missing data, this argument can be used to supply the expression data with missing data imputed. If not given, the impute.knn function will be used to impute the missing data.

MEs

Optional consensus module eigengenes, in multi-set format analogous to that of multiExpr.

labels

A vector (numeric, character or a factor) giving module labels for each variable (gene) in multiExpr.

unassignedLabel

The label (value in labels) that represents unassigned genes. Module of this label will not enter the module eigengene clustering and will not be merged with other modules.

networkOptions

A single list of class NetworkOptions giving options for network calculation for all of the networks, or a multiData structure containing one such list for each input data set.

consensusTree

A list of class ConsensusTree specifying the consensus calculation.

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 minModuleKMESize genes with consensus eigengene connectivity at least minCoreKME, the module is disbanded (its genes are unlabeled).

minCoreKMESize

see minCoreKME above.

minKMEtoStay

genes whose consensus eigengene connectivity to their module eigengene is lower than minKMEtoStay are removed from the module.

impute

logical: should imputation be used for module eigengene calculation? See moduleEigengenes for more details.

collectGarbage

Logical: should garbage be collected after some of the memory-intensive steps?

checkWeights

Logical: should multiWeights be checked to make sure their dimensions are concordant with multiExpr and the weights are valid?

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.

Author

Peter Langfelder