Entering edit mode
3.6 years ago
v.johnson
▴
30
I am using the below code to calculate TPM which I found on GitHub. Can anyone just confirm please what the '2' in the tpms code equates to please? I am new to RNAseq and normalisation analysis and what to understand the code fully.
Thank you kindly
`tpm <- function(counts, lengths) { rate <- counts / lengths rate / sum(rate) * 1e6 }
tpms <- apply(counts, 2, function(x) tpm(x, genes$Length))`
Thank you for your kind reply, that is most helpful, thank you, Victoria