def assembly_cleanup(data):
<EOL>data.stats_dfs.s4 = data._build_stat("<STR_LIT>")<EOL>data.stats_files.s4 = os.path.join(data.dirs.clusts, <EOL>"<STR_LIT>")<EOL>with io.open(data.stats_files.s4, '<STR_LIT:w>') as outfile:<EOL><INDENT>data.stats_dfs.s4.to_string(outfile)<EOL><DEDENT>fails = data.stats[data.stats["<STR_LIT:state>"] == <NUM_LIT:3>].index.values<EOL>if fails:<EOL><INDENT>msg = """<STR_LIT>""".format(fails)<EOL>print(msg)<EOL><DEDENT>
cleanup assembly stats