Learn R Programming

SeqGSEA (version 1.12.0)

topDEGenes: 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.

Value

A table for top n DE genes with significance metrics.

Details

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

See Also

topDSGenes, topDSExons

Examples

Run this code
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")

Run the code above in your browser using DataLab