class
D4::Writer
- D4::Writer
- Reference
- Object
Defined in:
d4/writer.crConstructors
Instance Method Summary
- #abort : Nil
- #close : Nil
- #closed? : Bool
- #control : WriteControl
- #finish : Nil
- #finished? : Bool
- #flush : Nil
- #write_interval(chromosome : String, left : Int, right : Int, value : Int32) : Nil
- #write_intervals(chromosome : String, intervals : Enumerable(RawInterval)) : Int64
- #write_scaled_interval(chromosome : String, left : Int, right : Int, value : Float64, *, rounding : Rounding) : Nil
-
#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.
- #write_scaled_values(chromosome : String, position : Int, values : Enumerable(Float64), *, rounding : Rounding) : Int64
- #write_value(chromosome : String, position : Int, value : Int32) : Nil
- #write_values(chromosome : String, position : Int, values : Array(Int32) | Slice(Int32)) : Int64
-
#write_values(chromosome : String, position : Int, values : Enumerable(Int32)) : Int64
Known-size input follows the prevalidated bulk path above.
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)
#
Instance Method Detail
def write_interval(chromosome : String, left : Int, right : Int, value : Int32) : Nil
#
def write_intervals(chromosome : String, intervals : Enumerable(RawInterval)) : Int64
#
def write_scaled_interval(chromosome : String, left : Int, right : Int, value : Float64, *, rounding : Rounding) : Nil
#
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.
def write_scaled_values(chromosome : String, position : Int, values : Enumerable(Float64), *, rounding : Rounding) : Int64
#
def write_values(chromosome : String, position : Int, values : Array(Int32) | Slice(Int32)) : Int64
#
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.