本篇主要介绍 1. annotate
bcftools annotate -a db.vcf -c ID,QUAL,+TAG view.vcf -o annotate.vcf
第二个用途是编辑VCF文件,比如去除其中的某些注释信息,或者去除某些样本,用法如下 bcftools annotate -x ID,INFO/DP,FORMAT/DP view.vcf -o remove.id.vcf
2. concat
bcftools concat merge.2.a.vcf.gz merge.3.a.vcf.gz -o -o merge.vcf 还需要注意一点,输入的VCF文件必须是经过 3. merge
bcftools merge merge.a.vcf.gz merge.b.vcf.gz -o merge.vcf 该命令要求输入文件必须是经过 4. isec
bcftools isec A.vcf.gz B.vcf.gz -p dir 默认参数就是取交集,更多高级用法请参考帮助文档。 5. stats
bcftools stats view.vcf > view.stats 输出文件中记录了很多类型的统计数据,重点介绍以下几种 基本信息: SN 0 number of samples: 3
SN 0 number of records: 15
SN 0 number of no-ALTs: 1
SN 0 number of SNPs: 11
SN 0 number of MNPs: 0
SN 0 number of indels: 3
SN 0 number of others: 0
SN 0 number of multiallelic sites: 1
SN 0 number of multiallelic SNP sites: 0 颠换和转换的比例: # TSTV, transitions/transversions:
# TSTV [2]id [3]ts [4]tv [5]ts/tv [6]ts (1st ALT) [7]tv (1st ALT) [8]ts/tv (1st ALT)
TSTV 0 8 3 2.67 8 3 2.67 Indel 长度分布: # IDD, InDel distribution:
# IDD [2]id [3]length (deletions negative) [4]count
IDD 0 -2 1
IDD 0 1 2
IDD 0 3 1 碱基替换类型: # ST, Substitution types:
# ST [2]id [3]type [4]count
ST 0 A>C 0
ST 0 A>G 0
ST 0 A>T 0
ST 0 C>A 1
ST 0 C>G 0
ST 0 C>T 4
ST 0 G>A 1
ST 0 G>C 1
ST 0 G>T 1
ST 0 T>A 0
ST 0 T>C 3
ST 0 T>G 0 输出文件可以用于 plot-vcfstats view.stats -p output
输出目录下文件很多,详细列表如下 ├── counts_by_af.indels.dat
├── counts_by_af.snps.dat
├── depth.0.dat
├── depth.0.pdf
├── depth.0.png
├── indels.0.dat
├── indels.0.pdf
├── indels.0.png
├── plot.py
├── plot-vcfstats.log
├── substitutions.0.pdf
├── substitutions.0.png
├── summary.aux
├── summary.log
├── summary.pdf
├── summary.tex
├── tstv_by_af.0.dat
└── tstv_by_qual.0.dat 主要看 1.不同类型的突变位点汇总 2.插入缺失长度分布图 3.测序深度分布 4.碱基转换类型分布 |
|