complement

fun complement(boundaryRange: SRange, intersectingRanges: Set<SRange>): SRangeSet

This method takes an SRange and a set of ranges that intersect it. It splits the "boundaryRange" into a set of ranges, none of which contain positions that overlap positions from the "intersectingRanges" list.

When complementing the SRanges for a full chromosome/contig, the "boundaryRange" should be an SRange where boundaryRange.start.site = 1 and boundaryRange.endInclusive.site = When complementing for a specific "peak", the boundaries are the start/end of the peak.

return: the split "boundaryRange" range set. These are positions on the SRange that did not overlap any positions represented by an SRange on the intersectingRanges set.


fun SRangeSet.complement(boundaryRange: SRange): SRangeSet

Find the complement for a set of ranges. The boundaryRange parameter sets the upper and lower limits for the complemented ranges.

return: an SRangeSet whose ranges are the complement of the original SRangeSet