Description Usage Arguments Details Value Note Author(s) References See Also Examples
Extracts the most differentially expressed genes (or sequence tags) from a test object, ranked either by p-value or by absolute log-fold-change.
1 | topTags(object, n = 10, adjust.method = "BH", sort.by = "PValue", p.value = 1)
|
object |
a |
n |
integer, maximum number of genes/tags to return. |
adjust.method |
character string specifying the method used to adjust p-values for multiple testing. See |
sort.by |
character string specifying the sort method. Possibilities are |
p.value |
numeric cutoff value for adjusted p-values. Only tags with adjusted p-values equal or lower than specified are returned. |
This function is closely analogous to the topTable
function in the limma package.
It accepts a test statistic object created by any of the edgeR functions exactTest
, glmLRT
, glmTreat
or glmQLFTest
and extracts a readable data.frame of the most differentially expressed genes.
The data.frame collates the annotation and differential expression statistics for the top genes.
The data.frame is wrapped in a TopTags
output object that records the test statistic used and the multiple testing adjustment method.
TopTags
objects will return dimensions and hence functions such as dim
, nrow
or ncol
are defined on them.
TopTags
objects also have a show
method so that printing produces a compact summary of their contents.
topTags
permits ranking by fold-change but the authors do not recommend fold-change ranking or fold-change cutoffs for routine RNA-seq analysis.
The p-value ranking is intended to more biologically meaningful, especially if the p-values were computed using glmTreat
.
An object of class TopTags
, which is a list-based class with the following components:
table |
a data.frame containing differential expression results for the top genes in sorted order.
The number of rows is the smaller of
| ||||
adjust.method |
character string specifying the method used to adjust p-values for multiple testing, same as input argument. | ||||
comparison |
character vector giving the names of the two groups being compared (for | ||||
test |
character string stating the name of the test. |
The terms ‘tag’ and ‘gene’ are used synonymously on this page and refer to the rows of object
.
In general, the rows might be genes, sequence tags, transcripts, exons or whatever type of genomic feature is appropriate for the analysis at hand.
Mark Robinson, Davis McCarthy, Yunshun Chen, Gordon Smyth
Chen Y, Lun ATL, and Smyth, GK (2016). From reads to genes to pathways: differential expression analysis of RNA-Seq experiments using Rsubread and the edgeR quasi-likelihood pipeline. F1000Research 5, 1438. http://f1000research.com/articles/5-1438
McCarthy, DJ, Chen, Y, Smyth, GK (2012). Differential expression analysis of multifactor RNA-Seq experiments with respect to biological variation. Nucleic Acids Research 40, 4288-4297. https://doi.org/10.1093/nar/gks042
Robinson MD, Smyth GK (2008). Small-sample estimation of negative binomial dispersion, with applications to SAGE data. Biostatistics 9, 321-332.
Robinson MD, Smyth GK (2007). Moderated statistical tests for assessing differences in tag abundance. Bioinformatics 23, 2881-2887.
exactTest
, glmLRT
, glmTreat
, glmQLFTest
, dim.TopTags
, p.adjust
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # generate raw counts from NB, create list object
y <- matrix(rnbinom(80,size=1,mu=10),nrow=20)
d <- DGEList(counts=y,group=rep(1:2,each=2),lib.size=rep(c(1000:1001),2))
rownames(d$counts) <- paste("gene",1:nrow(d$counts),sep=".")
# estimate common dispersion and find differences in expression
# here we demonstrate the 'exact' methods, but the use of topTags is
# the same for a GLM analysis
d <- estimateCommonDisp(d)
de <- exactTest(d)
# look at top 10
topTags(de)
# Can specify how many genes to view
tp <- topTags(de, n=15)
# Here we view top 15
tp
# Or order by fold change instead
topTags(de,sort.by="logFC")
|
Loading required package: limma
Comparison of groups: 2-1
logFC logCPM PValue FDR
gene.13 3.927546 13.41831 0.06297185 0.7427030
gene.14 3.439276 13.48287 0.08997453 0.7427030
gene.8 -2.604663 14.14897 0.16130806 0.7427030
gene.2 -3.292920 12.35154 0.16684627 0.7427030
gene.11 2.709441 12.95951 0.18567576 0.7427030
gene.4 -1.765370 13.08835 0.36446255 0.8708413
gene.18 -1.540804 14.10916 0.39230442 0.8708413
gene.20 1.512666 13.51340 0.41733222 0.8708413
gene.7 -1.448462 13.35194 0.44360298 0.8708413
gene.15 1.527247 12.54427 0.47286474 0.8708413
Comparison of groups: 2-1
logFC logCPM PValue FDR
gene.13 3.9275462 13.41831 0.06297185 0.7427030
gene.14 3.4392758 13.48287 0.08997453 0.7427030
gene.8 -2.6046629 14.14897 0.16130806 0.7427030
gene.2 -3.2929201 12.35154 0.16684627 0.7427030
gene.11 2.7094408 12.95951 0.18567576 0.7427030
gene.4 -1.7653703 13.08835 0.36446255 0.8708413
gene.18 -1.5408038 14.10916 0.39230442 0.8708413
gene.20 1.5126656 13.51340 0.41733222 0.8708413
gene.7 -1.4484615 13.35194 0.44360298 0.8708413
gene.15 1.5272471 12.54427 0.47286474 0.8708413
gene.10 1.2889099 13.86638 0.47896274 0.8708413
gene.9 -1.0188040 14.49895 0.56422674 0.9403779
gene.17 0.7155244 13.88963 0.69975800 0.9702383
gene.5 0.4551239 13.98204 0.81209970 0.9702383
gene.19 0.3422718 14.61758 0.85413225 0.9702383
Comparison of groups: 2-1
logFC logCPM PValue FDR
gene.13 3.927546 13.41831 0.06297185 0.7427030
gene.14 3.439276 13.48287 0.08997453 0.7427030
gene.2 -3.292920 12.35154 0.16684627 0.7427030
gene.11 2.709441 12.95951 0.18567576 0.7427030
gene.8 -2.604663 14.14897 0.16130806 0.7427030
gene.4 -1.765370 13.08835 0.36446255 0.8708413
gene.18 -1.540804 14.10916 0.39230442 0.8708413
gene.15 1.527247 12.54427 0.47286474 0.8708413
gene.20 1.512666 13.51340 0.41733222 0.8708413
gene.7 -1.448462 13.35194 0.44360298 0.8708413
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.