topDEGenes {SeqGSEA} | R Documentation

## Extract top differentially expressed genes.

### Description

This function is to extract top n differentially expressed genes, ranked by either DESeq p-values, DESeq adjusted p-values, permutation p-values, permutation adjusted p-values, or NB-statistics.

### Usage

    topDEGenes(DEGres, n = 20,
               sortBy = c("padj", "pval", "perm.pval", "perm.padj", "NBstat", "foldChange"))

### Arguments

`DEGres` | DE analysis results.
`n` | the number of top DE genes.
`sortBy` | indicating which method to rank genes.

### Details

If the sortBy method is not among the column names, the function will result in an error.

### Value

A table for top n DE genes with significance metrics.

### Author(s)

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

### See Also

`topDSGenes`, `topDSExons`

### Examples

    data(RCS_example, package="SeqGSEA")
    geneCounts <- getGeneCount(RCS_example)
    label <- label(RCS_example)
    DEG <- runDESeq(geneCounts, label)
    permuteMat <- genpermuteMat(RCS_example, times=10)
    DEGres <- DENBTest(DEG)
    DEpermNBstat <- DENBStatPermut4GSEA(DEG, permuteMat)
    DEGres <- DEpermutePval(DEGres, DEpermNBstat)
    topDEGenes(DEGres, n = 10, sortBy = "NBstat")

[Package SeqGSEA version 1.34.0 Index]