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)
SourceClass methods
aux_tag_to_static_array(tag : String) : StaticArray(UInt8, 2)
Sourcebuild_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)
open(file_name : Path | String, mode = "r", index = "", fai = "", threads = 0, build_index = false)
Sourceopen(file_name : Path | String, mode = "r", index = "", fai = "", threads = 0, build_index = false, &)
SourceInstance methods
<<(record)
Sourceaux_char(tag : String) : Array(Char | Nil)
Sourceaux_float(tag : String) : Array(Float64 | Nil)
Sourceaux_int(tag : String) : Array(Int64 | Nil)
Sourceaux_string(tag : String) : Array(String | Nil)
Sourcebuild_index(index_name, min_shift = 0, verbose = true)
Sourcechrom
Sourcecigar
Sourceclose
Sourceeach_aux_char(tag : String, &)
Sourceeach_aux_float(tag : String, &)
Sourceeach_aux_int(tag : String, &)
Sourceeach_aux_string(tag : String, &)
Sourceeach_chrom
Sourceeach_cigar
Sourceeach_flag
Sourceeach_insert_size
Sourceeach_mapq
Sourceeach_mate_chrom
Sourceeach_mate_pos
Sourceeach_pos
Sourceeach_qname
Sourceeach_qual
Sourceeach_seq
Sourcefai=(fai)
Sourcefile_name
Sourcefinalize
Sourceflag
Sourceheader
Sourceheader=(header)
Sourceindex_loaded?
Sourceinsert_size
Sourceisize
Sourceload_index(index_name = "")
Sourcemapq
Sourcemate_chrom
Sourcemate_pos
Sourcemode
Sourcempos
Sourcenthreads
Sourcepos
Sourceqname
Sourcequal
Sourcequery(tid : Int32, beg : Int64, end_pos : Int64, copy = false, &)
Numeric (tid) query: coordinates are 0-based half-open [beg, end)
query(chrom : String, beg : Int64, end_pos : Int64, copy = false, &)
Chromosome name + range using SAM-style 1-based inclusive coordinates.
query(region : String, copy = false, &)
Sourcequery(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.
seq
Sourcewrite(record)
Sourcewrite_header(header)
SourceNested types
- HTS::Bam::Aux
- HTS::Bam::AuxError
- HTS::Bam::AuxTypeError
- HTS::Bam::AuxUpdateError
- HTS::Bam::BaseMod
- HTS::Bam::Cigar
- HTS::Bam::Error
- HTS::Bam::FastaIndexError
- HTS::Bam::Flag
- HTS::Bam::Header
- HTS::Bam::HeaderError
- HTS::Bam::IndexError
- HTS::Bam::MissingIndexError
- HTS::Bam::Mpileup
- HTS::Bam::MpileupError
- HTS::Bam::OpenError
- HTS::Bam::Pileup
- HTS::Bam::PileupError
- HTS::Bam::QueryError
- HTS::Bam::ReadError
- HTS::Bam::Record
- HTS::Bam::RecordError
- HTS::Bam::WriteError