RNA-seq normalization

The gene with the most reads is often not the most highly expressed gene, and the normalization you choose changes the ranking. Edit the counts and lengths to see CPM, RPKM and TPM update, and why DESeq2 does not divide by library size.

Vibe-coded with ❤️ by Stephen Turner.

GeneLength (bp)Counts ACounts BDerived, sample A / sample B
Column sums

Ranking by raw count against ranking by TPM

sample A rank changes
Library size A-
Library size B-
TPM sum A-
TPM sum B-
Rank changes-

The same thing in R