def sam_list(sam):
list = []<EOL>for file in sam:<EOL><INDENT>for line in file:<EOL><INDENT>if line.startswith('<STR_LIT:@>') is False:<EOL><INDENT>line = line.strip().split()<EOL>id, map = line[<NUM_LIT:0>], int(line[<NUM_LIT:1>])<EOL>if map != <NUM_LIT:4> and map != <NUM_LIT:8>:<EOL><INDENT>list.append(id)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return set(list)<EOL>
get a list of mapped reads