Get gene names from rs SNP ids for mmusculus_gene_ensembl
Entering edit mode
14 months ago

I have mouse data with an old mapping from rs SNP IDs to base pair position and chromosome. I would like to query Ensembl to get the genes and then the gene annotations for the rs SNP IDs in my data. When I go to the Ensembl website ( with GRCm39, I can enter the rs ID and get information on that SNP. I would like to do this in code because I have about 250 SNPs that I want to look at.

I found this old post, that does what I want for homo sapiens: Get gene names from rs SNP ids

This code still works for homo sapiens. However, when changing it to the mouse genome GRCm39 (mmusculus_gene_ensembl), there does not seem to be a single filter by which I could query the database using the rs IDs.

Here is my code:

ensembl <- useEnsembl(biomart = "genes", dataset = "mmusculus_gene_ensembl")
filters <- listFilters(ensembl)
attributes = listAttributes(ensembl)

for (f in filters[,1]) {
  searchFilterOptions(mart = ensembl, filter = f, pattern = "rs")

None of the filters shows any results for any rs query. Does anyone understand what I am doing wrong?

snp rs mouse gene • 571 views
Entering edit mode
14 months ago
LChart 3.3k

If your snp IDs are truly from the mouse dbSNP (i.e., differences between mouse strains), you can paste the list into the batch query field on the jackson lab website:

and you can download the result as a text file

Entering edit mode

This does give me information for a large chunk of the IDs I have! Thank you!


Login before adding your answer.

Traffic: 2112 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6