Hi all, I am not sure if this was asked before but I would like to assign a list of SNPs to the corresponding gene names:
I have a df such as the following:
SNP std.XPEHH CHR BP rank
1 rs376121383 5.86403 2 97868880 1
2 rs9324211 5.86122 2 97867870 2
3 rs12445490 5.85442 16 5570974 3
4 rs201474380 5.84314 2 97868313 4
5 rs190916690 5.79274 2 97868544 5
6 rs112920594 5.79176 2 97866321 6
7 rs372154564 5.79176 2 97866355 7
8 rs13409957 5.78445 2 97865894 8
9 2:97868257 5.78096 2 97868257 9
10 rs116237095 5.78096 2 97868240 10
11 rs181446057 5.77994 2 97868213 11
12 rs370914866 5.77985 2 97867072 12
13 2:97865943 5.77978 2 97865943 13
14 rs115004312 5.76058 2 97866683 14
15 rs192731212 5.76058 2 97866908 15
16 rs371563138 5.75741 2 97867703 16
17 rs111558429 5.75590 2 97867824 17
18 rs9636497 5.73166 2 97868926 18
19 rs3926003 5.71338 2 97870247 19
20 rs12327919 5.70304 2 97866928 20
21 rs116820074 5.64604 16 5570936 21
22 16:5570973 5.62932 16 5570973 22
23 rs115661023 5.61264 2 97865044 23
24 rs55879702 5.60655 2 97866370 24
25 rs377749588 5.60236 2 97865217 25
26 rs148207230 5.59137 16 5564330 26
27 rs10169898 5.57194 2 61103311 27
28 rs9636495 5.56266 2 97869056 28
29 rs8053291 5.53916 16 5566143 29
30 rs10168001 5.53839 2 97867470 30
....
BP is the coordinate of the corresponding SNP in base pair on the genome. Some of the SNPs are not annotated, so the ID is like number 9 in the df, with the chromosome number and base pair location. I would like to know in which gene the BP number is falling and so I can assign SNPs to their gene. I would like to do this in R and the gene name should be accordingly to hg19 UCSC and not ESEMBL, it would be better. Any help highly appreciated, thanks a lot Cheers
This has been asked before many times, search for "map SNP to gene":
ok thanks a lot for all the links. I am taking a look.