I'm using biomaRt and converting from RefSnp ID to Ensembl Gene IDs. From what I understand, the SNP IDs are mapped to gene symbols that contain that SNP. Is this correct? Just want to make sure that it is not "nearby", but actually "within". Below is my code. Thanks,
library(biomaRt)
mart.snp = useMart("snp", "hsapiens_snp")
ensembl = useMart("ensembl", dataset="hsapiens_gene_ensembl")
results = getBM(attributes = c("refsnp_id", "ensembl_gene_stable_id"),
filters = "snp_filter", values = SNP_vector, mart = mart.snp)