hypergeoTest: Function to do a one-sided hypergeometric test.

Description Usage Arguments Details Value Author(s) See Also

View source: R/hypergeoTest.R

Description

Function to do a one-sided hypergeometric test, i.e. calculate the probability to draw more or less (expectation value smaller than observed number of successes respectively expectation value greater than observed number of successes) than a certain number of successes (ObservedNrOfAnnsInTerm) in a fixed number of draws (NrOfGenesInSample), without replacement, from a finite population of fixed size (NrOfGenesInUniverse) that contains a known number of successes (NrOfAnnotationsInTerm), wherein each draw is either a success or a failure.

Usage

1
2
3
hypergeoTest(ObservedNrOfAnnsInTerm, NrOfAnnotationsInTerm, NrOfGenesInSample, 

NrOfGenesInUniverse, LogPvalues = TRUE)

Arguments

ObservedNrOfAnnsInTerm

Numeric; Vector of observed numbers of input genes annotated to one GO term.

NrOfAnnotationsInTerm

Numeric; Vector of numbers of all genes annotated to one GO term.

NrOfGenesInSample

Numeric; The number of input genes (genes of interest in sample) annotated to at least one GO term.

NrOfGenesInUniverse

Numeric; The number of genes in universe, i.e. all genes annotated to at least one GO term.

LogPvalues

Boolean; Default: TRUE Set TRUE if -log(p-values) should be calculated. Set FALSE if non-transformed p-values should be returned.

Details

Hypergeometric test is done one-sided depending on ExpectedNrOfAnnsInTerm: If the expected number of genes annotated to one GO term is less than ObservedNrOfAnnsInTerm, the log-p-value will be log(P(X>=ObservedNrOfAnnsInTerm)) where X is the hypergeometric distributed random variable. If the expected number of genes annotated to one GO term is greater than ObservedNrOfAnnsInTerm, thelog-p-value will be log(P(X<ObservedNrOfAnnsInTerm)) where X is the hypergeometric distributed random variable.

Value

LogPvalues

Numeric; Vector of log-p-values of one-sided hypergeometric test.

Author(s)

CL

See Also

phyper.


CLippmann/dbtORA documentation built on Feb. 4, 2020, 12:37 a.m.