def prepare_bam(bam_in, precursors):
<EOL>a = pybedtools.BedTool(bam_in)<EOL>b = pybedtools.BedTool(precursors)<EOL>c = a.intersect(b, u=True)<EOL>out_file = utils.splitext_plus(op.basename(bam_in))[<NUM_LIT:0>] + "<STR_LIT>"<EOL>c.saveas(out_file)<EOL>return op.abspath(out_file)<EOL>
Clean BAM file to keep only position inside the bigger cluster