source
and reference
vectors of module labels, the function produces a module
labeling that is equivalent to source
, but individual modules are re-labeled so that modules with
significant overlap in source
and reference
have the same labels.matchLabels(source,
reference,
pThreshold = 5e-2,
na.rm = TRUE,
ignoreLabels = if (is.numeric(reference)) 0 else "grey",
extraLabels = if (is.numeric(reference)) c(1:1000) else standardColors()
)
source
or reference
be removed? If
not, missing values may be treated as a standard label or the function may throw an error
(exact behaviour depends on whether the input labels
are numersource
and reference
to be considered unmatchable. These
labels are excluded from the re-labeling procedure.source
that cannot be matched to any modules
in reference
. The user should ensure that this vector contains enough labels since the function
automatically removes a values that occur in either source
labels are a vector) or a matrix (if the input source
labels are a matrix) of the new labels.source
is treated separately. Unlike in previous version of this function, source
and reference labels can be any labels, not necessarily of the same type. The function calculates the overlap of the source
and reference
modules using Fisher's
exact test. It then attempts to relabel source
modules such that each source
module gets the
label of the reference
module that it overlaps most with, subject to not renaming two source
modules to the same reference
module. (If two source
modules point to the same
reference
module, the one with the more significant overlap is chosen.)
Those source
modules that cannot be matched to a reference
module are labeled using
those labels from extraLabels
that do not occur in either of source
, reference
or
ignoreLabels
.
overlapTable
for calculation of overlap counts and p-values;standardColors
for standard non-numeric WGCNA labels.