Exporting normalized counts data from DeSeq2
1
0
Entering edit mode
3.3 years ago

Hi,

I am working with large RNA-Seq dataset downloaded from the NCBI GEO. I would like to export the normalized counts data from DeSeq2 based on size factor normalization for further downstream analysis. It seems like running dds <- DESeq(dds) and dds <- estimateSizeFactors(dds) outputs the same results. Is my understanding correct? Please let me know if I could use any of these to export the normalized counts data.

library("DESeq2")

dds <- DESeqDataSetFromMatrix(countData = round(Counts_data), colData = sample_info, design = ~ Disease_state)


## 1
dds <- estimateSizeFactors(dds)
sizeFactors(dds)
normalized_counts <- counts(dds, normalized=TRUE)
write.csv(normalized_counts, file="normalized_counts.csv")


## 2
dds <- DESeq(dds)
sizeFactors(dds)
normalized_counts_DESeq <- counts(dds, normalized=TRUE)
write.csv(normalized_counts_DESeq, file="normalized_counts_DESeq.csv")

Created on 2021-09-20 by the [reprex package][1] (v2.0.1)

Thank you,
Toufiq

DESeq2 normalization expression RNA-seq • 3.4k views
ADD COMMENT
2
Entering edit mode
3.3 years ago
ATpoint 86k

It is the same:

> set.seed(1)
> dds <- makeExampleDESeqDataSet()
> all(counts(DESeq(dds), normalized=TRUE) == counts(estimateSizeFactors(dds), normalized=TRUE))
estimating size factors
estimating dispersions
gene-wise dispersion estimates
mean-dispersion relationship
final dispersion estimates
fitting model and testing
[1] TRUE

estimateSizeFactors runs as part of DESeq as, see the manual,

https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#what-are-the-exact-steps-performed-by-deseq

and ?DESeq:

(...)
This function performs a default analysis through the steps:

estimation of size factors: estimateSizeFactors

estimation of dispersion: estimateDispersions

Negative Binomial GLM fitting and Wald statistics: nbinomWaldTest
(...)
ADD COMMENT
0
Entering edit mode

ATpoint thank you very much. This was helpful.

ADD REPLY

Login before adding your answer.

Traffic: 1543 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6