class

HTS::Tabix

Inherits HTS::Bgzf < HTS::Hts < Reference < Object

Constructors

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

Class methods

build_index(file_name : Path | String, index_name = "", min_shift = 0, threads = 0, verbose = true, preset = :vcf)

Build a tabix index for file_name on disk. Uses the VCF preset by default.

Supported presets are :vcf, :bed, :gff, :sam, and :psltbl.

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

Instance methods

build_index(index_name = "", min_shift = 0, verbose = true, preset = :vcf)

Build a tabix index for this file. Delegates to the class method.

Source
close
Source
file_name
Source
finalize
Source
index_loaded?
Source
load_index(index_name = "")
Source
mode
Source
name2id(name : String) : Int32

Return the sequence (chromosome) ID for name, or -1 if not found.

Source
query(chrom : String, start : Int, end_ : Int, &)

Query by chromosome name and 0-based half-open coordinates [start, end_). Yields each matching record as an Array(String) of tab-split fields.

Source
query(region : String, &)

Query by region string using htslib's native parser. Yields each matching record as an Array(String) of tab-split fields.

Source
seqnames

Return the list of sequence names stored in the index.

Source

Nested types