def get_position_next_indel_in_cigar(pairs, min_position=0):
    """
    Get the position of first indel base in cigar
    :param pairs:
    :min_position:
    :return: number
    """
    total = 0
    for c,i in pairs:
        if total > min_position and c in ["I", "D"]:
            return total
        elif c in ["=", "X", "M"]:
            total += i
        elif c in ["I"]:
            total += i
    return total