Merge the SAM and BAM steps