This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Significant Difference of the File Size between csorted and nsorted BAM file

Any one found the file size of the sorted bam files by samtools -c and samtools -n have quite big difference, I notice for the same raw bam file, samtools -n sorted bam is usually 2-times larger than samtools -c. What's the main reason for the difference?

Thanks.

csort samtools nsort

1 answer

New version of samtools does not have a -c option so you may want to modify the question to explicitly say name and coordinate sorted BAM's.
See James Bonfield's answer in this thread.

Log in to answer this question.