The formula you quote is for the edgeR package rather than for DESeq2.
The articles you cite are for three different packages.
I doubt very much that you can compute the formula by hand. edgeR is a sophisticated and substantial package and trying to recreate it from scratch is unrealistic.
Read more here: Source link