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?