Hi,
I'm trying to understand how Samtools stats designates mapped reads as "inward oriented pairs". I have a mate-pair library contaminated with paired end reads, so I would like to extract the PE reads as an independent file. So far I have the following based on flags and insert sizes:
FLAG 83, Insert is negative
FLAG 163, Insert is positive
FLAG 99, Insert is positive
FLAG 147, Insert is negative
The number of reads I get based on the above is ~5% less than that given in the stats output. Any ideas what else is included, or suggestions for how to do this completely differently?
Cheers!
2 answers
Perhaps you have duplicates marked and are literally looking for 83/163/99/147. That'd explain an underestimate.
INWARD = 83, 99, 147, 163 and duplicates (+1024 to any).
OUTWARD = 81, 97, 145, 161 and duplicates (+1024 to any), which are pairs not properly aligned (missing flag 0x2).
OTHER = 65, 113, 129, 177 and duplicates (+1024), which are pairs with both reads in the same direction. You can check what the flags mean here.
Log in to answer this question.