class
HTS::Tabix
- HTS::Tabix
- HTS::Bgzf
- HTS::Hts
- Reference
- Object
Defined in:
hts/tabix.crConstructors
Class Method Summary
-
.build_index(file_name : Path | String, index_name = "", min_shift = 0, threads = 0, verbose = true)
Build a tabix index for file_name on disk.
- .open(file_name : Path | String, mode = "r", index = "", threads = 0, build_index = false)
- .open(file_name : Path | String, mode = "r", index = "", threads = 0, build_index = false, &)
Instance Method Summary
-
#build_index(index_name = "", min_shift = 0, verbose = true)
Build a tabix index for this file.
- #close
- #file_name : Path | String
- #finalize
- #index_loaded?
- #load_index(index_name = "")
- #mode : String
-
#name2id(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_).
-
#query(region : String, &)
Query by region string using htslib's native parser.
-
#seqnames : Array(String)
Return the list of sequence names stored in the index.
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) : Int64write(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
Class Method Detail
Build a tabix index for file_name on disk. Uses the VCF preset by default.
Instance Method Detail
Build a tabix index for this file. Delegates to the class method.
Return the sequence (chromosome) ID for name, or -1 if not found.
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 by region string using htslib's native parser. Yields each matching record as an Array(String) of tab-split fields.