def trimA(rev_seq):
    if (len(rev_seq) == 0):
        return None
    n_rev_seq = len(rev_seq)
    mismatch = 0
    i = 0
    while ((mismatch < 2) and (i < n_rev_seq)):
        if (rev_seq[i] != 'T'):
            mismatch += 1
        i += 1
    i -= 1
    if (i >= MIN_A_LEN):
        return i
    else:
        return None
def trimA(rev_seq):
    if (len(rev_seq) == 0):
        return None
    n_rev_seq = len(rev_seq)
    mismatch = 0
    i = 0
    while ((mismatch < 2) and (i < n_rev_seq)):
        if (rev_seq[i] != 'T'):
            mismatch += 1
        i += 1
    i -= 1
    if (i >= MIN_A_LEN):
        return i
    else:
        return None