class Mopdepth::Reader

Overview

An indexed BAM/CRAM coverage reader.

A Reader owns its HTS handle and is intended for serial use. Create one Reader per concurrent worker. Call #close, or use the block form of Reader.open, to release the native handle deterministically.

Defined in:

mopdepth/reader.cr

Constant Summary

CHECK_INTERVAL = 65536

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.open(path : String | Path, *, reference : String | Path = "", threads : Int32 = 0) : self #

Class Method Detail

def self.open(path : String | Path, *, reference : String | Path = "", threads : Int32 = 0, & : self -> T) : T forall T #

Instance Method Detail

def close : Nil #

def closed? : Bool #

def coverage(chromosome : String, *, options : Options = Options.new, control : Control = Control.new) : Coverage #

def coverage(region : Region, *, options : Options = Options.new, control : Control = Control.new) : Coverage #

def coverage_into(region : Region, values : Array(Int32), *, options : Options = Options.new, control : Control = Control.new) : Coverage #

Calculates dense coverage into a reusable caller-owned array. On return, the array has exactly region.length values and contains no diff sentinel.


def each_coverage(regions : Enumerable(Region), *, options : Options = Options.new, control : Control = Control.new, & : Coverage -> ) : Nil #

def each_coverage(*, options : Options = Options.new, control : Control = Control.new, & : Coverage -> ) : Nil #

def file_format : String #

def path : String #

def records_examined : Int64 #

def target(name : String) : Target #

def targets : Array(Target) #