Learn R Programming

WGCNA (version 1.61)

overlapTable: Calculate overlap of modules

Description

The function calculates overlap counts and Fisher exact test p-values for the given two sets of module assignments.

Usage

overlapTable(
    labels1, labels2, 
    na.rm = TRUE, ignore = NULL, 
    levels1 = NULL, levels2 = NULL)

Arguments

labels1

a vector containing module labels.

labels2

a vector containing module labels to be compared to labels1.

na.rm

logical: should entries missing in either labels1 or labels2 be removed?

ignore

an optional vector giving label levels that are to be ignored.

levels1

optional vector giving levels for labels1. Defaults to sorted unique non-missing values in labels1 that are not present in ignore.

levels2

optional vector giving levels for labels2. Defaults to sorted unique non-missing values in labels2 that are not present in ignore.

Value

A list with the following components:

countTable

a matrix whose rows correspond to modules (unique labels) in labels1 and whose columns correspond to modules (unique labels) in labels2, giving the number of objects in the intersection of the two respective modules.

pTable

a matrix whose rows correspond to modules (unique labels) in labels1 and whose columns correspond to modules (unique labels) in labels2, giving Fisher's exact test significance p-values for the overlap of the two respective modules.

See Also

fisher.test, matchLabels