--- Reference genome, AF086833 SRR Run, SRR1972739 --- Total alignments, 20740 Unmapped, 5461 echo Mapped, 15279 Proper pair, 15216 Reads on forward strand, 8936 Reads on reverse strand, 6343 Reads mapped but mate unmapped, 11 Reads in file 1 where mate is on reverse strand, 2947 Reads in file 2 on the forward strand where mate in file 1 is on reverse strand, 2975 ---- Flags Command: samtools flags MREVERSE,READ1 0x60 96 MREVERSE,READ1 Command: samtools flags 96 0x60 96 MREVERSE,READ1 --- Work strategy --- Suppose you need: supplementary alignments from file 1 on the forward strand where the mate is on the reverse First find flags for each attribute: 0x10 16 REVERSE 0x800 2048 SUPPLEMENTARY 0x20 32 MREVERSE 0x40 64 READ1 # Perform the filtering (long form): samtools view -c -F 16 -f 2048 -f 32 -f 64 results.bam 7 # Perform the filtering (short form, all flags combined into one): samtools view -c -F 16 -f 2144 results.bam 7