ListHyperGResult-class {eisa} | R Documentation

## Classes for quick GO/KEGG/CHR/miRNA target or other enrichment calculation for multiple gene sets

### Description

These classes extend the `HyperGResult` class from the `Category` package to perform enrichment calculation quickly for multiple gene sets.

### Usage

    ## S4 method for signature 'ListHyperGResult'
    summary(object, pvalue = pvalueCutoff(object),
      categorySize = NULL)
    ## S4 method for signature 'ListHyperGResult'
    htmlReport(r, file = "", append = FALSE,
      label = "", digits = 3, summary.args = NULL)
    ## S4 method for signature 'ListHyperGResult'
    pvalues(r)
    ## S4 method for signature 'ListHyperGResult'
    sigCategories(r, p)

    ## S4 method for signature 'ListHyperGResult'
    geneCounts(r)
    ## S4 method for signature 'ListHyperGResult'
    expectedCounts(r)
    ## S4 method for signature 'ListHyperGResult'
    oddsRatios(r)
    ## S4 method for signature 'ListHyperGResult'
    universeCounts(r)
    ## S4 method for signature 'ListHyperGResult'
    geneMappedCount(r)
    ## S4 method for signature 'ListHyperGResult'
    universeMappedCount(r)
    ## S4 method for signature 'ListHyperGResult'
    geneIdsByCategory(r, catids = NULL)

    ## S4 method for signature 'ListHyperGResult'
    geneIdUniverse(r, cond = FALSE)

### Arguments

`object,r` | A `ListHyperGResult` object.
`pvalue,p` | Numeric vector of length one, the p-value limit, up to which the terms are listed.
`categorySize` | A numeric vector of length one, or `NULL`. If not `NULL`, then it gives the minimum number of annotated genes in the universe, in order to list the term.
`file` | A file name, or a connection object. The result is written here. If it is `""`, then the result is written to the standard output. If it is `NULL`, then the result is not written anywhere. (But it is always returned, invisibly, see below.)
`append` | Logical scalar, whether to append the HTML code to the given file, or remove its previous contents if it already exists.
`label` | An HTML label (`<A LABEL="">` tag) to add.
`digits` | The number of digits to use for the numeric columns.
`summary.args` | A list of arguments to pass to the `summary` method.
`catids` | The categories for which the genes are listed. All categories will be listed if this argument is `NULL`.
`cond` | Currently not used.

### Details

A `ListHyperGResult` object can store the results of hypergeometric tests, several gene sets against the same universe. `ListHyperGRresult` is an extension of `HyperGResult`, as defined in the `Category` package.

More precisely, `ListHyperGResult` is an abstract class, it is not possible to instantiate objects from it. Its extensions are be used instead: `GOListHyperGResult`, `KEGGListHyperGResult`, `CHRListHyperGResult` and `miRNAListHyperGResult`.

### Value

`pvalues`, `geneCounts`, `expectedCounts`, `oddsRatios` and `universeCounts` return a list of named numeric vectors.

`geneMappedCount` returns a numeric vector, `universeMappedCount` returns a numeric vector of length one.

`sigCategories` returns a list of character vectors.

`geneIdsByCategory` returns a list of lists of character vectors.

`geneIdUniverse` returns a list of character vectors.

`summary` returns a list of data frames with columns: ‘Pvalue’, ‘OddsRatio’, ‘ExpCount’, ‘Count’, ‘Size’ and optionally ‘drive’.

`htmlReport` returns a list of chracter vectors, invisibly.

`conditional` returns a logical vector of length one. `ontology` returns a character vector of length one.

### Member functions

Most of the member functions are analogous to the ones defined for `HyperGResult` in the `Category` package. Usually the only difference is that they return a list of vectors, with one entry for each gene set, instead of just a single vector.

`pvalues` returns the p-values of the hypergeomatric tests. A list is returned, with one numeric vector entry for each input gene set. The p-values for each gene set are ordered according to decreasing significance.

`geneCounts` returns the number of genes from the gene set that are annotated with the given term. This is returned for all input gene sets, in a list.

`expectedCounts` returns the number of genes that are expected to be annotated with the given term, just by chance. This is calculated for all input gene sets, and returned as a list.

`oddsRatios` returns the odds ratios for each term tested, for all gene sets, in a list of numeric vectors.

`universeCounts` returns the number of genes from the universe that are annotated with the given term, for all gene sets, in a list.

`geneMappedCount` gives the size of the gene sets, as used in the algorithm. This can be different than the size of the input gene sets, because of the elimination of duplicates and genes that are not in the universe, before the actual computation.

`universeMappedCount` gives the size of the gene universe, as used in the computation. This can be different than the size given by the user, because duplicates are eliminated before the computation.

`sigCategories` returns the significant terms, at the given p-value threshold, for all gene sets, as a list.

`geneIdsByCategory` returns a list of lists, one entry for each input gene set. Every entry is a list itself and for each tested term it gives the gene ids from the gene set that are annotated with the given term.

`geneIdUniverse` returns a list of character vectors, one for each term that was tested, giving the ids of the genes from the universe that are annotated with that term.

`summary` returns a list of data frames, one for each input gene set. Each data frame has columns: ‘Pvalue’, ‘OddsRatio’, ‘ExpCount’, ‘Count’, ‘Size’ and optionally ‘drive’. Each row of the data frame corresponds to a tested term.

`htmlReport` creates a HTML summary from a `ListHyperGParams` object. This consists of one table for each input gene get. The summary can be written to a file, but it is also returned in a list of character vectors. There is one list entry for each input gene set, and each element of the character vector corresponds to one line of HTML code. You need the `xtable` package to use this function.

The following functions are defined for `GOListHyperGResult` objects only.

`conditional` returns a logical vector of length one, whether the test was conditional or not. Conditional testing is currently not implemented, please see the `GOstats` package for a working implementation.

`ontology` returns a character vector of length one, the name of the ontology for the GO test.

### Author(s)

Gabor Csardi csardi.gabor@gmail.com

### See Also

Functions for enrichment calculation of ISA modules: `ISAGO`, `ISAKEGG`, `ISACHR`, `ISAmiRNA`, `ISAEnrichment`.

Perhaps see also the vignette in the `GOstats` package.

### Examples

    data(ALLModulesSmall)
    GO <- ISAGO(ALLModulesSmall)
    GO$CC
    sigCategories(GO$CC)[[1]]
    summary(GO$CC)[[1]][,1:5]

[Package eisa version 1.38.0 Index]