class HTS::Bam::Cigar

Included Modules

Defined in:

hts/bam/cigar.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(pointer : Pointer(UInt32), n_cigar : UInt32) #

[View source]
def self.new(cigar_str : String) #

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


[View source]
def self.new(ops : Array(Tuple(Char, UInt32))) #

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


[View source]

Class Method Detail

def self.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.


[View source]
def self.encode(cigar_str : String) : Array(UInt32) #

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


[View source]

Instance Method Detail

def each(&) #
Description copied from module Enumerable({Char, UInt32})

Must yield this collection's elements to the block.


[View source]
def to_s(io : IO) #
Description copied from class Reference

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>

[View source]