class HTS::Tabix

Defined in:

hts/tabix.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class HTS::Bgzf

compression_level : Int32 compression_level, each_char(&) each_char, each_line(delimiter = '\n', &) each_line, file_name : Path | String file_name, flush : Int32 flush, getc : Char | Nil getc, gets(delimiter = '\n') : String | Nil gets, is_bgzf? : Bool is_bgzf?, mode : String mode, puts(data : String) : Int64 puts, read(size : Int32) : Bytes read, seek(offset) seek, tell tell, write(data : String) : Int64
write(data : Bytes) : Int64
write

Constructor methods inherited from class HTS::Bgzf

new(file_name : Path | String, mode : String = "r", threads = 0) new

Class methods inherited from class HTS::Bgzf

open(file_name : Path | String, mode = "r", threads = 0)
open(file_name : Path | String, mode = "r", threads = 0, &)
open

Instance methods inherited from class HTS::Hts

close close, closed? closed?, file_format file_format, file_format_version file_format_version, rewind rewind, seek(offset) seek, set_threads(n) set_threads, tell tell, to_unsafe to_unsafe

Macros inherited from class HTS::Hts

define_getter(name) define_getter, define_iterator(name) define_iterator

Constructor Detail

def self.new(file_name : Path | String, mode = "r", index = "", threads = 0, build_index = false) #

[View source]

Class Method Detail

def self.build_index(file_name : Path | String, index_name = "", min_shift = 0, threads = 0, verbose = true) #

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


[View source]
def self.open(file_name : Path | String, mode = "r", index = "", threads = 0, build_index = false) #

[View source]
def self.open(file_name : Path | String, mode = "r", index = "", threads = 0, build_index = false, &) #

[View source]

Instance Method Detail

def build_index(index_name = "", min_shift = 0, verbose = true) #

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


[View source]
def close #

[View source]
def file_name : Path | String #

[View source]
def finalize #

[View source]
def index_loaded? #

[View source]
def load_index(index_name = "") #

[View source]
def mode : String #

[View source]
def name2id(name : String) : Int32 #

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


[View source]
def 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.


[View source]
def query(region : String, &) #

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


[View source]
def seqnames : Array(String) #

Return the list of sequence names stored in the index.


[View source]