Hi all,
I am trying to extract discordant pairs from a BAM file in order to generate VAF for translocation (t4,t6). I generated a subset of BAM file that contains the reads around the breakpoint on chr4.
Now in order to find the PE reads that support the translocation, I believe I can do that by extracting all the PE reads and then looking for specific ones that have the mate on chr6.
PEref = $samtools view -F **X** subset-chr4.bam | wc -l
PEsv = $samtools view -F **X** subset-chr4.bam | awk '$7 == 6{print}' | wc -l
and then I can do PEsv / PEref to generate my VAF.
But I am confused on what bitwise flag (X) I should be using to sort with Samtools. I think it should be -F 14 as we do not want reads for which segment or their mate is unmapped. But I am not sure, can anyone please help me with this.
Thank you so much. I appreciate your help.
ARB
Thanks for your reply. Since we are looking for specific SV events, including unmapped reads will increase noise and thus I thought of excluding them. Moreover, the program I am choosing to generate breakpoints also excludes unmapped reads (but its does not generate VAF's) and hence I decided to use -F 14. Does this makes sense?
Thanks again for your input.
Discordant reads should include those reads mapping either too close or too far to their mates, reads mapped in the same DNA strand (=they have the same orientation), and those whose mate are not mapping to the reference. I believe this is the definition of non concordant reads
In any case, flag 14 includes the flag 2 value. But I doubt you can use flag 14, since paired sequences are always odd flags, since they use flag 1