samtools flagstat引數對比對的bam檔案進行統計

小鲨鱼2018發表於2024-10-26

001、命令

samtools flagstat sample_name.sorted.bam > sample_name.flagstat.txt  ## 基本命令

a、生成的檔案是一個包含16行的文字檔案:

002、

(base) [b20223040323@admin2 workdir]$ cat Asiatic1.flagstat.txt      ## 檢視統計結果
622520785 + 0 in total (QC-passed reads + QC-failed reads)      ## 總的reads
620876200 + 0 primary                ## 初級 reads?
1644585 + 0 secondary                ## 次級 secondary?
0 + 0 supplementary                  ## ??
0 + 0 duplicates                     ## ??
0 + 0 primary duplicates             ## ??
621864067 + 0 mapped (99.89% : N/A)  ## ??
620219482 + 0 primary mapped (99.89% : N/A)   ## ??
620876200 + 0 paired in sequencing        ## ??
310438100 + 0 read1
310438100 + 0 read2
612737342 + 0 properly paired (98.69% : N/A)    ## ??
620022610 + 0 with itself and mate mapped   
196872 + 0 singletons (0.03% : N/A)
5577184 + 0 with mate mapped to a different chr
2767972 + 0 with mate mapped to a different chr (mapQ>=5)

003、

相關文章