Hello,
I have a sorted bam file (bwa mem alignment). Now I need to mark and remove duplicates using samtools. Before it asks me to do collate and fixmate then sort and then markdup. I was wondering if bam output (without sorting) is already name sorted (bwa version 0.7.17)? So I could skip unnecessary sorting, collating steps and after alignment pass directly to fixmate?
BWA does not provide sorted bam file as output. If you want to check whether the aligned file is sorted or not use the following command.