# Counts simulations  & DESEQ2 investigations

Purpose: 
1) Understand how DESEQ2 works <br/>
2) Understand how maximize statistical power <br/>
2) Refined biological protocol (seqeuncing effort, ...) <br/>


## About DESEQ2

The differential expression analysis uses a generalized linear model of the form:
Kij ∼ NB(µij , α i )
µij = s j q ij
log 2 (q ij ) = x j. β i

where counts K ij for gene i, sample j are modeled using a Negative Binomial distribution with
fitted mean µ ij and a gene-specific dispersion parameter α i . The fitted mean is composed of a
sample-specific size factor s j and a parameter q ij proportional to the expected true concentration
of fragments for sample j. The coefficients β i give the log2 fold changes for gene i for each col-
umn of the model matrix X. The sample-specific size factors can be replaced by gene-specific
normalization factors for each sample using normalizationFactors.

Experiments without replicates do not allow for estimation of the dispersion of counts around the
expected value for each group, which is critical for differential expression analysis. Analysis with-out replicates is no longer supported since v1.22.


## Investigation of µ effect 

<p align="center">
<img src="./img/fig_mu_effect.svg"  width="500" height="500">
</p>

## Investigation of alpha effect 

<p align="center">
<img src="./img/fig_size_effect.svg"  width="500" height="500">
</p>