def overlap(v1, v2):
    """determine whether affected positions of two variants overlap
    """

    #if v1.pos==4589049:
    #    import pdb; pdb.set_trace()
    pos1 = set([v1.pos+i for i in range(max([len(v1.ref), len(v1.alt)]))])
    pos2 = set([v2.pos+i for i in range(max([len(v2.ref), len(v2.alt)]))])
    return len(pos1.intersection(pos2))>0