inst/unitTests/test_bam_header.R

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

test_readBamHeader <- function()
{
    res <- scanBamHeader(fl)
    checkIdentical(Rsamtools:::.normalizePath(fl), names(res))
    exp <- structure(c(1575L, 1584L), .Names = c("seq1", "seq2"))
    checkIdentical(exp, res[[1]][["targets"]])
}

Try the Rsamtools package in your browser

Any scripts or data that you put into this service are public.

Rsamtools documentation built on Nov. 8, 2020, 8:11 p.m.