Is it normal a substantial reduction of BAM files after ordering ?
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..
• 2,477 views
•
link
2 answers
You are right. They have the same number of reads
• 0 views
•
link
Log in to answer this question.
Use
samtools flagstatto 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.