This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how do you download a single SNP in vcf format?

how do you download a single SNP in vcf format? I want to load in into a variant effect predictor tool and it must be in vcf Doire

snp

3 answers

VEP does not need every column of the VCF format, only chr, pos, ref and alt. Those values should be straightforward to extract from a SNP entry.

you could filter it with vcftools

vcftools --vcf $vcf --positions SNP_list.txt --recode --out $out

or

vcftools --vcf $vcf --chr $chr --from-bp $start --to-bp $end --recode --out $out

The advantage of that is that it will also work with gzvcf or for multiple SNPs, but honestly, it's probably just as easy to extract using cat | grep in a vcf as mentioned above

bcftools view will do this quickly and easily.

Log in to answer this question.