I downloaded the dbSNP VCF file and I have a seperate list of rs#. What i would like to do is get the chromosome and coordinate for each of my SNPs from the dbSNP VCF.
Ideally it would be great if i could create another VCF file with only my SNPs in it and another files which had my SNP and the chromosome number and coordinate with it.
if your list of SNP is not too large, you can insert a fgrep -f rs.txt before the sort to speed up things. But at this point, there is no guarantee that the match is in the ID column rather than in the INFO column.
Replace <rsNumber> with your SNP ID of interest. The result is a BED file, with the first column containing the chromosome and the second and third columns the reference base position of the SNP.
If you're going to do this for a lot of SNPs, save the converted results and grep on that: