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) #

[View source]

Instance Method Detail

def close_all #

[View source]
def f_global : File | Nil #

[View source]
def f_perbase : File | HTS::Bgzf | Nil #

[View source]
def f_quantized : File | HTS::Bgzf | Nil #

[View source]
def f_region : File | Nil #

[View source]
def f_regions : File | HTS::Bgzf | Nil #

[View source]
def f_summary : File | Nil #

[View source]
def f_thresholds : File | HTS::Bgzf | Nil #

[View source]
def write_per_base_interval(chrom : String, start : Int32, stop : Int32, depth : Int32) #

[View source]
def write_quantized_interval(chrom : String, start : Int32, stop : Int32, label : String) #

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

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

[View source]
def write_region_zero(chrom : String, start : Int32, stop : Int32, name : String | Nil) #

[View source]
def write_summary_line(region : String, stat : Depth::Stats::DepthStat) #

[View source]
def write_summary_total(total : Depth::Stats::DepthStat) #

Optionally call at end to add a total line like mosdepth


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

[View source]
def write_thresholds_header(thresholds : Array(Int32)) #

[View source]