Hi! I am trying to get the normalized counts after having run DESeq() with my DESeqDataSet, in order to then use these normalized counts to run GSEA analysis using their app. The code below is what I have used, but I was wondering if this normalization is only done considering the transcript lengths or whether it also considers the experimental design (~line + treatment in this case).
#First run Tximeta and summarize the results to gene level
se <- tximeta(coldata)
gse <- summarizeToGene(se)
#create the DESeqDataSet
ddsTxi <- DESeqDataSet(gse, design = ~ line + treatment)
#Filter out the genes with low counts
dds <- ddsTxi[rowSums(counts(ddsTxi)) >= 20]
#Run DESeq()
dds <- DESeq(dds)
#Get the normalized counts
norm_counts <- counts(dds, normalized=TRUE)
Is this correct? Thank you for your help!
The size factors are independent of the experimental design. The only "normalization" method that takes a design is vst and rlog, see the vignette.