Entering edit mode
Nikolay Ivanov
•
0
@nikolay-ivanov-23079
Last seen 3.4 years ago
USA/New York City/Weill Cornell Medicine
The DESeq2 vignette states that both the variance stabilizing transformation and regularized log transformation "produce transformed [count] data on the log2 scale which has been normalized with respect to library size or other normalization factors". If I am not providing any normalization factors (like in my code below), the gene counts are normalized with respect to library size by default, correct? I'm sure that's the case, but wanted to double check to be certain.
Thank you!
library(DESeq2)
library(tximeta)
# import data
se = tximeta(coldata = metadata, type = "salmon")
# summarize transcript-level quantifications to gene-level
gse = summarizeToGene(se)
# make DESeqDataSet object
dds = DESeqDataSet(gse, design = ~ COI)
#perform pre-filtering to keep only rows that have at least 10 reads total
keep <- rowSums(counts(dds)) >= 10
dds <- dds[keep,]
# make a transformed count matrix, using variance stabilizing transformation (VST)
vsd = vst(dds, blind=FALSE)
vst_counts = as.matrix(assay(vsd))
And then once the the size factors are computed, they are used to normalize the gene counts with respect to library size, correct?
Yes, i.e., it is then the 'normalised' counts on which the variance-stabilising transformation is perfromed: https://github.com/mikelove/DESeq2/blob/master/R/vst.R#L153
The size factor is a combination of library size and composition, but basically yes.