美文网首页
Samtools flagstat

Samtools flagstat

作者: vicLeo | 来源:发表于2020-02-12 09:19 被阅读0次
Usage: samtools flagstat [options] <in.bam>
      --input-fmt-option OPT[=VAL]
               Specify a single input file format option in the form
               of OPTION or OPTION=VALUE
  -@, --threads INT
               Number of additional threads to use [0]
      --verbosity INT
               Set level of verbosity
  -O, --output-fmt FORMAT[,OPT[=VAL]]...
               Specify output format (json, tsv)
用法:
samtools flagstat sorted.bam > sorted.flagstat.txt
实例:
samtools flagstat /home/lchen/circ/sorted/sorted_merged.bam > /home/lchen/circ/sorted/sorted.flagstat.txt
查看跑后结果:
 cat sorted.flagstat.txt 
405304059 + 0 in total (QC-passed reads + QC-failed reads)
17312240 + 0 secondary
41715624 + 0 supplementary
0 + 0 duplicates
405246505 + 0 mapped (99.99% : N/A)
346276195 + 0 paired in sequencing
174346812 + 0 read1
171929383 + 0 read2
311447514 + 0 properly paired (89.94% : N/A)
341276114 + 0 with itself and mate mapped
4942527 + 0 singletons (1.43% : N/A)
4707368 + 0 with mate mapped to a different chr
2951427 + 0 with mate mapped to a different chr (mapQ>=5)

多个比对软件的flagstat

在含有flagstat的文件夹内进行:
(base) lchen@lchen-Vostro-5460:~$ cat *| awk '{print $1}' |paste - - - - - - - - - - - - -

(base) lchen@lchen-Vostro-5460:~$ cut -d"+" -f 2 tmp.flagstat |cut -d" " -f  3 -10

生成表格

相关文章

网友评论

      本文标题:Samtools flagstat

      本文链接:https://www.haomeiwen.com/subject/sojqfhtx.html