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)
source
labels are a vector) or a matrix (if the input source
labels are a matrix) of the new labels.source
is treated separately. Source and reference labels are assumed to be of
the same type, that is noth should be either numeric or character. If the labels are character, they are
assumed to be color labels such as the ones returned by standardColors
. 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 modules with the highest overlap
with the reference
modules have the same color. Where this is not possible (for example because
one reference module has the highest overlap with two source modules), the source modules will be
relabeled using labels that are not present among the reference labels.
standardColors