[BioC] edgeR exactTest dispersion value of 0 gives error

Gordon K Smyth smyth at wehi.EDU.AU
Fri Aug 24 06:37:18 CEST 2012


Dear Surjyendu Ray,

Please write to the Bioconductor list, not to me personally.

On Thu, 23 Aug 2012, Surjyendu Ray wrote:

> Dear Sir,
>             An associate of mine, is using version 1.16.12 of edgeR and
> has run the same exactTest(), using a dispersion of 0.

As far as I can tell from Bioconductor records, there never was a version 
1.16.12 of edgeR.  edgeR 1.8.0 was released as part of the Bioconductor 
release of 14 October 2010.  edgeR 2.2.0 was released as part of the 
Bioconductor release of 14 April 2011.  Updates in between those dates 
would normally have version numbers starting with 1.8 following by another 
number, like 1.8.X.

Considering all the improvements made in the past two years, continuing to 
use an edgeR installation from 2010, as your associate is doing, makes no 
sense at all.  In particular, he or she is missing out on major 
improvements that were made to exactTest in September 2011.

> He is however, not getting any error, working with the same workspace as 
> mine. I, am using the latest version of edgeR, which is refusing to run 
> the exactTest command with a dispersion value of 0, as is shown in the 
> following command:
> FM_HCV1_HCM1.exactTest2 = exactTest(FM_HCV1_HCM1.TagwiseDisp, pair = c( 1, 2 ), dispersion = 0 )

It would seem that you are ignoring the dispersion estimated by edgeR, and 
are instead inputing your own value that has no support from the data. 
Why do this?  The whole purpose of the edgeR package is to estimate and 
use a positive value for the dispersion.

Anyway, I have committed today yet another version 2.6.11 of edgeR to 
Bioconductor that should avoid the error message that you mention in all 
circumstances.  Whether it solves your specific problem, I cannot tell, 
because you did not send me a reproducible code example as I asked for.

Best wishes
Gordon

