I found one wired thing about Bam file. The size of my original Bam file is about 13GB. I converted the bam file into sam file and extracted the reads with mapping score less than 10. I put these reads into a new mini sam file and converted this mini sam file into a mini Bam file. The size of the mini bam file is about 2.5GB.
However, I actually plotted the histogram of the distribution of mapping score in the original Bam file. The proportion of mapping scores which are less than 10 should be far less than 20%.
Could anyone tell me why the size of the mini Bam file is around 20% of the original one?