Retrieve chromosome ID using rsid
I have ~500,000 rsids - in the following format
MarkerName A1 A2
rs2326918 a g
rs7929618 c g
rs66941928 t c
I want the chromosome number associated with each MarkerName. So the output would be like this:
MarkerName A1 A2 Chr
rs2326918 a g 6
rs7929618 c g 6
rs66941928 t c 6
I don't care about A1/A2, I just need the chromosome number. How can i do this?
• 1,467 views
•
link
1 answer
Using EntrezDirect:
$ esearch -db snp -query rs2326918 | esummary | xtract -pattern DocumentSummary -element CHR,CHRPOS,SPDI
6 6:130518946 NC_000006.12:130518945:A:G
6 6:130518946 NC_000006.12:130518945:A:G
• 0 views
•
link
Log in to answer this question.
join on rsid with dbsnp vcf.