hyperGTest: Hypergeometric Test for association of categories and genes

Description Usage Arguments Details Value Implementation Notes Author(s) See Also


Given a subclass of HyperGParams, compute Hypergeomtric p-values for over or under-representation of each term in the specified category among the specified gene set.





An instance of a subclass of HyperGParams. This parameter object determines the category of interest (e.g., GO or KEGG) as well as the gene set.


The gene identifiers in the geneIds slot of p define the selected set of genes. The universe of gene ids is determined by the chip annotation found in the annotation slot of p. Both the selected genes and the universe are reduced by removing identifiers that do not have any annotations in the specified category.

For each term in the specified category that has at least one annotation in the selected gene set, we determine how many of its annotations are in the universe set and how many are in the selected set. With these counts we perform a Hypergeometric test using phyper. This is equivalent to using Fisher's exact test.

It is important that the correct chip annotation data package be identified as it determines the universe of gene identifiers and is often used to determine the mapping between the category term and the gene identifiers.

For S. cerevisiae if the annotation slot of p is set to '"org.Sc.sgd"' then comparisons and statistics are computed using common names and are with respect to all genes annotated in the S. cerevisiae genome not with respect to any microarray chip. This will *not* be the right thing to do if you are working with a yeast microarray.


A HyperGResult instance.

Implementation Notes

In most cases, the provided method with signature matching any subclass of HyperGParams is all that will be needed. This method follows a template pattern. To add support for a new FOO category type, a developer would need to create a FooHyperGParams subclass and then define two methods specialized to the new subclass that get called from inside hyperGTest: universeBuilder and categoryToEntrezBuilder.


S. Falcon

See Also

HyperGResult-class HyperGParams-class GOHyperGParams-class KEGGHyperGParams-class

Bioconductor/Category documentation built on Sept. 2, 2017, 12:14 a.m.