Merge close modules of gene expression data.
Merges modules in gene expression networks that are too close as measured by the correlation of their eigengenes.
mergeCloseModules(exprData, colors, cutHeight = 0.2, MEs = NULL, impute = TRUE, useAbs = FALSE, iterate = TRUE, relabel = FALSE, colorSeq = NULL, getNewMEs = TRUE, getNewUnassdME = TRUE, useSets = NULL, checkDataFormat = TRUE, unassdColor = ifelse(is.numeric(colors), 0, "grey"), trapErrors = FALSE, verbose = 1, indent = 0)
exprData |
Expression data, either a single data frame with rows corresponding to samples and
columns to genes, or in a multi-set format (see |
colors |
A vector (numeric, character or a factor) giving module colors for genes. The method only makes sense when genes have the same color label in all sets, hence a single vector. |
cutHeight |
Maximum dissimilarity (i.e., 1-correlation) that qualifies modules for merging. |
MEs |
If module eigengenes have been calculated before, the user can save some computational time
by inputting them. |
impute |
Should missing values be imputed in eigengene calculation? If imputation is disabled, the
presence of |
useAbs |
Specifies whether absolute value of correlation or plain correlation (of module eigengenes) should be used in calculating module dissimilarity. |
iterate |
Controls whether the merging procedure should be repeated until there is no change. If FALSE, only one iteration will be executed. |
relabel |
Controls whether, after merging, color labels should be ordered by module size. |
colorSeq |
Color labels to be used for relabeling. Defaults to the standard color order used
in this package if |
getNewMEs |
Controls whether module eigengenes of merged modules should be calculated and returned. |
getNewUnassdME |
When doing module eigengene manipulations, the function does not normally
calculate the eigengene of the 'module' of unassigned ('grey') genes. Setting this option to
|
useSets |
A vector of scalar allowing the user to specify which sets will be used to calculate the consensus dissimilarity of module eigengenes. Defaults to all given sets. |
checkDataFormat |
If TRUE, the function will check |
unassdColor |
Specifies the string that labels unassigned genes. Module of this color will not enter the module eigengene clustering and will not be merged with other modules. |
trapErrors |
Controls whether computational errors in calculating module eigengenes, their
dissimilarity, and merging trees should be trapped. If |
verbose |
Controls verbosity of printed progress messages. 0 means silent, up to (about) 5 the verbosity gradually increases. |
indent |
A single non-negative integer controlling indentation of printed messages. 0 means no indentation, each unit above that adds two spaces. |
This function returns the color labels for modules that are obtained from the input modules by merging
ones that are closely related. The relationships are quantified by correlations of module eigengenes; a
“consensus” measure is defined as the minimum over the corresponding relationship in each set. Once the
(dis-)similarity is calculated, average linkage hierarchical clustering of the module eigengenes is
performed, the dendrogram is cut at the height cutHeight
and modules on each branch are merged.
The process is (optionally) repeated until no more modules are merged.
If, for a particular module, the module eigengene calculation fails, a hubgene approximation will be used.
The user should be aware that if a computational error occurs and trapErrors==TRUE
,
the returned list (see below) will not contain all of the components returned upon normal execution.
If no errors occurred, a list with components
colors |
Color labels for the genes corresponding to merged modules. The function attempts to
mimic the mode of the input |
dendro |
Hierarchical clustering dendrogram (average linkage) of the eigengenes of the most
recently computed tree. If |
oldDendro |
Hierarchical clustering dendrogram (average linkage) of the eigengenes of the original modules. |
cutHeight |
The input cutHeight. |
oldMEs |
Module eigengenes of the original modules in the sets given by |
newMEs |
Module eigengenes of the merged modules in the sets given by |
allOK |
A boolean set to |
If an error occurred and trapErrors==TRUE
, the list only contains these components:
colors |
A copy of the input colors. |
allOK |
a boolean set to |
Peter Langfelder, Peter.Langfelder@gmail.com
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.