hypergeoAn {MineICA} | R Documentation

## Runs an enrichment analysis per component using package `GOstats`.

### Description

Runs an enrichment analysis of the contributing genes associated with each component, using the function `hyperGTest` of package `GOstats`. The easiest way to run enrichment analysis is to use function `runEnrich`.

### Usage

      hypergeoAn(icaSet, params,
        path = paste(resPath(params), "GOstatsEnrichAnalysis/", sep = "/"),
        SlistSel, hgCutoff = 0.01, db = "go", onto = "BP",
        cond = TRUE, universe, entrez2symbol)

### Arguments

`icaSet` | An object of class `IcaSet`
`params` | An object of class `MineICAParams` containing the parameters of the analysis
`path` | The path where results will be saved
`SlistSel` | A list of contributing gene projection values per component. Each element of the list corresponds to a component and is restricted to the features or genes exceeding a given threshold. If missing, is computed by the function.
`hgCutoff` | The p-value threshold
`db` | The database to be used (`"GO"` or `"KEGG"`)
`onto` | A character specifying the GO ontology to use. Must be one of `"BP"`, `"CC"`, or `"MF"`, see `GOHyperGParams`. Only used when argument `db` is `"GO"`.
`cond` | A logical indicating whether the calculation should conditioned on the GO structure, see `GOHyperGParams`.
`universe` | The universe for the hypergeometric tests, see `GOHyperGParams`.
`entrez2symbol` | A vector of all gene Symbols involved in the analysis indexed by their Entrez Gene IDs. It is only used when `annotation(params)` is empty, and allows to associate gene sets to Symbols.

### Details

An annotation package must be available in `annotation(icaSet)` to provide the contents of the gene sets. If none corresponds to the technology you deal with, please choose the org.*.eg.db package according to the organism (for example org.Hs.eg.db for Homo sapiens). Save results of the enrichment tests in a '.rda' file located in `path`/`db`/`onto`/`zvalCutoff(params)`.

### Author(s)

Anne Biton

### See Also

`runEnrich`, `xtable`, `useMart`, `hyperGTest`, `GOHyperGParams`, `mergeGostatsResults`

### Examples

    ## Not run:
    ## load an example of IcaSet
    data(icaSetCarbayo)

    ## define params
    # Use threshold 3 to select contributing genes.
    # Results of enrichment analysis will be written in path 'resPath(params)/GOstatsEnrichAnalysis'
    params <- buildMineICAParams(resPath="~/resMineICACarbayo/", selCutoff=3)

    ## Annotation package for IcaSetCarbayo is hgu133a.db.
    # check annotation package
    annotation(icaSetCarbayo)

    ## Define universe, i.e the set of EntrezGene IDs mapping to the feature IDs of the IcaSet object.
    universe <- as.character(na.omit(unique(unlist(AnnotationDbi::mget(featureNames(icaSetCarbayo),
                             hgu133aENTREZID, ifnotfound = NA)))))

    ## Apply enrichement analysis (of the contributing genes) to the first components using gene sets from KEGG.
    # Since an annotation package is available, we don't need to fill arg 'entrez2symbol'.
    # run the actual enrichment analysis
    hypergeoAn(icaSet=icaSetCarbayo[,,1], params=params, db="GO",onto="BP", universe=universe)

    ## End(Not run)

[Package MineICA version 1.34.0 Index]