Exporting normalized counts data from DeSeq2
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](reprex.tidyverse.org) (v2.0.1)
Thank you,
Toufiq
• 51 views
Read more here: Source link