Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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.

Author(s)

Peter Langfelder

See Also


WGCNA

Weighted Correlation Network Analysis

v1.70-3
GPL (>= 2)
Authors
Peter Langfelder <Peter.Langfelder@gmail.com> and Steve Horvath <SHorvath@mednet.ucla.edu> with contributions by Chaochao Cai, Jun Dong, Jeremy Miller, Lin Song, Andy Yip, and Bin Zhang
Initial release
2021-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.