This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Sorted vs unsorted SAM/BAM

Hi! I am quite new to NGS and could not find explanation of sorted and unsorted SAM/BAM files. How are these files sorted (what does SAMtool do to the file)? Why does it have to be done?

Thanks!

sort sam bam samtools

1 answer

Files can be sorted by coordinate (chromosomal position of the alignment), or by read name.

Some of the tools used for downstream analyses require sorted and indexed bam files.

Log in to answer this question.