[Bioc-devel] Slicing Throws Interger Overflow

Valerie Obenchain vobencha at fhcrc.org
Tue Nov 1 21:18:35 CET 2011


Thanks for providing the file. The bug is now fixed in IRanges 1.12.1 in 
release and 1.13.1 in devel.

Valerie



On 10/31/2011 08:00 PM, Dario Strbenac wrote:
> Sorry about the version numbers. I replicated it on another computer, that had old versions of packages without realising this, as you pointed out, and pasted those session details into the report. However, the problem does occur on my main computer with the latest versions, too. Here is a specific and runnable example :
>
> library(Rsamtools)
> reads<- readBamGappedAlignments("http://129.94.136.7/file_dump/dario/RNA.bam") # 1.1 GB
> heights<- coverage(reads)
> low.counts<- slice(heights, upper = 2)
>
> I used :
>
> R version 2.13.2 (2011-09-30)
> Platform: x86_64-unknown-linux-gnu (64-bit)
>      ...                         ...
> other attached packages:
> [1] Rsamtools_1.4.3     Biostrings_2.20.4   GenomicRanges_1.4.8
> [4] IRanges_1.10.6
>
> ---- Original message ----
>> Date: Mon, 31 Oct 2011 10:42:55 -0700
>> From: Valerie Obenchain<vobencha at fhcrc.org>
>> Subject: Re: [Bioc-devel] Slicing Throws Interger Overflow
>> To: D.Strbenac at garvan.org.au
>> Cc: bioc-devel at r-project.org
>>
>> Dario,
>>
>> I can't reproduce the problem in R-2.13 or 2.14 with any value of
>> 'upper'. Could I get a copy of the file you're working with?  Is it
>> publicly available?
>>
>> I noticed your Rsamtools and Biostrings are quite old - even older than
>> the versions available for R-2.13. To cover all bases, please biocLite
>> up the most recent versions and try again.
>>
>>
>> Valerie
>>
>>
>> ## With 2.13 :
>>
>>> summary(galn)
>>            Length            Class             Mode
>>          72727432 GappedAlignments               S4
>>>   cov<- coverage(galn)
>>> sl<- slice(cov, upper=2)
>>> sessionInfo()
>> R version 2.13.0 Patched (2011-04-14 r55448)
>> Platform: x86_64-unknown-linux-gnu (64-bit)
>> ...
>> ...
>> other attached packages:
>> [1] Rsamtools_1.4.3       Biostrings_2.20.0     GenomicFeatures_1.4.5
>> [4] GenomicRanges_1.4.8   IRanges_1.10.6
>>
>>
>>
>> ## With 2.14 :
>>
>>> summary(galn)
>>            Length            Class             Mode
>>          72727432 GappedAlignments               S4
>>> cov<- coverage(galn)
>>> sl<- slice(cov, upper=2)
>>> sessionInfo()
>> R Under development (unstable) (2011-10-26 r57443)
>> Platform: x86_64-unknown-linux-gnu (64-bit)
>> ...
>> ...
>> other attached packages:
>> [1] Rsamtools_1.5.82       Biostrings_2.21.11     GenomicFeatures_1.5.39
>> [4] AnnotationDbi_1.15.48  Biobase_2.13.12        GenomicRanges_1.5.58
>> [7] IRanges_1.11.33
>>
>>
>>
>> On 10/29/2011 11:04 AM, Valerie Obenchain wrote:
>>> Hi Dario,
>>>
>>> Thanks for the report. I'll look into it.
>>>
>>> Valerie
>>>
>>>
>>> On 10/26/11 18:00, Dario Strbenac wrote:
>>>> Hello,
>>>>
>>>> I have a problem when slicing a coverage object with a maximum bound.
>>>> It gives an integer overflow error for a wide variety of upper values.
>>>>
>>>> e.g.
>>>>
>>>>> summary(reads)
>>>>             Length            Class             Mode
>>>>           19138567 GappedAlignments               S4
>>>> genome.coverage<- coverage(reads)
>>>>> low.counts<- slice(genome.coverage, upper = 2)
>>>> Error in do.call(c, unname(x)) : negative length vectors are not allowed
>>>> In addition: Warning message:
>>>> In newCompressedList("CompressedLogicalList", listData) :
>>>>     Integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'
>>>>
>>>> Is lapply over each chromosome necessary for this ? Using the lapply
>>>> approach, it works well.
>>>>
>>>> other attached packages:
>>>> [1] Rsamtools_1.3.34    Biostrings_2.19.18  GenomicRanges_1.4.8
>>>> IRanges_1.10.6
>>>>
>>>> --------------------------------------
>>>> Dario Strbenac
>>>> Research Assistant
>>>> Cancer Epigenetics
>>>> Garvan Institute of Medical Research
>>>> Darlinghurst NSW 2010
>>>> Australia
>>>>
>>>> _______________________________________________
>>>> Bioc-devel at r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>> _______________________________________________
>>> Bioc-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/bioc-devel



More information about the Bioc-devel mailing list