def list2str(lst):
    """translate samtools returned cigar_list into cigar_string"""
    code2Char = {'0': 'M', '1': 'I', '2': 'D', '3': 'N', '4': 'S', '5': 'H',
        '6': 'P', '7': '=', '8': 'X'}
    cigar_str = ''
    for i in lst:
        cigar_str += str(i[1]) + code2Char[str(i[0])]
    return cigar_str
