Skip to main content

Common RNAseq normalization methods

Project description

Build Status Code Style Black Documentation Status Version on PyPI Supported Python versions Number of downloads from PyPI

Python implementation of common RNAseq normalization methods:

  • CPM (Counts per million)

  • FPKM (Fragments per kilobase million)

  • TPM (Transcripts per million)

  • UQ (Upper quartile)

  • CUF (Counts adjusted with UQ factors)

  • TMM (Trimmed mean of M-values)

  • CTF (Counts adjusted with TMM factors)

Features

  • Pure Python implementation (no need for R, etc.)

  • Scikit-learn compatible

  • Command line interface

  • Verbose documentation (at least we hope so…)

  • Tested methods

Install

We recommend installing RNAnorm with pip:

pip install rnanorm

Quick start

Implemented methods can be used from Python or from the command line.

Normalize from Python

Most commonly normalization methods are run from Python. E.g.:

>>> from rnanorm.datasets import load_rnaseq_toy
>>> from rnanorm import FPKM
>>> dataset = load_rnaseq_toy()
>>> dataset.exp
       G1     G2      G3      G4       G5
S1  200.0  300.0   500.0  2000.0   7000.0
S2  400.0  600.0  1000.0  4000.0  14000.0
S3  200.0  300.0   500.0  2000.0  17000.0
S4  200.0  300.0   500.0  2000.0   2000.0
>>> fpkm = FPKM(dataset.gtf_path).set_output(transform="pandas")
>>> fpkm.fit_transform(dataset.exp)
          G1        G2        G3        G4        G5
S1  100000.0  100000.0  100000.0  200000.0  700000.0
S2  100000.0  100000.0  100000.0  200000.0  700000.0
S3   50000.0   50000.0   50000.0  100000.0  850000.0
S4  200000.0  200000.0  200000.0  400000.0  400000.0

Normalize from command line

Often it is handy to do normalization from the command line:

rnanorm fpkm exp.csv --gtf annotation.gtf --out exp_fpkm.csv

Contribute

To learn about contributing to the code base, read the Contributing section.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rnanorm-2.0.0rc2.tar.gz (129.6 kB view hashes)

Uploaded Source

Built Distribution

rnanorm-2.0.0rc2-py3-none-any.whl (119.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page