Hi,

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:

Normalise raw read counts with TMM in edgeR

    expr <- DGEList(counts=data, group=conditions)
    expr <- calcNormFactors(expr)

output:

    $samples
                            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!

A
The library size normalized counts are made by dividing the counts by the normalization factor (you'll note that the larger libraries have larger normalization factors, so if you multiplied things you'd just inflate the difference in sequencing depth).

For the rpkms, just do `rpkm(expr, gene.length=vector)`, since it can take your `DGEList`, (this is explained in `help(rpkm)`).