Question: Samtools stats "inward oriented pairs" - what flags does this correspond to?
gravatar for roryC
16 months ago by
University of Edinburgh
roryC0 wrote:


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?


ADD COMMENTlink modified 11 months ago by vo20 • written 16 months ago by roryC0
gravatar for Devon Ryan
16 months ago by
Devon Ryan89k
Freiburg, Germany
Devon Ryan89k wrote:

Perhaps you have duplicates marked and are literally looking for 83/163/99/147. That'd explain an underestimate.

ADD COMMENTlink written 16 months ago by Devon Ryan89k
gravatar for vo2
11 months ago by
vo20 wrote:

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.

ADD COMMENTlink modified 11 months ago • written 11 months ago by vo20
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1498 users visited in the last hour