I am trying to convert a batch of BAM files to FASTQs. I started out testing SAMTOOLS (collate/bam2fq) and PICARD (SAMTOFATQ). On the outset the numbers seemed OK but the statistics suggests that the SAMTOOLS out has twice the amount of duplicates as the Picard out.
Has anyone experienced this? I am not sure if it is a samtools problem or I am not comprehending the QC stats.
Any advice/recommendation/comments are welcome.
PS: In both cases I am outputting both first end of the pair and the second end of the pair as separate files.
UPDATED: The commands used were:
samtools collate -o name-collate.bam sample.bam samtools fastq -1 sample_1.fastq.gz -2 sample_2.fastq.gz -0 sample_0.fastq.gz name-collate.bam
java -Xmx2g -jar picard.jar SamToFastq I=sample.bam FASTQ=sample_1p.fastq.gz SECOND_END_FASTQ=sample_2p.fastq.gz UNPAIRED_FASTQ=sample_0p.fastq.gz
fastqc -o fastqc_out/ sample_1p.fastq.gz