The command bamtools sort sorts a BAM file according to a given option. Output_alignments_sorted.bam is the resulting file, where the alignments are sorted by name.
bamtools sort -in input_alignments.bam -out output_alignments_sorted.bam -byname
None