grimbough / biomaRt

R package providing query functionality to BioMart instances like Ensembl
https://bioconductor.org/packages/biomaRt/
34 stars 13 forks source link

Timeout was reached: [www.ensembl.org:80] Operation timed out after 300000 milliseconds with 0 bytes received #23

Closed aarbduarte closed 3 years ago

aarbduarte commented 3 years ago

Hi, I've been using biomaRt for the past year but recently I'm not able to retrieve rs ids from genomics position.

Using the following code:

snpmart <- useMart("ENSEMBL_MART_SNP",dataset = "hsapiens_snp")
getBM(attributes = c('refsnp_id'), 
      filters = c('chr_name','start','end'), 
      values = list(1,1230159,1230160), 
      mart = snpmart)

returns:

Error in curl::curl_fetch_memory(url, handle = handle) : 
  Timeout was reached: [www.ensembl.org:80] Operation timed out after 300000 milliseconds with 0 bytes received

when it should have returned rs11260563. Any idea?

grimbough commented 3 years ago

I think there might be a problem with the server at Ensembl's end. I get a similar failure if I try to use the BioMart web interface. It looks like the code is still working if you use the version 100 archive, which should not be too out of date:

library(biomaRt)

snpmart <- useEnsembl(biomart = "snp", dataset = "hsapiens_snp", version = 100)

getBM(attributes = c('refsnp_id'), 
      filters = c('chr_name','start','end'), 
      values = list(1,1230159,1230160), 
      mart = snpmart)
#>      refsnp_id
#> 1 rs1362011993
#> 2   rs11260563
aarbduarte commented 3 years ago

thank you