overlapTable {WGCNA}R Documentation

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,
    log.p = FALSE)

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.

log.p

logical: should (natural) logarithms of the p-values be returned instead of the p-values?

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 (or their logarithms) for the overlap of the two respective modules.

Author(s)

Peter Langfelder

See Also

fisher.test, matchLabels


[Package WGCNA version 1.72-5 Index]