[Bioc-sig-seq] There is a bug living in Rsamtools_1.0.6:::.io_bam codepath.

Martin Morgan mtmorgan at fhcrc.org
Wed Jul 28 02:27:41 CEST 2010


On 07/27/2010 03:27 PM, Steve Lianoglou wrote:
> 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?

Thanks Steve, fixed in 1.0.7, in svn now or via biocLite within 36 hours.

Martin

> 
> 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
> 


-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the Bioc-sig-sequencing mailing list