I have some RNA-seq samples that I want to normalize and then output RPKM expression, but I am unsure how to do this.
This is my pipeline so far:
1. Normalise raw read counts with TMM in edgeR
expr <- DGEList(counts=data, group=conditions)
expr <- calcNormFactors(expr)
group lib.size norm.factors
Sample1 F 19770521 1.0462660
Sample2 F 17970679 0.8794805
Sample3 F 19184265 1.0573665
QUESTION: How do I get normalized raw read counts from this? Do I multiply the read counts by the norm.factors?
QUESTION: Ultimately, I want to end up with RPKM values for each gene in each sample. I know I can use the rpkm() function below in edgeR
expr_norm <- rpkm(expr, log=FALSE,gene.length=vector)
but is expr the output from calcNormFactors or something else?
Thanks for your help!