I want to get the expression data that is in-sample normalized like FPKM and also across samples normalized as obtained using DESeq2 or else.
What I am currently doing is that I first normalize the data across samples (using DESeq) and from the resultant expression I calculate the FPKM. Does it make sense or am I missing something here?
This is how I am doing (not the exact code but the idea)
dds <- DESeqDataSetFromMatrix(countData, DataFrame(condition), ~ condition)
dds <- estimateSizeFactors(dds)
norm_data <- counts(dds, normalized=TRUE)
foreach sample
{
foreach transcript
{
FPKM = (Normalized read count * 10^9) / (transcript length * total mapped normalized read count)
}
}