Annotating snps with gene information
1
0
Entering edit mode
22 months ago
a.wagen • 0

Hi,

I am trying to annotate a list of snps with the ENSG gene number using biomaRt. I need to use ensemble version 91. I have built the following query:

snps = c("rs201327123"  "rs141149254"  "rs114420996"  "rs62637817")

ensembl.snp = useEnsembl(biomart="snps", version=91)
mart.snp <- useMart(biomart = "ENSEMBL_MART_SNP")
dataset.snp <- useDataset(dataset = "hsapiens_snp", mart=mart.snp)

getBM(attributes=c('refsnp_id', 'ensembl_gene_stable_id'), 
  filters = 'snp_filter', 
  values = snps, 
  mart = dataset.snp)

However the output does not include any gene ids (all are listed as NA's).

Any thoughts very much appreciated!

Aaron

SNPs gene annotation biomart • 894 views
ADD COMMENT
2
Entering edit mode
22 months ago
barslmn ★ 2.3k

Following the example here. When you say useMart I think it creates a connection with latest version (108 when writing this) separate from the useEnsembl where you supplied the version. rs141149254 is upstream in version 91 and expected to be NA in version 108 since its intergenic, but I am not sure why others are NA in release 108.

library(biomaRt)
snpmart = useEnsembl(biomart = "snp", dataset="hsapiens_snp", version=91)
snps = c("rs201327123",  "rs141149254",  "rs114420996",  "rs62637817", "rs699")
getBM(attributes=c('refsnp_id', 'ensembl_gene_stable_id'),
    filters = 'snp_filter',
    values = snps,
    mart = snpmart)

Output:

refsnp_id ensembl_gene_stable_id
1 rs114420996        ENSG00000240361
2 rs141149254        ENSG00000268020
3 rs141149254        ENSG00000240361
4 rs201327123        ENSG00000278267
5 rs201327123        ENSG00000227232
6 rs201327123        ENSG00000223972
7  rs62637817        ENSG00000240361
8       rs699        ENSG00000135744
9       rs699        ENSG00000244137
ADD COMMENT
0
Entering edit mode

Thanks - that worked.

ADD REPLY

Login before adding your answer.

Traffic: 2573 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