class

HTS::Bam::Record

Inherits Reference < Object

Constants

SEQ_NT16_STR = "=ACMGRSVTWYHKDBN"

Constructors

new(header : Bam::Header, qname : String, flag : UInt16 | Int32, tid : Int32, pos : Int64, mapq : UInt8 | Int32, cigar_words : Array(UInt32), seq : String, qual : Array(UInt8), mtid : Int32 = -1, mpos : Int64 = 0_i64, isize : Int64 = 0_i64)

Convenience constructor: build a record with core fields using bam_set1

  • Coordinates are 0-based (as in BAM core)
  • CIGAR may be given as encoded words (Array(UInt32)) or SAM string
  • Qualities are Phred-scaled values (0..93), one per base
Source
new(header : Bam::Header, qname : String, flag : UInt16 | Int32, rname : String, pos : Int64, mapq : UInt8 | Int32, cigar_str : String, seq : String, qual : Array(UInt8), mtid : Int32 = -1, mpos : Int64 = 0_i64, isize : Int64 = 0_i64)

Overload: rname + CIGAR as String

Source
new(header : Bam::Header, bam1_t : Pointer(HTS::LibHTS::Bam1T))
Source
new(header : Bam::Header)
Source

Instance methods

aux

Return Aux object for iteration over all auxiliary tags

Source
aux_char(str) : Char | Nil
Source
aux_float(str) : Float64 | Nil
Source
aux_int(str) : Int64 | Nil

Return Int64

Source
aux_string(str) : String | Nil
Source
base(n)

return only the base of the requested index "i" of the query sequence.

Source
base_mod

Base modification accessor NOTE: Currently always returns a new BaseMod instance to avoid a finalizer cycle between Record and BaseMod. In the future, memoization could be considered for performance optimization once the GC cycle issue is resolved.

Source
base_qual(n)

return only the base quality of the requested index "i" of the query sequence.

Source
bin=(bin)
Source
chrom

returns the chromosome or '' if not mapped.

Source
cigar

returns a Cigar object.

Source
clone
Source
contig

returns the mate chromosome or '' if not mapped.

Source
duplicate?
Source
each_base

Iterate over query sequence bases without building a String.

Source
each_qual

Iterate over base qualities without building an Array.

Source
endpos

returns end position of the read.

Source
finalize

garbagew collection

Source
flag

returns a Flag object.

Source
flag=(flag : Flag)
Source
flag=(flag)
Source
header
Source
insert_size

insert size

Source
insert_size=(isize)
Source
isize
Source
isize=(isize)
Source
mapq

mapping quality

Source
mapq=(mapq)
Source
mate_chrom

returns the chromosome of the mate or '' if not mapped.

Source
mate_contig
Source
mate_pos

returns 0-based mate position

Source
mate_pos=(mpos)
Source
mate_reverse?
Source
mate_strand
Source
mate_unmapped?
Source
mpos
Source
mpos=(mpos)
Source
mtid

returns the tid of the mate or -1 if not mapped.

Source
mtid=(mtid)
Source
paired?
Source
pos

returns 0-based start position.

Source
pos=(pos)
Source
proper_pair?
Source
qcfail?
Source
qlen
Source
qname

returns the query name.

Source
qname=(name)
Source
qual

return the base qualities

Source
qual_string
Source
read1?
Source
read2?
Source
reverse?
Source
rlen
Source
secondary?
Source
seq

return the read sequence

Source
sequence
Source
strand
Source
supplementary?
Source
tid

returns the tid of the record or -1 if not mapped.

Source
tid=(tid)
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
to_unsafe
Source
unmapped?
Source