Hey Guys
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 (-----> ---->)
Thanks! -Abhi
This is already answered here: How To Filter Bam File
Although what constitutes a "proper pair" is, I think, up to the aligner, I think most aligners require a pair to point inwards (an "innie") and within some reasonable distance. So I don't think you'll get "lefties" or "righties" as proper pairs, and at least bwa doesn't seem to accept "outties" either - at least not my mate pair library.
This is already answered here: How To Filter Bam File
Well I am not sure how I could re-open this thread but I dont think the other thread pointed by Keith provides the answer I am looking for. I am looking to find a specific directional pair and not all the reads that are paired. I need to know reads that are (---> <---) mapped inwards and not any pair in the data.
-Abhi
Picard provides explaination of the S/BAM flag details: http://picard.sourceforge.net/explain-flags.html