class
HTS::Bam::Cigar
- HTS::Bam::Cigar
- Reference
- Object
Included Modules
- Enumerable({Char, UInt32})
Defined in:
hts/bam/cigar.crConstructors
- .new(pointer : Pointer(UInt32), n_cigar : UInt32)
-
.new(cigar_str : String)
Convenience: build from a CIGAR string like "10M1I5M"
-
.new(ops : Array(Tuple(Char, UInt32)))
Convenience: build from op tuples, e.g., [{'M', 10_u32}, {'I', 1_u32}]
Class Method Summary
-
.encode(ops : Array(Tuple(Char, UInt32))) : Array(UInt32)
Encode helpers
-
.encode(cigar_str : String) : Array(UInt32)
Parse a CIGAR string like "10M1I5M" into encoded UInt32 words.
Instance Method Summary
-
#each(&)
Must yield this collection's elements to the block.
-
#to_s(io : IO)
Appends a short String representation of this object which includes its class name and its object address.
Constructor Detail
Convenience: build from op tuples, e.g., [{'M', 10_u32}, {'I', 1_u32}]
Class Method Detail
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.
Parse a CIGAR string like "10M1I5M" into encoded UInt32 words.
Instance Method Detail
Must yield this collection's elements to the block.
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>