Download a dbSNP database from the UCSC as a CSV file: http://hgdownload.cse.ucsc.edu/goldenPath/hg19/database/
For example:
wget http://hgdownload.cse.ucsc.edu/goldenPath/hg19/database/snp137Common.txt.gz
Note that the chromStart
column values are 0-based.
Rewrite all SNP names in your plink .bim
file to the corresponding dbSNP rs#. As long as you keep the order intact, all should be fine.
Hi @Heuertje, sorry for not seeing your comment, GitHub doesn't send notifications for Gist comments...
I used something very simple like this:
Use like this if saved as
add_snps.py
: