Exporting normalized counts data from DeSeq2
1
0
Entering edit mode
28 days 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 normalozed 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](https://reprex.tidyverse.org) (v2.0.1)

Thank you,

Toufiq

rna-seq DESeq2 normalization expression • 206 views
ADD COMMENT
1
Entering edit mode
28 days ago
ATpoint 54k

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: 1977 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