This is a test version of Biostars. For the public version, visit https://www.biostars.org.
An R function for fetching SNP annotations?

Is there an R function in any existing package that allows me to do something like:

annotate("rs34121", build = hg19)

and returns either of these:

  • gene name, if the SNP is inside a gene
  • gene1/gene2, if the SNP is between gene1 and gene2 ?
snp annotation r

1 answer

source("http://bioconductor.org/biocLite.R")
biocLite("FDb.UCSC.snp137common.hg19")

snp137 = features(FDb.UCSC.snp137common.hg19)
snp137['rs34121']

It give you the position of rsid, but not sure about gene name.

Log in to answer this question.