Clarification re VST transformed data in DESeq2
1
0
Entering edit mode
@nikolay-ivanov-23079
Last seen 23 days 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))

DESeq2 • 163 views
1
Entering edit mode
ATpoint ▴ 700
@atpoint-13662
Last seen 1 day ago
Germany

If there are no size factors they will be created: https://github.com/mikelove/DESeq2/blob/master/R/vst.R#L125-L126

0
Entering edit mode

And then once the the size factors are computed, they are used to normalize the gene counts with respect to library size, correct?

1
Entering edit mode

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

1
Entering edit mode

The size factor is a combination of library size and composition, but basically yes.