I have a list of 390 SNPs that I need to retrieve rsIDs for on the hg19 build.
My SNP file is in the following bed format (chromosome start stop).
chr1 207679307 207679307 chr1 207684192 207684192 chr1 207685786 207685786 chr1 207685965 207685965 chr1 207692049 207692049
BiomaRt has been recommended for this and I have managed to retrieve rsIDs for individual loci using this code:
snp_mart = useMart(biomart="ENSEMBL_MART_SNP", host="grch37.ensembl.org", path="/biomart/martservice", dataset="hsapiens_snp") test <- getBM(attributes = c('refsnp_id','allele','chrom_start','chrom_strand'), filters = c('chr_name','start','end'), values = list(7,37844263,37844263), mart = snpmart)
However, I'm not sure of the best way to quickly run all 390 SNPs through this code. Is this possible?
I suspect this may not be the best way to retrieve rsIDs, I have searched for other posts on this i.e see here but ideally I'm looking for a solution in R or linux.