DESeq2 variance transformation error and plot dispersion Estimate
1
1
Entering edit mode
yuan.qing ▴ 10
@yuanqing-8002
Last seen 9.4 years ago
United States

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!

 

deseq2 • 6.8k views
ADD COMMENT
2
Entering edit mode
@mikelove
Last seen 22 hours ago
United States

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 COMMENT
0
Entering edit mode

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 REPLY
1
Entering edit mode

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 REPLY
0
Entering edit mode

Ryan is right.

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

ADD REPLY

Login before adding your answer.

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