[BioC] estimating size factors in DESeq produces warnings

Simon Anders anders at embl.de
Tue Jan 14 20:24:32 CET 2014


Hi Assa

On 14/01/14 18:55, Assa Yeroslaviz wrote:
> I am using Deseq to analyze my data. I have three replica for each of the
> two conditions.

First: Please always include some information about the biology of your
experiment. These thing tend to matter more than people think when
discussing statistics.

Your dispersion plot seems to linearly fall down all the way to 10^-6.
For biological replicates, this is more than just unusual. Which steps
exactly have you replicated in your experiment?


> cds = newCountDataSet( Counts_set, condition )
> cds = estimateSizeFactors( cds ) # uses the median as location function
> cds = estimateDispersions( cds )
> I get the following error massage:
> There were 16 warnings (use warnings() to see them)
>> warnings()
> Warning messages:
> 1: In log(ifelse(y == 0, 1, y/mu)) : NaNs produced
> 2: step size truncated due to divergence

There is no error, there are warnings. (That's not the same thing; sorry
for nitpicking.)

Here, the warnings inform you that something might have gone wrong when
determining the fit. Hence you should inspect the dispersion plots to
verify that the fit worked -- as you did.

> Is it preferable to run the analysis with local fit type?

No. If you compare your two plots, it is very clear that
fitType="parametric" gave you a good fit (red line goes through the
point cloud), and for fitType="local", something went completely wrong.
I actually have no clue why the fit looks that strange.

Why does the plot titles say "using fit-only mode", by the way? You
should not use fit-only mode, except in very special cases.

> When I am doing the same analysis, but with fitType="local" the warnings
> disappears.

This is actually odd. The warnings relate to the estimation, not the
fitting, so there should be no difference. I would need to see your
exact code to get at the bottom of this, but I guess, you somehow
accidentally overwrite some data.

> I read that this happens ,When One is using the analysis without replica,
> but I have three for each condition.

No, it has nothing to do with that.

> What is the meaning of these warnings?

It means that some intermediate calculations during the fit resulted in
some infinities. A fit tries various values, if some does not work, the
fitter typically tries something else. Therefore, the warning is usually
harmless; we should maybe suppress it.

Finally: As you are only at the beginning of your analysis, please
consider starting over with DESeq2. We intend to phase out support for
the old DESeq package with time, as its methodology is rather outdated
by now.

  Simon



More information about the Bioconductor mailing list