Skip to main content

Normalization of RNA-seq gene expression.

Project description

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

Normalization of RNA-seq gene expression data. Supported methods:

  • Counts per million (CPM)

  • Transcript per kilobase million (TPM)

  • Quantile normalization to average distribution

The TPM normalization can either accept pre-computed gene lengths on the input or compute gene lengths from gene annotation in GTF format, using the union exon-based approach. The computed gene lengths are identical to the lengths reported by featureCounts (validated for Homo sapiens, Mus musculus, Rattus norvegicus, and Macaca mulatta of ENSEMBL and UCSC annotations).

Quantile normalization is implemented as described on Wikipedia. First, we compute an average distribution by sorting each sample (column) and taking the mean over rows to determine the rank values. Second, we compute ranks over columns (samples) and substitute the rank with the rank value (average expression for each rank).

Usage

Install rnanorm Python package:

pip install rnanorm

See rnanorm command help:

rnanorm --help

Run rnanorm with pre-computed gene lengths:

rnanorm expr.tsv --cpm-output=expr.cpm.tsv --tpm-output=expr.tpm.tsv --gene-lengths=lengths.tsv

Run rnanorm with genome annotation - gene lengths will be computed on the fly:

rnanorm expr.tsv --cpm-output=expr.cpm.tsv --tpm-output=expr.tpm.tsv --annotation=annot.gtf

For quantile normalization we suggest using TPM expressions on the input:

rnanorm expr.tpm.tsv --quantile-output=expr.quantile.tsv

Contributing

Install rnanorm Python package for development:

flit install --deps=all --symlink

Run all tests and linters:

tox

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-1.4.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

rnanorm-1.4.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file rnanorm-1.4.0.tar.gz.

File metadata

  • Download URL: rnanorm-1.4.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for rnanorm-1.4.0.tar.gz
Algorithm Hash digest
SHA256 f04dd1e03fd76813eb6760398730832fff5484750ca3c30a30b03fbe96e4519d
MD5 982177ea31e050d73a91d616a1aa51de
BLAKE2b-256 f9254ac41a23afdbfac27e93d0e802458a49be91334c2dc1b0401fa2219a9d93

See more details on using hashes here.

File details

Details for the file rnanorm-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: rnanorm-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for rnanorm-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 adcadad0d71efc5feb75e371a93fac42138f17608630cac41058959b23610565
MD5 381fbcc3f063dea58ec10fd795fffd3e
BLAKE2b-256 27fe51ec29ec6cd7a3b6a934f72806a2be442de7d43c03d4f263842af886b7ff

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