class: center, middle, inverse, title-slide # 7.2 Differential analysis with DESeq2: count normalization ## MICB 405 101 2021W1 Bioinformatics ###
Stephan Koenig
### University of British Columbia ### February 17, 2022 --- ## Learning outcomes - Define the challenges of differential analysis. - Apply different count normalization strategies. - Reproduce count normalization of DESeq2 in R using tidyverse. --- class: center middle ## Goal: Determine significant changes in gene expression between conditions --- ## Challenges to identify differentially expressed genes
- Distinguish technical variation from variation due to treatment. - Majority of genes do not change between treatments. - Only a few replicates per treatment, difficult to estimate variance. --- ## Challenges to identify differentially expressed genes
- **Distinguish technical variation from variation due to treatment.** - Majority of genes do not change between treatments. - Only a few replicates per treatment, difficult to estimate variance. --- ## Why count normalization?
The numerical value of non-differentially expressed genes should not vary due to **sampling depth** or **RNA composition**. We need to determine a sample-specific **size factor** for each sample. ??? We are not normalizing for gene length since we do only within gene comparisons. --- ## Count normalization in DESeq2
1. Determine the natural logarithm of gene counts. 2. Calculate he geometric mean of each row to use as a pseudo-reference sample. 3. Remove infinite values. 4. Subtract the reference from the log of counts (equivalent to log of ratio of counts to reference). `$$log(counts) - log(reference) = log\left(\frac{{counts}}{{reference}}\right)$$` 5. Calculate median for each sample. 6. Convert log of median to number. ??? The combination of these steps removes outliers from the data set and at the same time each step is less sensitive to outliers.