> ## Content Index
> Fetch the complete content index at: https://bioinformatics.ghost.io/llms.txt
> Use this file to discover other available public pages before exploring further.

# Steps in DESeq function
- URL: https://bioinformatics.ghost.io/steps-in-deseq-function/
- Published: 2022-05-24T23:00:31.000Z
- Updated: 2023-05-11T14:09:01.000Z
- Author: Aarthi Ramakrishnan
- Tags: Bioinformatics, #Import 2026-08-27 15:19

For any RNA-seq data analysis project, one would most probably end up using the R package [DESeq2](https://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html?ref=bioinformatics.ghost.io). The function 'DESeq' is the main function that is called to obtain the differentially expressed genes. But what exactly does this function do? 

In short, DESeq function combines the following 3 steps -

1. **estimateSizeFactors** \- This step calculates the size factors for each sample (explained [here](https://bioinformatics.ghost.io/normalization-of-counts-matrix-in-deseq2-using-r/)).
2. **estimateDispersions** \- This step obtains the dispersions for each gene. Here, dispersion does not mean the variance. Rather, it represents the deviation of the variance from the mean. This value is required by DESeq as it assumes a negative binomial distribution, and dispersion is one of the model's parameters. This [link](https://hbctraining.github.io/DGE%5Fworkshop%5Fsalmon%5Fonline/lessons/04b%5FDGE%5FDESeq2%5Fanalysis.html?ref=bioinformatics.ghost.io) has a good explanation on estimating dispersions.
3. **nbinomWaldTest** \- This step fits the normalized counts data with a negative binomial model and runs a Wald test to find the differentially expressed genes in the dataset.