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