class HTS::Bam::Cigar

Constants

OPS

Public Class Methods

new(cigar, n_cigar) click to toggle source
# File lib/hts/bam/cigar.rb, line 12
def initialize(cigar, n_cigar)
  @c = cigar
  @n_cigar = n_cigar
end

Public Instance Methods

each() { |bam_cigar_oplen, bam_cigar_opchr| ... } click to toggle source
# File lib/hts/bam/cigar.rb, line 21
def each
  @n_cigar.times do |i|
    c = @c[i].read_uint32
    yield [LibHTS.bam_cigar_oplen(c),
           LibHTS.bam_cigar_opchr(c)]
  end
end
to_s() click to toggle source
# File lib/hts/bam/cigar.rb, line 17
def to_s
  to_a.flatten.join
end