struct
HTS::Bam::Pileup::Alignment
- HTS::Bam::Pileup::Alignment
- Struct
- Value
- Object
Overview
Thin value-type view over a single bam_pileup1_t entry. Small scalars
(query_pos, indel, bitfields, base, base_qual) are copied at construction
so they remain valid after the iterator moves on; record()/qname() reach
back into the live htslib record and must be called during iteration.
qname()/record() memoization is per captured Alignment value; repeated
column[0].record calls construct fresh Alignment values and duplicate
the record each time. Store alignment = column[0] when reusing them.
A struct so that iterating a Column allocates no per-read heap object.
Defined in:
hts/bam/pileup.crConstructors
Instance Method Summary
- #base : Char | Nil
- #base_qual : UInt8 | Nil
- #bitfields : UInt32
-
#del? : Bool
Bitfield helpers
- #head? : Bool
- #indel : Int32
-
#qname : String
Query name for the underlying read without duplicating the full record.
- #query_pos : Int32
-
#record : Bam::Record
Lazily duplicates the underlying bam1_t.
- #refskip? : Bool
- #tail? : Bool
Constructor Detail
Instance Method Detail
Query name for the underlying read without duplicating the full record. Call this before the pileup iterator advances or closes.
Lazily duplicates the underlying bam1_t. This is convenient but
relatively expensive in pileup hot paths; prefer direct accessors such
as #base, #base_qual, and #qname when possible.
Call this before the pileup iterator advances or closes.