I have a bam file of which I have to extract reads that are mapping in proper pair as per library construction protocol.
The definition of proper pair is PE reads facing inwards. (-----> <-----)
Not able to perfectly form the filters that I should use to extract the properly mapped pair.
I would like to add that I am not looking for all the pairs in a bam file. I understand that is trivial enough and can be pulled out with -f 3 filter in the samtools.
What I am looking for is specific pair which is mapped inwards (----> <-----) . I know many read pairs in this particular library could be mappee (<----- <-----) or (-----> ---->)