<p>Hi,</p>

<p>Having two <a href='http://samtools.sourceforge.net/SAM1.pdf'>BAM</a> files from NGS data, how can one check if they are the <a href='http://samtools.sourceforge.net/SAM1.pdf'>BAM</a> files (left and right) from a paired end mapping of the same sample?
Thanks for the help.</p>

<p>Mates in a pair shouldn't be mapped separately. To check if a <a href='http://samtools.sourceforge.net/SAM1.pdf'>BAM</a> file has reads that arise from paired-end sequencing (and were mapped accordingly), just check for the 0x1 bit in the FLAG field (i.e., see if <code>samtools view -f 0x1 something.bam</code> prints any reads).</p>
