cljam.algo.depth

Provides algorithms for calculating simple depth of coverage.

depth

(depth bam-reader {:keys [chr start end], :or {start 1, end Long/MAX_VALUE}} & [{:keys [step unchecked? n-threads], :or {step default-step, unchecked? false, n-threads 1}}])
Calculate depth of coverage eagerly. Returns a seq of depth for range [start, end].
Requires a `cljam.io.bam.reader.BAMReader` instance and region.
If start and end are not supplied, piles whole range up.
Note that CIGAR code in alignments are ignored and only start/end positions are used.

depth*

(depth* rdr {:keys [chr start end], :as region} & [{:keys [step unchecked? n-threads], :or {step default-step, unchecked? false, n-threads 1}}])
Internal depth function which returns an int-array.

lazy-depth

(lazy-depth bam-reader {:keys [chr start end], :or {start 1, end Long/MAX_VALUE}} & [{:keys [step n-threads], :or {step default-step, n-threads 1}}])
Calculate depth of coverage lazily. Returns a lazy seq of depth for range [start, end].
Requires a `cljam.io.bam.reader.BAMReader` instance and region.
If start and end are not supplied, piles whole range up.
Note that CIGAR code in alignments are ignored and only start/end positions are used.