I am getting BAM files with Bismark mapping with bowtie2. This gives you an unordered BAM file Thus, I am sorting the BAM file with the command
samtools sort -O bam -T tmp_ -o Name_sorted.bam Unordered.bam
The unordered bam file can have a 2,6Gb size, but the ordered one drops down to 1,2Gb. The same happens with all the bam files I am ordering. They are reduced to a half.
Is that normal? Is that caused by a different compression level ?
In any case, makes me feel sort of uncomfortable..
Use
samtools flagstat
to check the number of reads. If they are the same, you're fine and it is due to compression. How did you create the unsorted bam file?I mentioned that. I am mapping BS-Seq sequences with Bismark
Yes, it is normal. Sorting can save a lot of space.