<p>The following is the output of <a href='http://samtools.sourceforge.net/'>samtools</a> flagstat command on <a href='http://samtools.sourceforge.net/SAM1.pdf'>bam</a> file (paired-end) generated after markDuplicate of Picards.</p>

<pre><code>7417232 + 0 in total (QC-passed reads + QC-failed reads)
287618 + 0 duplicates
4534962 + 0 mapped (61.14%:-nan%)
7417232 + 0 paired in sequencing
3708616 + 0 read1
3708616 + 0 read2
4528278 + 0 properly paired (61.05%:-nan%)
4534962 + 0 with itself and mate mapped
</code></pre>

<p>I am having difficulty in understanding whether the duplicates are pairs or single. If there are total of 7417232 pairs and out of them 287618 pairs are duplicates means, there are 3% of duplicate reads in my data. Is my understanding is correct ?</p>

<p>There aren't <code>7417232</code> pairs, but total reads. There are <code>3708616</code> actual pairs of reads. It's easiest to figure out exactly what's going on by just looking at the C code in bam_stat.c (it's a short file). The <code>287618 + 0 duplicates</code> numbers are incremented every time a read is marked as a duplicate. So, if there are 100 duplicates for one read then that number will increase by 100 (not 1). Practically speaking, that would mean that there are 143809 duplicate pairs, which could all be the same duplicate (or not). Regardless, that's about 3% (closer to 4% I think) of duplicates, so that part of the interpretation is spot on.</p>
