SkippableLociIterator that consumes Intervals (sorted by start-position) and emits a Coverage at each
covered locus, indicating how many intervals overlap (and start at) that locus. Overlaps are given a grace-margin of
halfWindowSize.
One (Locus, Coverage) tuple is emitted for each locus where the underlying intervals (and halfWindowSize)
yield a non-empty Coverage: intervals contribute 1 to Coverage.depth for each locus they overlap
(± halfWindowSize) and 1 to Coverage.starts for the first such locus.
In cases where this iterator's SkippableLociIterator.skipTo method is called while it is emitting elements (e.g.
when this iterator is made to proceed through loci discontinuously, to restrict calculation to specific loci-ranges),
ContigCoverageIterator can land in the middle of some of its input Intervals, emitting their first
contributions to Coverage.depth at loci that are not the start of those Intervals. In these (and all) cases,
Intervals contribute to Coverage.starts on the first locus where they contribute to
Coverage.depth (even if this is in the middle of the Interval due to upstream loci-restrictions and
skipping).
intervals
Single-contig-restricted, start-position-sorted Iterator of Intervals.
SkippableLociIterator that consumes Intervals (sorted by start-position) and emits a Coverage at each covered locus, indicating how many intervals overlap (and start at) that locus. Overlaps are given a grace-margin of
halfWindowSize
.One (Locus, Coverage) tuple is emitted for each locus where the underlying intervals (and
halfWindowSize
) yield a non-empty Coverage: intervals contribute 1 to Coverage.depth for each locus they overlap (± halfWindowSize) and 1 to Coverage.starts for the first such locus.In cases where this iterator's SkippableLociIterator.skipTo method is called while it is emitting elements (e.g. when this iterator is made to proceed through loci discontinuously, to restrict calculation to specific loci-ranges), ContigCoverageIterator can land in the middle of some of its input Intervals, emitting their first contributions to Coverage.depth at loci that are not the start of those Intervals. In these (and all) cases, Intervals contribute to Coverage.starts on the first locus where they contribute to Coverage.depth (even if this is in the middle of the Interval due to upstream loci-restrictions and skipping).
Single-contig-restricted, start-position-sorted Iterator of Intervals.