def fraction(start1, start2, end1, end2, read1, read2):
    """Function that performs a first round of merging. If the realigned intervals and SA intervals overlap, and are ca-
    lled within the same iteration (which means that it is the same circle probably) they will be merged"""
    read_match = (read1 == read2) * 1
    distance = abs(start1 - start2) + abs(end1 - end2)
    one_overlap_two = 1 - distance / (end1 - start1)
    two_overlap_one = 1 - distance / (end2 - start2)
    return one_overlap_two + two_overlap_one + read_match
