topGeneSets {SeqGSEA} | R Documentation

## Extract top significant gene sets

### Description

This function is to extract n top significant gene sets overrepresented in the samples studied, ranked by FDR, p-values, or FWER.

### Usage

    topGeneSets(gene.set, n = 20, sortBy = c("FDR", "pvalue", "FWER"), GSDesc = FALSE)

### Arguments

`gene.set` | an object of class SeqGeneSet after GSEA runs.
`n` | the number of top gene sets.
`sortBy` | indicating which method to rank gene sets.
`GSDesc` | logical indicating whether or not to output gene set descriptions.

### Value

A data frame for top n gene sets detected with respect to the ranking method specified. Information includes: GSName, GSSize, ES, ES.pos, pval, FDR, and FWER.

### Author(s)

Xi Wang, xi.wang@newcastle.edu.au

### See Also

`GSEnrichAnalyze`, `GSEAresultTable`

### Examples

    data(DEscore, package="SeqGSEA")
    data(DSscore, package="SeqGSEA")
    gene.score <- geneScore(DEscore, DSscore, method="linear", DEweight = 0.3)
    data(DEscore.perm, package="SeqGSEA")
    data(DSscore.perm, package="SeqGSEA")
    gene.score.perm <- genePermuteScore(DEscore.perm, DSscore.perm, method="linear",  DEweight=0.3)
    data(GS_example, package="SeqGSEA")
    GS_example <- GSEnrichAnalyze(GS_example, gene.score, gene.score.perm)
    topGeneSets(GS_example, n=5)

[Package SeqGSEA version 1.26.0 Index]