HTS::Bam::Cigar
Inherits Enumerable < Reference < Object
Constructors
new(pointer : Pointer(UInt32), n_cigar : UInt32)
Sourcenew(ops : Array(Tuple(Char, UInt32)))
Convenience: build from op tuples, e.g., [{'M', 10_u32}, {'I', 1_u32}]
Class methods
encode(ops : Array(Tuple(Char, UInt32))) : Array(UInt32)
Encode helpers
Supported op chars follow htslib: M I D N S H P = X B Returns an Array of UInt32 where each element packs len/op as in BAM.
encode(cigar_str : String) : Array(UInt32)
Parse a CIGAR string like "10M1I5M" into encoded UInt32 words.
Instance methods
to_s(io : IO)
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>