def synteny_scan(points, xdist, ydist, N):
    clusters = Grouper()
    n = len(points)
    points.sort()
    for i in xrange(n):
        for j in xrange(i - 1, -1, -1):
            # x-axis distance
            del_x = points[i][0] - points[j][0]
            if del_x > xdist:
                break
            # y-axis distance
            del_y = points[i][1] - points[j][1]
            if abs(del_y) > ydist:
                continue
            # otherwise join
            clusters.join(points[i], points[j])

    # select clusters that are at least >=N
    clusters = [sorted(cluster) for cluster in list(clusters) \
            if _score(cluster) >= N]

    return clusters
Fill the start and end point of a Range object, using the javascript
dataset/ETHPy150Open tanghaibao/jcvi/compara/synteny.py/synteny_scan--crossover with--dataset/ETHPy150Open pyjs/pyjs/pyjswidgets/pyjamas/selection/Range.py/fillRangePoints