With seven samples a gene-wise dispersion estimate rests on five degrees of freedom and is very noisy. DESeq2 maximises the Cox-Reid adjusted likelihood for each gene, fits a trend α(μ) = a0 + a1/μ across genes, and takes the posterior mode under a log-normal prior centred on the trend. The same trend gives a closed-form variance-stabilising transformation whose standard deviation is about √a0/ln 2 at every mean, unlike log2(n + n0).
code/ch08_count_data_glm.R (cr_apl, disp_est, disp_trend, vst_param).