def _reorder_columns(bed_file):
new_bed = utils.splitext_plus(bed_file)[<NUM_LIT:0>] + '<STR_LIT>'<EOL>with open(bed_file) as in_handle:<EOL><INDENT>with open(new_bed, '<STR_LIT:w>') as out_handle:<EOL><INDENT>for line in in_handle:<EOL><INDENT>cols = line.strip().split("<STR_LIT:\t>")<EOL>cols[<NUM_LIT:3>] = _select_anno(cols[<NUM_LIT:3>]) + "<STR_LIT:_>" + cols[<NUM_LIT:4>]<EOL>cols[<NUM_LIT:4>] = "<STR_LIT:0>"<EOL>print("<STR_LIT:\t>".join(cols), file=out_handle, end="<STR_LIT>")<EOL><DEDENT><DEDENT><DEDENT>return new_bed<EOL>
Reorder columns to be compatible with CoRaL