>      Please do let me know if it will be possible for me to download that
> older version of edgeR. Also, since the two versions are temporally
> separated, please do let me know of some of the updates that have been
> incorporated into release 2.6.10, which I believe is the latest version,
> that makes it distinct from release 1.16.
>           Thanking you,
>                                    Yours faithfully,
>                                    Surjyendu Ray.
>
>
> On Tue, Aug 7, 2012 at 7:32 PM, Gordon K Smyth <smyth at wehi.edu.au> wrote:
>
>> Dear Surjyendu Ray,
>>
>> In my experience, exactTest() does not give an error for dispersion=0, as
>> the reproducible code example below shows.  If you believe there is a
>> problem, please provide an example of code that I can run that will
>> reproduce the error message.  Please see the posting guide (third paragraph
>> of "Preparing"):
>>
>>   http://www.bioconductor.org/help/mailing-list/posting-guide
>>
>> Best wishes
>> Gordon
>>
>>  example(exactTest)
>>> topTags(exactTest(d,**dispersion=0))
>>>
>> Comparison of groups:  2-1
>>              logFC   logCPM       PValue         FDR
>> Gene.18 -2.2658941 12.87267 0.0003249142 0.004719867
>> Gene.2   1.8744691 13.21371 0.0004719867 0.004719867
>> Gene.13 -1.8002305 12.96578 0.0021024016 0.014016010
>> Gene.16  1.4947647 12.91998 0.0106738405 0.053369203
>> Gene.19 -0.8400591 13.77314 0.0440465461 0.176186184
>> Gene.1   0.7182290 13.89652 0.0721774385 0.240591462
>> Gene.3  -0.4117248 13.94306 0.3135030533 0.884136677
>> Gene.5  -0.4786536 13.13571 0.4050322461 0.884136677
>> Gene.8   0.3658714 13.74714 0.4187541883 0.884136677
>> Gene.17  0.5305147 12.72067 0.4420683384 0.884136677
>>
>>> sessionInfo()
>>>
>> R version 2.15.1 (2012-06-22)
>> Platform: i386-pc-mingw32/i386 (32-bit)
>>
>> locale:
>> [1] LC_COLLATE=English_Australia.**1252  LC_CTYPE=English_Australia.**1252
>> LC_MONETARY=English_Australia.**1252
>> [4] LC_NUMERIC=C                       LC_TIME=English_Australia.1252
>>
>>
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>
>> other attached packages:
>> [1] edgeR_2.6.10        limma_3.13.15       BiocInstaller_1.4.7
>>
>> loaded via a namespace (and not attached):
>> [1] tools_2.15.1
>>
>>
>>
>>
>>
>> On Tue, 7 Aug 2012, Surjyendu Ray wrote:
>>
>>  Dear Sir,
>>>             I have tried out the procedure using the latest version of R
>>> and edgeR, however, I am still getting the same error. Please advise.
>>>           Thanking you,
>>>                                     Yours faithfully,
>>>                                     Surjyendu Ray.
>>>
>>> On Sat, Aug 4, 2012 at 2:56 AM, Gordon K Smyth <smyth at wehi.edu.au> wrote:
>>>
>>>  Please install the current release version of R and edgeR.
>>>>
>>>> Gordon
>>>>
>>>>  Date: Thu,  2 Aug 2012 13:54:33 -0700 (PDT)
>>>>
>>>>> From: "Surjyendu Ray [guest]" <guest at bioconductor.org>
>>>>> To: bioconductor at r-project.org, surjray at gmail.com
>>>>> Subject: [BioC] edgeR exactTest dispersion value of 0 gives error
>>>>>
>>>>>
>>>>> Dear all,
>>>>>
>>>>>
>>>>          I am trying to see differentially expressed genes between two
>>>>
>>>>> samples, each with three replicates. I am using edgeR to do the
>>>>> analysis.
>>>>> However, when I am running the exactTest using the following command, I
>>>>> am
>>>>> getting an error.
>>>>>
>>>>>
>>>>  FM_HCV1_HCM1.exactTest2 = exactTest( FM_HCV1_HCM1.TagwiseDisp, pair = c(
>>>>
>>>>> 1, 2 ), dispersion = 0 )
>>>>> The error message is:
>>>>> Error in binomTest(s1[pois], s2[pois], p = n1/(n1 + n2)) :
>>>>>  y1 and y2 must be non-negative
>>>>> If I do a traceback(), the output is:
>>>>> 4: stop("y1 and y2 must be non-negative")
>>>>> 3: binomTest(s1[pois], s2[pois], p = n1/(n1 + n2))
>>>>> 2: exactTestDoubleTail(y1, y2, dispersion = dispersion, big.count =
>>>>> big.count)
>>>>> 1: exactTest(FM_HCV1_HCM1.****TagwiseDisp, pair = c(1, 2), dispersion
>>>>> = 0)
>>>>>
>>>>>
>>>>>     However, any other value for dispersion is working well, especially
>>>>> values that are very small, e.g. 1e-10. I am confused as to why
>>>>> dispersion
>>>>> = 0 is producing that error.
>>>>>
>>>>>
>>>>      Thanking you.
>>>>
>>>>>
>>>>> -- output of sessionInfo():
>>>>>
>>>>> R version 2.14.1 (2011-12-22)
>>>>> Platform: x86_64-redhat-linux-gnu (64-bit)
>>>>>
>>>>> locale:
>>>>> [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>>>>> [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>>>>> [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
>>>>> [7] LC_PAPER=C                 LC_NAME=C
>>>>> [9] LC_ADDRESS=C               LC_TELEPHONE=C
>>>>> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>>>>>
>>>>> attached base packages:
>>>>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>>>>
>>>>> other attached packages:
>>>>> [1] edgeR_2.4.6  limma_3.10.3
>>>>>

______________________________________________________________________
The information in this email is confidential and intend...{{dropped:4}}



More information about the Bioconductor mailing list