diff --git a/tools/sr_mapping/bowtie2_wrapper.py b/tools/sr_mapping/bowtie2_wrapper.py index 259fd067efe..4b132d53393 100644 --- a/tools/sr_mapping/bowtie2_wrapper.py +++ b/tools/sr_mapping/bowtie2_wrapper.py @@ -64,8 +64,8 @@ def __main__(): else: index_path = options.index_path - # Build bowtie command. - cmd = 'bowtie2 %s -x %s %s | samtools view -Sb - > %s' + # Build bowtie command; use view and sort to create sorted bam. + cmd = 'bowtie2 %s -x %s %s | samtools view -Su - | samtools sort -o - sorted > %s' # Set up reads. if options.single_paired == 'paired':