def parse_align_file(file_in):
loc_id = <NUM_LIT:1><EOL>bedfile_clusters = "<STR_LIT>"<EOL>bamfile = pybedtools.BedTool(file_in)<EOL>bed = pybedtools.BedTool.bam_to_bed(bamfile)<EOL>for c, start, end, name, q, strand in bed:<EOL><INDENT>loc_id += <NUM_LIT:1><EOL>bedfile_clusters += "<STR_LIT>" %(c, start, end, name, loc_id, strand)<EOL><DEDENT>return bedfile_clusters<EOL>
Parse sam files with aligned sequences