Description Usage Arguments Details Value References Examples
This function obtains dispersion estimates for Negative Binomial distributed data.
1 2 3 4 5 6 7 8 9 10 11 
object 
a DESeqDataSet 
fitType 
either "parametric", "local", "mean", or "glmGamPoi" for the type of fitting of dispersions to the mean intensity.

maxit 
control parameter: maximum number of iterations to allow for convergence 
useCR 
whether to use CoxReid correction  see McCarthy et al (2012) 
weightThreshold 
threshold for subsetting the design matrix and GLM weights for calculating the CoxReid correction 
quiet 
whether to print messages at each step 
modelMatrix 
an optional matrix which will be used for fitting the expected counts.
by default, the model matrix is constructed from 
minmu 
lower bound on the estimated count for fitting genewise dispersion 
Typically the function is called with the idiom:
dds < estimateDispersions(dds)
The fitting proceeds as follows: for each gene, an estimate of the dispersion
is found which maximizes the Cox Reidadjusted profile likelihood
(the methods of Cox Reidadjusted profile likelihood maximization for
estimation of dispersion in RNASeq data were developed by McCarthy,
et al. (2012), first implemented in the edgeR package in 2010);
a trend line capturing the dispersionmean relationship is fit to the maximum likelihood estimates;
a normal prior is determined for the log dispersion estimates centered
on the predicted value from the trended fit
with variance equal to the difference between the observed variance of the
log dispersion estimates and the expected sampling variance;
finally maximum a posteriori dispersion estimates are returned.
This final dispersion parameter is used in subsequent tests.
The final dispersion estimates can be accessed from an object using dispersions
.
The fitted dispersionmean relationship is also used in
varianceStabilizingTransformation
.
All of the intermediate values (genewise dispersion estimates, fitted dispersion
estimates from the trended fit, etc.) are stored in mcols(dds)
, with
information about these columns in mcols(mcols(dds))
.
The log normal prior on the dispersion parameter has been proposed by Wu, et al. (2012) and is also implemented in the DSS package.
In DESeq2, the dispersion estimation procedure described above replaces the different methods of dispersion from the previous version of the DESeq package.
Since version 1.29, DESeq2 can call the glmGamPoi package, which can speed up the inference
and is optimized for fitting many samles with very small counts (for example single cell
RNAseq data). To call functions from the glmGamPoi package, make sure that it is installed
and set fitType = "glmGamPoi"
. In addition, to the gene estimates, the trend and the MAP,
the glmGamPoi package calculates the corresponding quasilikelihood estimates. Those can be
used with the nbinomLRT()
test to get more precise pvalue estimates.
The lowerlevel functions called by estimateDispersions
are:
estimateDispersionsGeneEst
,
estimateDispersionsFit
, and
estimateDispersionsMAP
.
The DESeqDataSet passed as parameters, with the dispersion information
filled in as metadata columns, accessible via mcols
, or the final dispersions
accessible via dispersions
.
Simon Anders, Wolfgang Huber: Differential expression analysis for sequence count data. Genome Biology 11 (2010) R106, http://dx.doi.org/10.1186/gb20101110r106
McCarthy, DJ, Chen, Y, Smyth, GK: Differential expression analysis of multifactor RNASeq experiments with respect to biological variation. Nucleic Acids Research 40 (2012), 42884297, http://dx.doi.org/10.1093/nar/gks042
Wu, H., Wang, C. & Wu, Z. A new shrinkage estimator for dispersion improves differential expression detection in RNAseq data. Biostatistics (2012). http://dx.doi.org/10.1093/biostatistics/kxs033
AhlmannEltze, C., Huber, W. glmGamPoi: Fitting GammaPoisson Generalized Linear Models on Single Cell Count Data. bioRxiv (2020). https://doi.org/10.1101/2020.08.13.249623
1 2 3 4  dds < makeExampleDESeqDataSet()
dds < estimateSizeFactors(dds)
dds < estimateDispersions(dds)
head(dispersions(dds))

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.