I use GATK FastqToSam to generate sam file from Fastq. Then I use different tools to convert sam to bam. I found that the size of bam file are differet. But the number of reads between them are the same (Check by samtools flagstat).
- Direct generate ubam.bam from gatk FastqToSam: 124MB
- Convert sam to bam by gatk SamFormatConverter: 124MB
- Convert sam to bam by samtools: 85MB
Did anyone found this different before? Why the file size are different? (different compression method?) Would this difference affect subsequent analysis?
What are the exact commands you used? I would guess the difference is due to default compression level, but could be something else.
I will check the manual to see whether it have different compression level or not, thanks.