class HTS::Bcf::Format

Defined in:

hts/bcf/format.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(record : Bcf::Record) #

[View source]
def self.new(record : Bcf::Record::AccessorContext) #

[View source]

Instance Method Detail

def delete(tag : String) : Bool #

[View source]
def each_genotype(tag : String = "GT", & : Int32, GenotypeView -> ) : Bool #

Yields each sample index and a borrowed view of its encoded GT values.

Returns false without yielding when GT is absent. A view is valid only during its block invocation and excludes trailing vector-end sentinels.

EXPERIMENTAL


[View source]
def each_scalar_f32(tag : String, & : Int32, Float32 -> ) : Bool #

EXPERIMENTAL


[View source]
def each_scalar_i32(tag : String, & : Int32, Int32 -> ) : Bool #

EXPERIMENTAL


[View source]
def each_string_view(tag : String, & : Int32, Bytes -> ) : Bool #

EXPERIMENTAL


[View source]
def each_vector_f32(tag : String, & : Int32, Slice(Float32) -> ) : Bool #

EXPERIMENTAL


[View source]
def each_vector_i32(tag : String, & : Int32, Slice(Int32) -> ) : Bool #

EXPERIMENTAL


[View source]
def genotype_at(tag : String, sample_index : Int, & : GenotypeView -> ) : Bool #

Yields a borrowed GT view for one sample without traversing other samples. Returns false without yielding when GT is absent.

EXPERIMENTAL


[View source]
def genotypes : Array(Int32) | Nil #

[View source]
def get_float(tag) : Array(Float32) | Nil #

[View source]
def get_genotypes : Array(Int32) | Nil #

ameba:disable Naming/AccessorMethodName


[View source]
def get_int(tag) : Array(Int32) | Nil #

[View source]
def get_string(tag) : Array(String) | Nil #

Returns one String per sample. Character FORMAT fields are handled here too.


[View source]
def update_float(tag : String, value : Number) #

[View source]
def update_float(tag : String, values : Array(Float32)) #

[View source]
def update_genotypes(values : Array(Int32)) #

[View source]
def update_int(tag : String, value : Int) #

[View source]
def update_int(tag : String, values : Array(Int32)) #

[View source]
def update_string(tag : String, value : String) #

[View source]
def update_string(tag : String, values : Array(String)) #

[View source]
def with_f32_buffer(tag : String, & : Slice(Float32) -> ) : Bool #

Yields a borrowed view of the raw Float32 FORMAT values.

Returns false without yielding when the field is absent. The slice is valid only during the block and may be invalidated earlier by another FORMAT Float32 getter on the same record.

EXPERIMENTAL


[View source]
def with_i32_buffer(tag : String, & : Slice(Int32) -> ) : Bool #

Yields a borrowed view of the raw Int32 FORMAT values.

Returns false without yielding when the field is absent. The slice is valid only during the block and may be invalidated earlier by another FORMAT Int32 or genotype getter on the same record.

EXPERIMENTAL


[View source]