bcftools 为 vcf 文件建索引及合并 vcf 文件

1. bgzip 压缩 vcf 文件为 gz 文件

bgzip -c T8_B8_TN_20171226190133_TN_haplotyper.vcf >T8_B8_TN_20171226190133_TN_haplotyper.vcf.gz
bgzip -c T9_B9_TN_20171226195650_TN_haplotyper.vcf >T9_B9_TN_20171226195650_TN_haplotyper.vcf.gz

 

2. bcftools 为 gz 文件建索引

bcftools index -t T8_B8_TN_20171226190133_TN_haplotyper.vcf.gz
bcftools index -t T9_B9_TN_20171226195650_TN_haplotyper.vcf.gz

 

3. bcftools 合并 vcf 文件

bcftools merge -m snps -f PASS,. --force-samples T8_B8_TN_20171226190133_TN_haplotyper.vcf.gz T9_B9_TN_20171226195650_TN_haplotyper.vcf.gz >merge.vcf

posted on 2018-01-16 09:28  萧飞IDO  阅读(5562)  评论(1编辑  收藏  举报

导航