Search
Question: DESeq2 variance transformation error and plot dispersion Estimate
0
gravatar for yuan.qing
2.4 years ago by
yuan.qing0
United States
yuan.qing0 wrote:

Hi, 

I was trying to visualize the normalized count of my data, however, I was running into errors:

normalized.count <- as.data.frame(counts(DESeq2, normalized=TRUE))

Error in as.data.frame(counts(DESeq2, normalized = TRUE)) : 
  error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': Error in .local(object, ...) : 
  first calculate size factors, add normalizationFactors, or set normalized=FALSE

I was following DESeq2 vignette, whenever I put "normalized=TRUE",  like 

select<-order(rowMeans(counts(DESeq2, normalized=TRUE)), decreasing=TRUE)[1:30]
Error in .local(object, ...) : 
  first calculate size factors, add normalizationFactors, or set normalized=FALSE.

But how do I add normalizationFactors?

 

Also when I ran plot Dispersion Estimates, the following error message is shown:

plotDispEsts(DESeq2)
Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In min(py[py > 0], na.rm = TRUE) :
  no non-missing arguments to min; returning Inf
2: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
3: In min(x) : no non-missing arguments to min; returning Inf
4: In max(x) : no non-missing arguments to max; returning -Inf
5: In min(x) : no non-missing arguments to min; returning Inf
6: In max(x) : no non-missing arguments to max; returning -Inf

If anyone knows how to solve the problem? 

Thanks a lot!

 

ADD COMMENTlink modified 2.4 years ago by Michael Love15k • written 2.4 years ago by yuan.qing0
0
gravatar for Michael Love
2.4 years ago by
Michael Love15k
United States
Michael Love15k wrote:

if you have a DESeqDataSet, dds, then you need to first run:

dds <- estimateSizeFactors(dds)

You can take a look at the help pages for these functions for more information:

?counts

?estimateSizeFactors

In order to visualize dispersion values, you need to have calculated dispersion values. This will occur by using the DESeq() function:

dds <- DESeq(dds)
ADD COMMENTlink modified 2.4 years ago • written 2.4 years ago by Michael Love15k

Right, I renamed it to be DESeq2_1 instead of DESeq2, my mistake. Thank you very much!

Another question is, do I need to filter low gene expression before inputting into DESeq2?

ADD REPLYlink written 2.4 years ago by yuan.qing0
1

I believe the standard DESeq2 pipeline automatically performs low count filtering for you, and does so in a principled way rather than picking an arbitrary cut-off.

ADD REPLYlink modified 2.4 years ago • written 2.4 years ago by Ryan C. Thompson6.1k

Ryan is right.

This is described in the vignette ("independent filtering").

ADD REPLYlink written 2.4 years ago by Michael Love15k
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: 231 users visited in the last hour