topDEGenes: Extract top differentially expressed genes.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/DEscore.R

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

1
2
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

1
2
3
4
5
6
7
8
9
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")

Example output

Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colMeans, colSums, colnames,
    dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
    intersect, is.unsorted, lapply, lengths, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
    rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which, which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: doParallel
Loading required package: foreach
Loading required package: iterators
Loading required package: DESeq
Loading required package: locfit
locfit 1.5-9.1 	 2013-03-22
Loading required package: lattice
    Welcome to 'DESeq'. For improved performance, usability and
    functionality, please consider migrating to 'DESeq2'.
Warning message:
In .local(object, ...) :
  in estimateDispersions: sharingMode=='gene-est-only' will cause inflated numbers of false positives unless you have many replicates.
There were 11 warnings (use warnings() to see them)
                             id baseMean baseMeanA       VarA baseMeanB
ENSG00000005156 ENSG00000005156 508.7201  590.1898  861.24352  427.2504
ENSG00000000457 ENSG00000000457 125.3317  146.9523   93.50210  103.7111
ENSG00000004487 ENSG00000004487 998.9362 1130.6092 3284.47965  867.2632
ENSG00000001036 ENSG00000001036 292.6198  339.2443  449.67436  245.9954
ENSG00000006114 ENSG00000006114 557.0118  621.7077  819.42045  492.3159
ENSG00000001629 ENSG00000001629 349.0172  407.9012  862.85680  290.1331
ENSG00000001167 ENSG00000001167 269.3410  297.3664  285.60795  241.3157
ENSG00000006062 ENSG00000006062 176.7392  128.6411  263.42344  224.8373
ENSG00000004864 ENSG00000004864 274.0276  340.4457 1379.93784  207.6095
ENSG00000002919 ENSG00000002919 155.7009  139.6259   33.02909  171.7758
                      VarB    NBstat foldChange log2FoldChange         pval
ENSG00000005156  584.89313 18.358750  0.7239203     -0.4660973 7.153362e-05
ENSG00000000457   36.90268 14.338405  0.7057470     -0.5027770 9.960426e-05
ENSG00000004487 2057.05856 12.983363  0.7670760     -0.3825586 1.381509e-03
ENSG00000001036  330.31315 11.148067  0.7251276     -0.4636932 7.537032e-04
ENSG00000006114  802.91050 10.319858  0.7918769     -0.3366520 3.341782e-04
ENSG00000001629  515.05282 10.065479  0.7112828     -0.4915048 2.506320e-03
ENSG00000001167   33.83426  9.834885  0.8115097     -0.3013197 1.343375e-10
ENSG00000006062  681.58510  9.792198  1.7477873      0.8055296 1.199420e-03
ENSG00000004864  462.01150  9.579772  0.6098168     -0.7135523 3.803814e-04
ENSG00000002919   79.14822  9.214169  1.2302580      0.2989609 4.462546e-03
                        padj perm.pval perm.padj
ENSG00000005156 2.589711e-03         0         0
ENSG00000000457 2.589711e-03         0         0
ENSG00000004487 1.393825e-02         0         0
ENSG00000001036 1.055184e-02         0         0
ENSG00000006114 6.082044e-03         0         0
ENSG00000001629 1.900626e-02         0         0
ENSG00000001167 1.222471e-08         0         0
ENSG00000006062 1.364340e-02         0         0
ENSG00000004864 6.293584e-03         0         0
ENSG00000002919 2.619946e-02         0         0

SeqGSEA documentation built on Nov. 8, 2020, 5:46 p.m.