{"id":24531,"library":"rnanorm","title":"RNA-Norm","description":"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.","status":"active","version":"2.2.0","language":"python","source_language":"en","source_url":"https://github.com/czbiohub-sf/rnanorm","tags":["RNA-seq","normalization","TPM","CPM","FPKM","TMM","bioinformatics"],"install":[{"cmd":"pip install rnanorm","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"API design and base classes","package":"scikit-learn","optional":false},{"reason":"Data handling","package":"pandas","optional":false},{"reason":"Array operations","package":"numpy","optional":false}],"imports":[{"wrong":"from rnanorm.datasets import CountData","symbol":"CPM","correct":"from rnanorm import CPM"},{"symbol":"TMM","correct":"from rnanorm import TMM"},{"symbol":"TPM","correct":"from rnanorm import TPM"}],"quickstart":{"code":"import pandas as pd\nfrom rnanorm import TPM\nfrom rnanorm.datasets import CountData\n\n# Load example dataset\ncounts = CountData()\nexp = counts.expression\n\n# TPM normalization (requires gene lengths)\n# For demo, use dummy lengths (1 for all genes)\nlengths = pd.Series(1.0, index=exp.columns)\ntpm = TPM().set_output(transform='pandas').fit_transform(exp, lengths)\nprint(tpm.iloc[:5, :5])","lang":"python","description":"Basic usage: load example count data, apply TPM normalization with dummy gene lengths."},"warnings":[{"fix":"Upgrade code to pass lengths to fit_transform. See migration guide: https://rnanorm.readthedocs.io/en/latest/migration.html","message":"In version 2.0.0, the API changed from fit/transform on raw counts to requiring explicit gene lengths for length-dependent methods (TPM, FPKM). The 'expression' attribute of CountData now returns a DataFrame, not an object with .counts.","severity":"breaking","affected_versions":"<2.0.0"},{"fix":"Change 'from rnanorm import CountData' to 'from rnanorm.datasets import CountData'","message":"CountData is no longer importable directly from rnanorm; it must be imported from rnanorm.datasets.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Always provide correct gene lengths; verify by checking that the sum of each sample's TPM is approximately 1e6.","message":"Length-dependent methods (TPM, FPKM) require gene lengths as a pandas Series or array with the same index as the expression DataFrame columns. Using wrong or missing lengths will silently produce incorrect results.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Chain .set_output(transform='pandas') on the estimator before calling fit_transform.","message":"The set_output(transform='pandas') method must be called before fit_transform to get a DataFrame output; otherwise output is a numpy array.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Apply log transformation manually after normalization using numpy.log1p.","message":"The 'log1p' parameter in some normalizers is deprecated and will be removed in future versions.","severity":"deprecated","affected_versions":">=2.0.0"}],"env_vars":null,"search_vec":"'2.2.0':26 '3.14':30 '3.9':29 'activ':34 'api':23 'bioinformat':47 'common':6 'cpm':13,44 'current':24 'etc':16 'fpkm':14,45 'learn':21 'librari':32 'like':22 'maintain':35 'method':11 'norm':3 'normal':10,42 'provid':5 'python':28 'regular':37 'releas':38 'requir':27 'rna':2,8,40 'rna-norm':1 'rna-seq':7,39 'rnanorm':4 'scikit':20 'scikit-learn-lik':19 'seq':9,41 'tmm':15,46 'tpm':12,43 'version':25","created_at":"2026-05-01T08:13:34.388201+00:00","updated_at":"2026-05-01T08:13:34.388201+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.2.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/genialis/RNAnorm","docs":null,"changelog":null,"pypi":"https://pypi.org/project/rnanorm/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}