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

相关文章: