class Depth::FileIO::OutputManager

Defined in:

depth/io/output_manager.cr

Constant Summary

DIGIT_PAIRS = begin bytes = Bytes.new(200) 100.times do |i| bytes[i &* 2] = 48_u8 &+ (i // 10).to_u8 bytes[(i &* 2) &+ 1] = 48_u8 &+ (i % 10).to_u8 end bytes end

Lookup table of decimal digit pairs "00".."99" for two-digits-at-a-time itoa, halving the divisions vs the per-digit signed Int#to_s.

Constructors

Instance Method Summary

Constructor Detail

def self.new(config : Config, targets : Array(Core::Target) = [] of Core::Target) #

Instance Method Detail

def close_all(*, build_indices : Bool = true) #

def d4_output : D4Output | Nil #

def f_global : File | Nil #

def f_perbase : File | HTS::Bgzf | Nil #

def f_quantized : File | HTS::Bgzf | Nil #

def f_region : File | Nil #

def f_regions : File | HTS::Bgzf | Nil #

def f_summary : File | Nil #

def f_thresholds : File | HTS::Bgzf | Nil #

def per_base_enabled? : Bool #

def write_per_base_interval(chrom : String, start : Int32, stop : Int32, depth : Int32) #

def write_quantized_interval(chrom : String, start : Int32, stop : Int32, label : String) #

def write_region_mean(chrom : String, start : Int32, stop : Int32, name : String | Nil, sum : UInt64, length : Int32) #

def write_region_stat(chrom : String, start : Int32, stop : Int32, name : String | Nil, value : Float64) #

def write_region_zero(chrom : String, start : Int32, stop : Int32, name : String | Nil) #

def write_summary_line(region : String, stat : Depth::Stats::DepthStat) #

def write_summary_total(total : Depth::Stats::DepthStat) #

Optionally call at end to add a total line like mosdepth


def write_threshold_counts(chrom : String, start : Int32, stop : Int32, name : String | Nil, counts : Array(Int32)) #

def write_thresholds_header(thresholds : Array(Int32)) #