HTS::Tabix
Constructors
new(file_name : Path | String, mode = "r", index = "", threads = 0, build_index = false, preset = :vcf)
SourceClass 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.
open(file_name : Path | String, mode = "r", index = "", threads = 0, build_index = false, preset = :vcf)
Sourceopen(file_name : Path | String, mode = "r", index = "", threads = 0, build_index = false, preset = :vcf, &)
SourceInstance methods
build_index(index_name = "", min_shift = 0, verbose = true, preset = :vcf)
Build a tabix index for this file. Delegates to the class method.
close
Sourcefile_name
Sourcefinalize
Sourceindex_loaded?
Sourceload_index(index_name = "")
Sourcemode
Sourcename2id(name : String) : Int32
Return the sequence (chromosome) ID for name, or -1 if not found.
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.
query(region : String, &)
Query by region string using htslib's native parser. Yields each matching record as an Array(String) of tab-split fields.