class

HTS::Bam::Mpileup

Inherits Enumerable < Reference < Object

High-level mpileup iterator over multiple BAM/CRAM inputs. Yields an Array of Pileup::Column (one per input) for each position. Columns contain the same Pileup::Alignment objects as single-input pileup; use Alignment#base, #base_qual, and #qname in hot paths before falling back to Alignment#record.

Constructors

new(inputs : Array(Bam), maxcnt : Int32 | Nil = nil, overlaps : Bool = false, *, region : String | Nil = nil, regions : Array(String) | Nil = nil)

Accept Array(Bam). If region is set, it uses SAM-style 1-based inclusive coordinates and each input must already have an index loaded. If regions is set, htslib's multi-region iterator is used and overlapping records are returned once.

Source

Class methods

open(inputs : Array(Bam), maxcnt : Int32 | Nil = nil, overlaps : Bool = false, *, region : String | Nil = nil, regions : Array(String) | Nil = nil, &)

Open an Mpileup iterator with block (RAII style)

Source
open(inputs : Array(Bam), *, maxcnt : Int32 | Nil = nil, overlaps : Bool = false, region : String | Nil = nil, regions : Array(String) | Nil = nil, &)

Open an Mpileup iterator using keyword arguments.

Source

Instance methods

close
Source
each

Iterate and yield per-position columns array (aligned by tid,pos across inputs)

Source
finalize
Source

Nested types