hypergeoTest: Hypergeometric test

View source: R/tanimotoCoef.R

hypergeoTestR Documentation

Hypergeometric test

Description

Run one-tailed hypergeometric test (fisher test) with set inputs. 'hypergeoTest' uses hypergeometric distribution function phyper with lower.tail = FALSE fixed. This is commonly used for testing significance in overlap between sets.

Usage

hypergeoTest(query, reference, bgspace)

Arguments

query

query set (balls drawn)

reference

reference set (white balls)

bgspace

background space (balls in urn)

Value

Returns a dataframe of 4 columns. pVal is p value returned by phyper. oddsRatio gives number of observation by number of expectation. int and bg refers to the number of intersected items and background space respectively. By nature of phyper, reference and query input should be interchangeable.


LittleHeronCodes/Lazy2 documentation built on April 20, 2024, 11:24 p.m.