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.0rc1.tar.gz (128.7 kB view details)

Uploaded Source

Built Distribution

rnanorm-2.0.0rc1-py3-none-any.whl (118.7 kB view details)

Uploaded Python 3

File details

Details for the file rnanorm-2.0.0rc1.tar.gz.

File metadata

  • Download URL: rnanorm-2.0.0rc1.tar.gz
  • Upload date:
  • Size: 128.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for rnanorm-2.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 ba055723b145821d7145ec4e0124c34a19708337321a0045a9cf5750fdb6c681
MD5 aadbc42cbbccb162637daa5aa60bcfc5
BLAKE2b-256 dce461046b998307460bc107fe69d9aaf53f06201e5ef3b4c699c2f7f389efcc

See more details on using hashes here.

File details

Details for the file rnanorm-2.0.0rc1-py3-none-any.whl.

File metadata

  • Download URL: rnanorm-2.0.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 118.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for rnanorm-2.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 beb1ce499cbd69f959f2542defa4d542e232f472373c3b6fe14e9da1f69c278e
MD5 1600033b7643ac5fc743087a527682f3
BLAKE2b-256 63dd917273c1b985643a378f729c7cb5919377cb6fecdb1b44f8b1021c3cfdb3

See more details on using hashes here.

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