class

HTS::Bam::Pileup

Inherits Enumerable < Reference < Object

High-level pileup iterator over a single BAM/CRAM input. Yields Column objects with tid, pos, and alignments at each position.

Constructors

new(bam : Bam, region : String | Nil = nil, maxcnt : Int32 | Nil = nil)

Create a Pileup iterator @param bam [HTS::Bam] @param region [String, nil] Optional region string (e.g., "chr1:1000-2000", requires index) @param maxcnt [Int32, nil] Max per-position depth (capped)

Source

Class methods

open(bam : Bam, region : String | Nil = nil, maxcnt : Int32 | Nil = nil, &)

Open a Pileup iterator with block (RAII style)

Source
open(bam : Bam, *, region : String | Nil = nil, maxcnt : Int32 | Nil = nil, &)

Open a Pileup iterator using keyword arguments, matching Mpileup.

Source

Instance methods

close

Release native resources

Source
each

Iterate over pileup columns

Source
finalize
Source
reset

Reset internal state, if needed by the caller

Source

Nested types