class

HTS::Bam::Cigar

Inherits Enumerable < Reference < Object

Constructors

new(pointer : Pointer(UInt32), n_cigar : UInt32)
Source
new(cigar_str : String)

Convenience: build from a CIGAR string like "10M1I5M"

Source
new(ops : Array(Tuple(Char, UInt32)))

Convenience: build from op tuples, e.g., [{'M', 10_u32}, {'I', 1_u32}]

Source

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.

Source
encode(cigar_str : String) : Array(UInt32)

Parse a CIGAR string like "10M1I5M" into encoded UInt32 words.

Source

Instance methods

each

Must yield this collection's elements to the block.

Source
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>
Source