[Bioc-sig-seq] There is a bug living in Rsamtools_1.0.6:::.io_bam codepath.
Steve Lianoglou
mailinglist.honeypot at gmail.com
Wed Jul 28 00:27:39 CEST 2010
Howdy,
Running this code (from the example section of ?scanBam) results in
minor explosions:
#############
library(Rsamtools)
fl <- system.file("extdata", "ex1.bam", package="Rsamtools")
which <- RangesList(seq1=IRanges(1000, 2000),
seq2=IRanges(c(100, 1000), c(1000, 2000)))
p1 <- ScanBamParam(which=which)
res1 <- scanBam(fl, param=p1)
##Error in .io_bam(.scan_bam, file, index, reverseComplement, tmpl,
param = param) :
## internal: 'space[1]' must be character()
#############
Explicitly calling as.character(...) on what is returned from
`space(which)` in Rsamtools:::.io_bam should do the trick.
Specifically Rsamtools_1.0.6/R/io_bam.R line 17, from:
list(space(which), .uunlist(start(which)),
to
list(as.character(space(which)), .uunlist(start(which)),
I'm not sure ... maybe IRanges::space recently switch to returning
factors in stead of strings?
Anyway, the above bandaid is what I'm using now.
R> sessionInfo()
R version 2.11.1 (2010-05-31)
x86_64-apple-darwin9.8.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Rsamtools_1.0.6 Biostrings_2.16.9 GenomicRanges_1.0.6
IRanges_1.6.10
loaded via a namespace (and not attached):
[1] Biobase_2.8.0
--
Steve Lianoglou
Graduate Student: Computational Systems Biology
| Memorial Sloan-Kettering Cancer Center
| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact
More information about the Bioc-sig-sequencing
mailing list