运行:
samtools flagstat in.bam > out.txt
得到结果(自行添加部分注释):
12051191 + 0 in total (QC-passed reads + QC-failed reads) #后三行primary+secondary+supplementary的总和,即多轮比对输入序列次数总和
4970675 + 0 primary #原始比对时输入的序列总数
6887457 + 0 secondary
193059 + 0 supplementary
0 + 0 duplicates
0 + 0 primary duplicates
11997333 + 0 mapped (99.55% : N/A) #多轮比对后总共比对到的序列次数
4916817 + 0 primary mapped (98.92% : N/A) #成功比对到参考序列的序列数
0 + 0 paired in sequencing
0 + 0 read1
0 + 0 read2
0 + 0 properly paired (N/A : N/A)
0 + 0 with itself and mate mapped
0 + 0 singletons (N/A : N/A)
0 + 0 with mate mapped to a different chr
0 + 0 with mate mapped to a different chr (mapQ>=5)
总体比对比例 98.92% = 4916817(primary mapped) / 4970675(primary)