I am trying to get gene name from the SNP ID, I came across some posts and came up with this, but I am getting an error
Here is my code
library(biomaRt) ensembl = useMart("ensembl",dataset="hsapiens_gene_ensembl") getBM(attributes = c("external_gene_name"), filters = "snp_filter", values = "rs3043732", mart = ensembl)
This is the error
Error in getBM(attributes = c("external_gene_name"), filters = "snp_filter", : Invalid filters(s): snp_filter Please use the function 'listFilters' to get valid filter names
I am thinking that the "snp_filter" must have changed in the new version, but I am not able to find the new filter that serves the same purpose. Also is the "external_gene_name" is what the gene name that corresponds to the SNP ID ?