class
HTS::Bam::Mpileup
- HTS::Bam::Mpileup
- Reference
- Object
Overview
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.
Included Modules
- Enumerable(Array(HTS::Bam::Pileup::Column))
Defined in:
hts/bam/mpileup.crConstructors
-
.new(inputs : Array(Bam), maxcnt : Int32 | Nil = nil, overlaps : Bool = false, *, region : String | Nil = nil, regions : Array(String) | Nil = nil)
Accept Array(Bam).
Class Method Summary
-
.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)
-
.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.
Instance Method Summary
- #close : Nil
-
#each(& : Array(HTS::Bam::Pileup::Column) -> ) : Nil
Iterate and yield per-position columns array (aligned by tid,pos across inputs)
- #finalize
Constructor Detail
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.
Class Method Detail
Open an Mpileup iterator with block (RAII style)
Open an Mpileup iterator using keyword arguments.
Instance Method Detail
Iterate and yield per-position columns array (aligned by tid,pos across inputs)