Search
Question: Data normalization and transformation using DESeq2
0
gravatar for chiara.facciotto
8 days ago by
chiara.facciotto0 wrote:

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)
0
gravatar for Michael Love
8 days ago by
Michael Love20k
United States
Michael Love20k wrote:

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 COMMENTlink written 8 days ago by Michael Love20k
0
gravatar for chiara.facciotto
8 days ago by
chiara.facciotto0 wrote:

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

ADD COMMENTlink written 8 days ago by chiara.facciotto0

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

ADD REPLYlink modified 8 days ago • written 8 days ago by Steve Lianoglou12k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 244 users visited in the last hour