使用bcftools提取指定样本的vcf文件(extract specified samples in vcf format)

1、下载安装bcftools

2、准备样本ID文件,这里命名为samplelistname.txt,一个样本一行,如下所示:

sample1

sample2

sample3

3、输入命令:

bcftools view -S samplelistname.txt /1000genomes/ALL.chr16.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz -Ov > samplelist_1000Genomes.vcf

 

参考链接:

https://www.biostars.org/p/184950/

https://samtools.github.io/bcftools/bcftools.html#view

posted @ 2018-06-22 10:21  橙子牛奶糖  阅读(9762)  评论(2编辑  收藏  举报