Thanks for the informative answer!
I have a vcf file containing a couple thousand SNPs. None of them have a number in the ID column. I know that most of these SNPs do not have a dbSNP ID. However, I want to find the ID for the ones that do.
Is there any way to loop over the .vcf file and query a database to fill in the ID for the SNPs that are discovered?
1 answer
If your organism of interest is Human, then the Variant Annotation Integrator (VAI) at the UCSC Genome Browser can get these rsID's for you. Load your VCF file as a custom track, head to the VAI, make whatever selections you want, then make sure the "Include dbSNP rs# ID if one exists" box is checked, and click get output. You'll get some output with a bunch of info that maybe you aren't interested in, but any rsId's will be included. You can output these results to a file then filter for lines that have the rsId.
If you have any questions about using the VAI, or about the UCSC Genome Browser in general, feel free to send them to our mailing lists: genome@soe.ucsc.edu for most questions, or genome-www@soe.ucsc.edu if your question involves private data
ChrisL from the UCSC Genome Browser
Log in to answer this question.
if you have dbSNP vcf and sample vcf, you can intersect both of them