[Bioc-devel] Slicing Throws Interger Overflow

Valerie Obenchain vobencha at fhcrc.org
Mon Oct 31 18:42:55 CET 2011


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