This does give me information for a large chunk of the IDs I have! Thank you!
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 (http://useast.ensembl.org/Mus_musculus/Info/Index) 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]) {
print(f)
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?
1 answer
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:
http://www.informatics.jax.org/batch
and you can download the result as a text file
Log in to answer this question.