class D4::Writer

Defined in:

d4/writer.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(path : String | Path, *, chromosomes : Array(Chromosome), dictionary : Dictionary, denominator : Float64 = 1.0, default_value : Int32 = 0, options : WriteOptions = WriteOptions.new, control : WriteControl = WriteControl.new) #

[View source]

Instance Method Detail

def abort : Nil #

[View source]
def close : Nil #

[View source]
def closed? : Bool #

[View source]
def control : WriteControl #

[View source]
def finish : Nil #

[View source]
def finished? : Bool #

[View source]
def flush : Nil #

[View source]
def write_interval(chromosome : String, left : Int, right : Int, value : Int32) : Nil #

[View source]
def write_intervals(chromosome : String, intervals : Enumerable(RawInterval)) : Int64 #

[View source]
def write_scaled_interval(chromosome : String, left : Int, right : Int, value : Float64, *, rounding : Rounding) : Nil #

[View source]
def write_scaled_values(chromosome : String, position : Int, values : Array(Float64) | Slice(Float64), *, rounding : Rounding) : Int64 #

Quantize known-size input before delegating to the prevalidated dense writer. This avoids publishing a prefix when a later value is invalid.


[View source]
def write_scaled_values(chromosome : String, position : Int, values : Enumerable(Float64), *, rounding : Rounding) : Int64 #

[View source]
def write_value(chromosome : String, position : Int, value : Int32) : Nil #

[View source]
def write_values(chromosome : String, position : Int, values : Array(Int32) | Slice(Int32)) : Int64 #

[View source]
def write_values(chromosome : String, position : Int, values : Enumerable(Int32)) : Int64 #

Known-size input follows the prevalidated bulk path above. Lazy input is held in fixed-size chunks even for multi-gigabyte files.


[View source]