2

I was trying to retrieve information on a SNP location. I tried to follow the instructions of an answer from this website, but the command doesn't work anymore:

library(biomaRt) # biomaRt_2.30.0

snp_mart = useMart("ENSEMBL_MART_SNP", dataset="hsapiens_snp")

snp_ids = c("rs16828074", "rs17232800")
snp_attributes = c("refsnp_id", "chr_name", "chrom_start")

snp_locations = getBM(attributes=snp_attributes, filters="snp_filter", 
                      values=snp_ids, mart=snp_mart)

I get the following error after waiting for a long time:

Error in value[[3L]](cond) : 
  Request to BioMart web service failed. Verify if you are still connected to the internet.  Alternatively the BioMart web service is temporarily down.

Did anything change in biomaRt commands since the last version? Or am I doing something wrong?

RDlady
  • 378
  • 2
  • 16
  • 2
    Maybe the service is down as the message says? – Samuel Oct 12 '17 at 21:47
  • This has been going for weeks, and the server website seems to be working fine (http://www.ensembl.org/). And all the other datasets in the same server seem to be working (gene, protein, etc). This problem is only with the SNP dataset, exactly the one I need. – RDlady Oct 12 '17 at 21:59
  • I get the same error right now. Try contacting helpdesk@ensembl.org, they are pretty helpful. – neilfws Oct 12 '17 at 22:24
  • Thanks! For now I found a workaround for it by using an older ensembl archive as host. But I will contact them for sure. – RDlady Oct 12 '17 at 23:15

1 Answers1

3

This is more like a workaround then a definitive answer to this problem. But now Ensembl is in its version 90. If I use an archived host from the previous version (v89, from http://may2017.archive.ensembl.org), the SNP datasets is working again. So here is my temporary solution while v90 is not working for SNPs:

library("biomaRt")
snp_mart = useMart(biomart = "ENSEMBL_MART_SNP", dataset="hsapiens_snp", host='may2017.archive.ensembl.org')

snp_ids = c("rs16828074", "rs17232800")

snp_attributes = c("refsnp_id", "chr_name", "chrom_start")

snp_locations = getBM(attributes=snp_attributes, filters="snp_filter", 
                       values=snp_ids, mart=snp_mart)

The result should look like this:

snp_locations
   refsnp_id chr_name chrom_start
1 rs16828074        2   231454043
2 rs17232800       18    68625022
RDlady
  • 378
  • 2
  • 16