a TPM sample always sums to 1,000,000.

scale_to_million(sample)

Arguments

sample

numeric vector of gene expression values

Details

This function takes an input vector and rescales it, so that the sum of the vector equals 1e6.