def overlap(v1, v2):
    """Determine whether affected positions of two variants overlap."""
    v1_b = v1.pos + max(len(v1.ref), len(v1.alt))
    v2_b = v2.pos + max(len(v2.ref), len(v2.alt))
    return min(v1_b, v2_b) - max(v1.pos, v2.pos) > 0