grimbough / biomaRt

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

Scan error using biomart with version option #2

Closed grimbough closed 6 years ago

grimbough commented 6 years ago

https://support.bioconductor.org/p/104454/

grimbough commented 6 years ago

This issue was related to changes in how users get redirected when the access Ensembl subdomains.  If you go to http://e90.ensembl.org you are redirected to http://aug2017.archive.ensembl.orgbiomaRt was unable to handle this correctly.

I've patched this behaviour (9e4bbc3), so if you provide a version number, it will automatically use the correct URL e.g.

> ensembl <- useEnsembl(biomart="ensembl", 
+                       dataset="hsapiens_gene_ensembl", 
+                       version=90)
> 
> ensembl@host
[1] "http://aug2017.archive.ensembl.org:80/biomart/martservice"
> 
> getBM(attributes=c('ensembl_gene_id','external_gene_name', 'gene_biotype'),
+       filter="ensembl_gene_id", 
+       values="ENSG00000000003", 
+       mart = ensembl)
  ensembl_gene_id external_gene_name   gene_biotype
1 ENSG00000000003             TSPAN6 protein_coding

This is available in biomaRt version >= 2.35.8