multiHyperGeoTest {HTSanalyzeR} | R Documentation

## Hypergeometric tests on a list of gene sets

### Description

This function performs hypergeometric tests for over-representation of hits, on a list of gene sets. This function applies the function `hyperGeoTest` to an entire list of gene sets and returns a data frame.

### Usage

    multiHyperGeoTest(collectionOfGeneSets, universe, hits, minGeneSetSize =
    15, pAdjustMethod = "BH", verbose = TRUE)

### Arguments

`collectionOfGeneSets` | a list of gene sets, each of which is a character vector of gene identifiers
`universe` | a character vector of all gene identifiers (usually all genes tested in a screen)
`hits` | a character vector of gene identifiers for those considered as hits
`minGeneSetSize` | a single integer or numeric value specifying the minimum number of elements in a gene set that must map to elements of the gene universe. Gene sets with fewer genes than this number are removed from both hypergeometric analysis and GSEA.
`pAdjustMethod` | a single character value specifying the p-value adjustment method to be used (see 'p.adjust' for details)
`verbose` | a single logical value indicating to display detailed messages (when verbose=TRUE) or not (when verbose=FALSE)

### Value

a data frame containing the results of the hypergeometric test (one row per gene set)

### Author(s)

John C. Rose, Xin Wang

### See Also

`hyperGeoTest`

### Examples

    ##example 1
    gl <- runif(100, min=0, max=5)
    gl <- gl[order(gl, decreasing=TRUE)]
    names(gl) <- as.character(sample(x=seq(from=1, to=100, by=1), size=100,
    replace=FALSE))
    gs1 <- sample(names(gl), size=20, replace=FALSE)
    gs2 <- sample(names(gl), size=20, replace=FALSE)
    gsc <- list(subset1=gs1, subset2=gs2)
    hypgeo<-multiHyperGeoTest(collectionOfGeneSets=gsc, universe=names(gl),
    hits=names(gl)[which(abs(gl) > 2)], minGeneSetSize = 2, pAdjustMethod ="BH")
    ##example 2
    ## Not run:
    library(org.Dm.eg.db)
    library(KEGG.db)
    ##load phenotype vector (see the vignette for details about the
    ##preprocessing of this data set)
    data("KcViab_Data4Enrich")
    DM_KEGG <- KeggGeneSets(species="Dm")
    ##Do multiple hypergeometric tests
    hypgeoResults <- multiHyperGeoTest(collectionOfGeneSets=DM_KEGG,
    universe=names(KcViab_Data4Enrich), hits=names(KcViab_Data4Enrich)[which(abs(
    KcViab_Data4Enrich) > 2)], minGeneSetSize = 15, pAdjustMethod = "BH")

    ## End(Not run)

[Package HTSanalyzeR version 2.34.1 Index]