[Bioc-devel] Rsamtools: Is extdata/ex1.bam.bai outdated?

Henrik Bengtsson hb at biostat.ucsf.edu
Sat Apr 19 03:37:28 CEST 2014


When I re-index Rsamtools::extdata/ex1.bam I get a different and
larger index file:

bam <- system.file("extdata", "ex1.bam", package="Rsamtools")
bai <- system.file("extdata", "ex1.bam.bai", package="Rsamtools")

# Reindex
bam2 <- basename(bam)
file.copy(bam, bam2)
bai2 <- Rsamtools::indexBam(bam2)

# New index file is greater
file.info(c(bai, bai2))$size
## [1]  72 176

unname(sapply(c(bai, bai2), function(f) digest::digest(file=f)))
## [1] "f3fa4087d439dad4d404b34dad491747"
## [2] "1888862b9d22ddb8ca663eabc41c78f0"

Is the package's index file generated with an outdated version of
[R]samtools?  According to the SVN logs it dates back to 2009-08-08.
Sorry if this is a FAQ.

I get this with Rsamtools 1.16.0 on both Linux and Windows:

> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
 [1] BiocGenerics_0.10.0  Biostrings_2.32.0    bitops_1.0-6
 [4] digest_0.6.4         GenomeInfoDb_1.0.2   GenomicRanges_1.16.1
 [7] IRanges_1.22.3       parallel_3.1.0       Rsamtools_1.16.0
[10] stats4_3.1.0         tools_3.1.0          XVector_0.4.0
[13] zlibbioc_1.10.0


> sessionInfo()
R version 3.1.0 Patched (2014-04-10 r65396)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
 [1] BiocGenerics_0.10.0  Biostrings_2.32.0    bitops_1.0-6
 [4] digest_0.6.4         GenomeInfoDb_1.0.2   GenomicRanges_1.16.1
 [7] IRanges_1.22.2       parallel_3.1.0       Rsamtools_1.16.0
[10] stats4_3.1.0         tools_3.1.0          XVector_0.4.0
[13] zlibbioc_1.10.0

/Henrik



More information about the Bioc-devel mailing list