Get dbSNP ids for a gene name
3
0
Entering edit mode
10.3 years ago
win ▴ 990

Hi all,

I have a list of genes and I would like a list of rs# for that gene. I can see that one can view such a list at the following URL:

http://www.ncbi.nlm.nih.gov/snp?cmd=search&term=LPL

But my question is how could I do this programatically and get a list of rs#.

Thanks

dbSNP Gene • 3.9k views
ADD COMMENT
3
Entering edit mode
10.3 years ago
Neilfws 49k

Programatically, you can use BioMart. Here's an example using the R/Bioconductor biomaRt package.

library(biomaRt)
mart.genes <- useMart("ensembl", "hsapiens_gene_ensembl")

getRsids <- function(gene = "LPL", mart = mart.genes) {
  results <- getBM(attributes = c("external_id", "external_gene_id"),
                   filters    = "hgnc_symbol", values = gene, mart = mart)
  return(results)
}

# default gene = LPL
lpl <- getRsids()

head(lpl)
  external_id external_gene_id
1 rs368991480              LPL
2 rs200280296              LPL
3 rs186940970              LPL
4 rs151133350              LPL
5 rs180845880              LPL
6   rs3043732              LPL

# or specify gene e.g. p53
p53 <- getRsids(gene = "TP53")
ADD COMMENT
1
Entering edit mode
10.3 years ago
Dejian ★ 1.3k

It seems this is what you want ( ftp://ftp.ncbi.nlm.nih.gov/snp/organisms/human_9606/gene_report/ ).

ADD COMMENT
0
Entering edit mode
10.3 years ago
rmflight ▴ 90

It also seems that Bioconductor maintains an annotation package for some of the dbSNP releases, eg http://www.bioconductor.org/packages/release/data/annotation/html/SNPlocs.Hsapiens.dbSNP.20120608.html

ADD COMMENT

Login before adding your answer.

Traffic: 1324 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6