how do you download a single SNP in vcf format?
3
0
Entering edit mode
5.5 years ago
doirerosie • 0

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 • 896 views
ADD COMMENT
0
Entering edit mode
5.5 years ago
Ram 44k

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.

ADD COMMENT
0
Entering edit mode
5.5 years ago
Ace ▴ 90

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

ADD COMMENT
0
Entering edit mode
5.5 years ago
Brice Sarver ★ 3.8k

bcftools view will do this quickly and easily.

ADD COMMENT

Login before adding your answer.

Traffic: 2248 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6