This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Extracting A Rs* Genotype Using Vcf Tools

Does any one know how to extract a SNP genotype from 1000 Genome data easily? VCF tools of GATK?

gatk

2 answers

I think you want:

vcftools --vcf vcf_file --snp rs_id --recode --keep-INFO-all --out output_prefix

awk '/^#/||$2=="rs123456"' in.vcf > out.vcf

Log in to answer this question.