struct HTS::Bam::Mpileup::Position

Overview

A zero-copy view of one genomic position across all inputs. It is an ordered collection of Pileup::Column views (one per input) sharing the same tid/pos. It holds only pointers into htslib's current pileup buffer; nothing is allocated per position and per-read Alignment values are built lazily only for the columns the consumer touches.

BORROWING CONTRACT: a Position, its Columns, and any Alignment obtained from them are valid ONLY during the current iteration step. To retain data across positions, read the copied-out scalars (Alignment#base, #base_qual, #query_pos) or call Alignment#record.

Defined in:

hts/bam/mpileup.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(tid : Int32, pos : Int64, n_plp : Pointer(Int32), plp : Pointer(Pointer(LibHTS::BamPileup1T)), headers : Array(Bam::Header), n_inputs : Int32) #

[View source]

Instance Method Detail

def [](input : Int32) : HTS::Bam::Pileup::Column #

Column view for one input.


[View source]
def count : Int32 #

Number of inputs (files) at this position.


[View source]
def count(& : HTS::Bam::Pileup::Column -> Bool) : Int32 #

Count input columns matching the block without materializing an Array.


[View source]
def depth(input : Int32) : Int32 #

Raw pileup depth for one input at this position (before per-base filters).


[View source]
def each(& : HTS::Bam::Pileup::Column -> ) : Nil #

Iterate the per-input Column views.


[View source]
def pos : Int64 #

[View source]
def size : Int32 #

Number of inputs (files) at this position.


[View source]
def tid : Int32 #

[View source]