[BioC] Rsamtools Error: vector of negative length
Christoph Bartenhagen
Christoph.Bartenhagen at ukmuenster.de
Tue Nov 9 15:52:58 CET 2010
Hi again,
thank you very much for your reply. It sounds very reasonable to me and
it explains why it works with smaller BAM-files, i.e. files containing
fewer reads.
To track down the error, here's my sessionInfo() some more info about my
error (I am not sure though how to generate a (small) reproducible
example, since the problem seems to be related to quite large alignment
files):
> bam = scanBam(file="alignment.bam")
Error in .Call(func, file, index, "rb", NULL, flag, simpleCigar, ...) :
negative length vectors are not allowed
> sessionInfo()
R version 2.12.0 (2010-10-15)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Rsamtools_1.2.0 Biostrings_2.18.0 GenomicRanges_1.2.0
[4] IRanges_1.8.0
loaded via a namespace (and not attached):
[1] Biobase_2.10.0
My BAM-file contains 69.654.881 reads of length 36bp each.
If this problem has already been adressed, do I need to update my
version of Rsamtools (1.2.0)? I just saw that the release version is
1.2.1 and the development version is 1.3.4.
Thanks for any further advice,
Christoph
Am 09.11.2010 14:52, schrieb Martin Morgan:
> On 11/09/2010 05:22 AM, Christoph Bartenhagen wrote:
>
>> Hello everyone,
>>
>> I am experiencing a strange error, while reading (large) BAM-files (>
>> 2GB) in R with the function scanBam() in the Rsamtools package.
>> It stops saying "negative length vectors are not allowed".
>>
>> I think my BAM-file is ok, because I can read it in small chunks like
>> reads on positive strand first, then reads on the negative strand (using
>> ScanBamParam). This might be a more general Error in R because it seems
>> to occur in very different R programs.
>>
>> Has anyone experienced this error?
>> I would really appreciate any ideas how to fix this problem or
>> concerning the reason for this error (I don't really understand what a
>> "negative length vector" is).
>>
> Hi Christoph --
>
> This is an integer overflow when the (accumulated) underlying DNA or
> quality strings are too long. But I think this has been addressed and so
> your sessionInfo() and a reproducible example (or at least the explicit
> command that triggers the problem) would help.
>
> Martin
>
>
>> Thanks in advance
>> Christoph
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives:
>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
>
>
More information about the Bioconductor
mailing list