From counts to TPM code verification
Hey, I'm getting odd results in my analysis and wanted to verify my code is right (from raw counts to TPM). First I normalize to RPKM and only then I convert to TPM, by this code:
rpkm = apply(X = subset(counts),
MARGIN = 2,
FUN = function(x) {
10^9 * x / geneLengths / sum(as.numeric(x))
})
TPM = apply(rpkm, 2, function(x) x / sum(as.numeric(x)) * 10^6) %>% as.data.frame()
What do you think? seems ok right ?
• 971 views
•
link
1 answer
I assume you know that these simple per-million scalings might underperform quite a bit, TMM-Normalization
• 0 views
•
link
Log in to answer this question.