class

HTS::Bam

Inherits Enumerable < HTS::Hts < Reference < Object

Constants

AUX_TAG_PATTERN = /\A[A-Za-z][A-Za-z0-9]\z/

Constructors

new(file_name : Path | String, mode = "r", index = "", fai = "", threads : Int32 = 0, build_index = false)
Source

Class methods

aux_tag_to_static_array(tag : String) : StaticArray(UInt8, 2)
Source
build_index(file_name : Path | String, index_name = "", min_shift = 0, threads = 0, verbose = true)

Class method: build index for any file on disk (even after close)

Source
open(file_name : Path | String, mode = "r", index = "", fai = "", threads = 0, build_index = false)
Source
open(file_name : Path | String, mode = "r", index = "", fai = "", threads = 0, build_index = false, &)
Source

Instance methods

<<(record)
Source
aux_char(tag : String) : Array(Char | Nil)
Source
aux_float(tag : String) : Array(Float64 | Nil)
Source
aux_int(tag : String) : Array(Int64 | Nil)
Source
aux_string(tag : String) : Array(String | Nil)
Source
build_index(index_name, min_shift = 0, verbose = true)
Source
chrom
Source
cigar
Source
close
Source
each(copy = false, &)

Must yield this collection's elements to the block.

Source
each_aux_char(tag : String, &)
Source
each_aux_float(tag : String, &)
Source
each_aux_int(tag : String, &)
Source
each_aux_string(tag : String, &)
Source
each_chrom
Source
each_cigar
Source
each_flag
Source
each_insert_size
Source
each_mapq
Source
each_mate_chrom
Source
each_mate_pos
Source
each_pos
Source
each_qname
Source
each_qual
Source
each_seq
Source
fai=(fai)
Source
file_name
Source
finalize
Source
flag
Source
header
Source
header=(header)
Source
index_loaded?
Source
insert_size
Source
isize
Source
load_index(index_name = "")
Source
mapq
Source
mate_chrom
Source
mate_pos
Source
mode
Source
mpos
Source
nthreads
Source
qname
Source
qual
Source
query(tid : Int32, beg : Int64, end_pos : Int64, copy = false, &)

Numeric (tid) query: coordinates are 0-based half-open [beg, end)

Source
query(chrom : String, beg : Int64, end_pos : Int64, copy = false, &)

Chromosome name + range using SAM-style 1-based inclusive coordinates.

Source
query(region : String, copy = false, &)
Source
query(regions : Array(String), copy = false, &)

Multi-region query. This currently uses sequential single-region iterators. It preserves the same copy semantics as the single-region query. Records overlapping multiple regions may be yielded more than once; regions are not merged or deduplicated.

Source
to_a

Ensure collected records are independent and safe after iteration ends.

Source
write(record)
Source
write_header(header)
Source

Nested types