def get_motif(seq_full, motif, mode='counts'):
    """get the counts of motif in a sequence"""
    cnt = 0
    for i in range(len(seq_full) - len(motif) + 1):
        if seq_full[i:i + len(motif)] == motif:
            cnt += 1
    if mode == 'counts':
        return cnt
    elif mode == 'frequency':
        return cnt / (len(seq_full) - len(motif) + 1.0)
    elif mode == 'normalized':
        return cnt / (len(seq_full) - len(motif) + 1.0) / 0.25 ** len(motif)
    else:
        return None
