Rnanorm provides common RNA-seq normalization methods (TPM, CPM, FPKM, TMM, etc.) with a scikit-learn-like API. Current version 2.2.0 requires Python >=3.9, <3.14. The library is actively maintained with regular releases.
pip install rnanormVerified import paths — ran on the pinned version, not inferred.
Basic usage: load example count data, apply TPM normalization with dummy gene lengths.
Upgrade code to pass lengths to fit_transform. See migration guide: https://rnanorm.readthedocs.io/en/latest/migration.html
Change 'from rnanorm import CountData' to 'from rnanorm.datasets import CountData'
Always provide correct gene lengths; verify by checking that the sum of each sample's TPM is approximately 1e6.
Chain .set_output(transform='pandas') on the estimator before calling fit_transform.
Apply log transformation manually after normalization using numpy.log1p.