Data normalization and transformation using DESeq2
2
0
Entering edit mode
@chiarafacciotto-18662
Last seen 4.6 years ago

Hi,

I am trying to use DESeq2 to perform normalization of my RNA-Seq data. I am wondering if, after estimating the size factors, I can directly run the rlog or vst transformation, or if I also need to use the count function in between. Basically I wonder which is the correct one between option 1 or option 2 of the codes reported below (in bold I highlighted the difference between the two scripts).

Thank you very much for your help!!!

Option 1:

  # Import data
  dds <- DESeqDataSetFromMatrix(countData = counts, colData = colData, design = ~ 1)

  # Pre-filtering
  dds <- dds[ rowSums(counts(dds)) > 0, ]

  # Estimate factor for normalization
  dds <- estimateSizeFactors(dds)

  # Compute log2 counts
  rld <- rlog(dds, blind=FALSE)
  table.out <- assay(rld)

Option 2:

  # Import data
  dds <- DESeqDataSetFromMatrix(countData = counts, colData = colData, design = ~ 1)

  # Pre-filtering
  dds <- dds[ rowSums(counts(dds)) > 0, ]

  # Estimate factor for normalization
  dds <- estimateSizeFactors(dds)
  dds <- counts(dds, normalized=TRUE)

  # Compute log2 counts
  rld <- rlog(dds, blind=FALSE)
  table.out <- assay(rld)
deseq2 normalization rnaseq rlog transformation variancestabilizingtransformation • 3.6k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 15 hours ago
United States

The counts() function doesn't do any normalization, it just returns a matrix. So you don't want to do this: dds <- counts(dds, ...), because you've just replaced a DESeqDataSet (which has a lot of information in it) with a count matrix (which has less information). You've discarded all the information about genes and samples.

ADD COMMENT
0
Entering edit mode
@chiarafacciotto-18662
Last seen 4.6 years ago

Thanks! And is it ok to runĀ estimateSizeFactors(dss) before running rlog(dds, blind=FALSE)?

ADD COMMENT
0
Entering edit mode

Yes, you should. But if you haven't done that already, the rlog function will do that internally.

ADD REPLY

Login before adding your answer.

Traffic: 1050 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