samtools- Binding to the C samtools library

Safe HaskellSafe-Infered



This module provides an interface to sorted, indexed BAM alignment files, which allow rapid extraction of alignments that lie within one specific region of one sequence.



data IdxHandle Source

Handle for fetching alignments by region from a sorted, indexed BAM file.

idxFilename :: IdxHandle -> FilePathSource

Filename of sorted, indexed BAM file

idxHeader :: IdxHandle -> HeaderSource

Target sequences

open :: FilePath -> IO IdxHandleSource

Open a sorted, indexed BAM file.

readBamRegion :: IdxHandle -> Int -> (Int64, Int64) -> IO [Bam1]Source

Use a BAM index file to extract Bam1 records aligned to a specific target sequence (chromosome) number and region.