merge

fun SRangeSet.merge(count: Int, comparator: Comparator<SRange> = SeqRangeSort.by(SeqRangeSort.numberThenAlphaSort,leftEdge)): SRangeSet

Merge will merge overlapping and embedded ranges, and other ranges where distance between them is "count" or less base pairss. It will not merge adjacent/non-overlapping ranges A comparator is necessary as we can't merge until the ranges are sorted. SRange is Kotlin Set which is immutable, but not necessarily sorted. Merging of ranges requires that the upper endpoint SeqRecord of the first range matches the lower endpoint SeqRecord of the next range.

return: an SRangeSet