Question: Samtools stats "inward oriented pairs" - what flags does this correspond to?
gravatar for roryC
2.8 years 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?


bam sam samtools sequence alignment • 1.4k views
ADD COMMENTlink modified 2.4 years ago by vo20 • written 2.8 years ago by roryC0
gravatar for Devon Ryan
2.8 years ago by
Devon Ryan96k
Freiburg, Germany
Devon Ryan96k wrote:

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

ADD COMMENTlink written 2.8 years ago by Devon Ryan96k
gravatar for vo2
2.4 years 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 2.4 years ago • written 2.4 years 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: 853 users visited in the last hour