As part of the paper Transcripts Per Million Ratio: a novel batch and sample control methodover an established paradigm by Hilbert Lam and Robbe Pincket.
Installation can be done with Pip. Python 3.6+.
pip install ribonorma
pip3 install ribonorma
-
Suppose you have two files, one file with the raw RNASeq count data (example) and one file with the phenotype file data (example).
-
Run
ribonorma-normalise
import csv
from ribonorma import ribonorma
reads = list(csv.read( ... )) # Reads
gene_length = [] # List of gene lengths
conditions = ["Standard media", "Standard media", "Standard media", "Super media", "Super media", "Super media"] # Example conditions
normalised_counts = ribonorma.tpmr(reads, gene_length, conditions, percent_housekeep=10)
ribonorma.tpm(reads, gene_length)
reads
: 1D list of read countsgene_length
: 1D list of individual gene lengths
ribonorma.tpmm(samples, gene_length)
samples
: 2D list of sample read counts - [sample x count]gene_length
: 1D list of individual gene lengths
ribonorma.tpmr(samples, gene_length, experimental_conditions, percent_housekeep=10)
samples
: 2D list of sample read counts - [sample x count]gene_length
: 1D list of individual gene lengthsexperimental_conditions
: 1D list of individual experimental conditions, same size assamples
alpha
: floating point value of percent housekeep as stated in the paper
ribonorma.tpmr_2(samples, gene_length, experimental_conditions, percent_housekeep=10)
samples
: 2D list of sample read counts - [sample x count]gene_length
: 1D list of individual gene lengthsexperimental_conditions
: 1D list of individual experimental conditions, same size assamples
alpha
: floating point value of percent housekeep as stated in the paper