class D4::Track

Defined in:

d4/bins.cr
d4/reducers.cr
d4/scaled.cr
d4/stats.cr
d4/track.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(source : Source, directory : Format::Directory, name : String, options : ReadOptions) #

[View source]

Instance Method Detail

def aggregate(regions : Enumerable(Region), reducer : D, *, workers : Int32 = 1) forall D #

[View source]
def aggregate_region(region : Region, reducer : D, scratch : Slice(Int32)) forall D #

[View source]
def aggregate_region(region : Region, reducer : D) forall D #

[View source]
def bind_owner(owner : File) : Nil #

[View source]
def check_open : Nil #

[View source]
def chromosome(name : String) : Chromosome #

[View source]
def chromosome?(name : String) : Chromosome | Nil #

[View source]
def chromosome_size(name : String) : Int64 #

[View source]
def chromosome_size?(name : String) : Int64 | Nil #

[View source]
def chromosomes : Array(Chromosome) #

[View source]
def coverage(region : Region, *, thresholds : Array(Int32)) : Coverage #

[View source]
def coverage_into(region : Region, thresholds : Slice(Int32), counts : Slice(Int64)) : Int64 #

[View source]
def decode_primary(chromosome : String, start : Int64, output : Slice(Int32), packed : Bytes) : Nil #

Used by the reusable scanner; callers should normally use scan_values.


[View source]
def each_aggregate(regions : Enumerable(Region), reducer : D, *, workers : Int32 = 1, batch_size : Int32 = 256, &) forall D #

[View source]
def each_aggregate(regions : Indexable(Region), reducer : D, *, workers : Int32 = 1, batch_size : Int32 = 256) forall D #

[View source]
def each_bin(region : Region, *, bin_size : Int, & : BinSummary -> Nil) : Nil #

[View source]
def each_bin(region : Region, *, bin_size : Int) : BinIterator #

[View source]
def each_interval(chromosome : String, start : Int = 0, stop : Int | Nil = nil, & : RawInterval -> Nil) : Nil #

[View source]
def each_interval(chromosome : String, start : Int = 0, stop : Int | Nil = nil) #

[View source]
def each_value(chromosome : String, start : Int = 0, stop : Int | Nil = nil, & : Int32 -> Nil) : Nil #

[View source]
def each_value(chromosome : String, start : Int = 0, stop : Int | Nil = nil) #

[View source]
def exact_histogram(region : Region, *, max_values : Int32 = 4096) : ExactHistogram #

[View source]
def has_chromosome?(name : String) : Bool #

[View source]
def has_index?(kind : IndexKind) : Bool #

[View source]
def histogram(region : Region, *, value_range : Range(Int32, Int32)) : Histogram #

[View source]
def histogram_into(region : Region, counts : Slice(Int64), *, value_range : Range(Int32, Int32)) : HistogramTails #

[View source]
def materialization_limit : Int64 #

[View source]
def mean(chromosome : String, start : Int = 0, stop : Int | Nil = nil, *, index : IndexPolicy = IndexPolicy::Auto) : Float64 | Nil #

[View source]
def mean(region : Region, *, index : IndexPolicy = IndexPolicy::Auto) : Float64 | Nil #

[View source]
def metadata : Metadata #

[View source]
def minmax(chromosome : String, start : Int = 0, stop : Int | Nil = nil) : Tuple(Int32, Int32) | Nil #

[View source]
def minmax(region : Region) : Tuple(Int32, Int32) | Nil #

[View source]
def name : String #

[View source]
def read_values_into(chromosome : String, start : Int, buffer : Slice(Int32)) : Int32 #

[View source]
def sample(region : Region, *, bins : Int32 = 256) : Array(BinSummary) #

[View source]
def scaled : ScaledTrack #

[View source]
def scan_values(chromosome : String, buffer : Slice(Int32), start : Int = 0, stop : Int | Nil = nil, *, cancelled : Proc(Bool) | Nil = nil, & : Int64, Slice(Int32), Int32 -> Nil) : Nil #

Calls cancelled at block boundaries and raises CancelledError when it returns true. Cancellation is cooperative; an in-flight source read is allowed to finish before the next checkpoint.


[View source]
def scan_values(region : Region, buffer : Slice(Int32), *, cancelled : Proc(Bool) | Nil = nil, & : Int64, Slice(Int32), Int32 -> Nil) : Nil #

[View source]
def secondary_table : SecondaryTable | Nil #

[View source]
def sum(chromosome : String, start : Int = 0, stop : Int | Nil = nil, *, index : IndexPolicy = IndexPolicy::Auto, cancelled : Proc(Bool) | Nil = nil) : Int64 #

Calls cancelled between scan blocks and sum-index I/O chunks, raising CancelledError when the callback returns true.


[View source]
def sum(region : Region, *, index : IndexPolicy = IndexPolicy::Auto, cancelled : Proc(Bool) | Nil = nil) : Int64 #

[View source]
def sum_index_granularity : Int64 | Nil #

The number of bases represented by one sum-index block, or nil when this track has no embedded sum index.


[View source]
def summary(chromosome : String, start : Int = 0, stop : Int | Nil = nil) : Summary #

[View source]
def summary(region : Region) : Summary #

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

[View source]
def values(chromosome : String, start : Int = 0, stop : Int | Nil = nil) : Array(Int32) #

[View source]
def values(region : Region) : Array(Int32) #

[View source]