R/scanBamHeader.R

setMethod(scanBamHeader, "character", 
          function(files, ...)
{
    files <- .normalizePath(files)
    lst <- lapply(files, function(file) {
        bam <- open(BamFile(file, character(0)))
        on.exit(close(bam))
        scanBamHeader(bam, ...)
    })
    names(lst) <- files
    lst
})
Bioconductor/Rsamtools documentation built on Oct. 31, 2024, 1:23 p.m.