BiomaRt workaround when Biomart server closed
4
2
Entering edit mode
s.corley ▴ 30
@scorley-6735
Last seen 5.4 years ago
Australia

The BioMart server appears to be unavailable. The website suggests that biomaRt can still be used by changing the host to 'www.ensembl.org'.

I have tried this:

library(biomaRt)
human<-useMart(host="www.ensembl.org", "ensembl", dataset="hsapiens_gene_ensembl")

But no luck. I am getting the errors below.

> library(biomaRt)
> human<-useMart(host="www.ensembl.org", "ensembl", dataset="hsapiens_gene_ensembl")
Error in useMart(host = "www.ensembl.org", "ensembl", dataset = "hsapiens_gene_ensembl") :
  Incorrect BioMart name, use the listMarts function to see which BioMart databases are available
> list<-listMarts()
Space required after the Public Identifier
SystemLiteral " or ' expected
SYSTEM or PUBLIC, the URI is missing
Opening and ending tag mismatch: hr line 7 and body
Opening and ending tag mismatch: body line 4 and html
Premature end of data in tag html line 2
Error: 1: Space required after the Public Identifier
2: SystemLiteral " or ' expected
3: SYSTEM or PUBLIC, the URI is missing
4: Opening and ending tag mismatch: hr line 7 and body
5: Opening and ending tag mismatch: body line 4 and html
6: Premature end of data in tag html line 2

 

Any suggestions would be appreciated.

Thanks

scor

biomart • 5.7k views
ADD COMMENT
4
Entering edit mode
Johannes Rainer ★ 2.1k
@johannes-rainer-6987
Last seen 4 weeks ago
Italy

Dear scor,

using listMarts you'll see that the biomart name is now different:

> listMarts(host="www.ensembl.org")
               biomart               version
1 ENSEMBL_MART_ENSEMBL      Ensembl Genes 82
2     ENSEMBL_MART_SNP  Ensembl Variation 82
3 ENSEMBL_MART_FUNCGEN Ensembl Regulation 82
4    ENSEMBL_MART_VEGA               Vega 62
5                pride        PRIDE (EBI UK)

Thus, you have to use "ENSEMBL_MART_ENSEMBL" instead of "ensembl":

human <- useMart(host="www.ensembl.org", "ENSEMBL_MART_ENSEMBL", dataset="hsapiens_gene_ensembl")

cheers, jo

ADD COMMENT
0
Entering edit mode

Thank you Jo!

ADD REPLY
0
Entering edit mode
> listMarts(host="www.ensembl.org")
Error in `colnames<-`(`*tmp*`, value = c("biomart", "version")) : 
  'names' attribute [2] must be the same length as the vector [0]

This isn't working anymore (as of May 16 2016)

edit: see biomaRt changed host issues the cause is probably versions.  If I get it fixed I'll try and report back here.

ADD REPLY
0
Entering edit mode
hygine ▴ 140
@hygine-9143
Last seen 9.0 years ago
beijing

3 types have changed in use:

listMarts(host="www.ensembl.org")

useMart("ENSEMBL_MART_ENSEMBL",dataset="mmusculus_gene_ensembl", host="www.ensembl.org")

useMart("ENSEMBL_MART_ENSEMBL",dataset="hsapiens_gene_ensembl", host="www.ensembl.org")

useMart("ENSEMBL_MART_ENSEMBL",dataset="aplatyrhynchos_gene_ensembl", host="www.ensembl.org")

useMart("ENSEMBL_MART_ENSEMBL",dataset="drerio_gene_ensembl", host="www.ensembl.org")

useMart("ENSEMBL_MART_ENSEMBL",dataset="ggallus_gene_ensembl", host="www.ensembl.org")

useMart("ENSEMBL_MART_ENSEMBL",dataset="oaries_gene_ensembl", host="www.ensembl.org")

useMart("ENSEMBL_MART_ENSEMBL",dataset="rnorvegicus_gene_ensembl", host="www.ensembl.org")

useMart("ENSEMBL_MART_ENSEMBL",dataset="sscrofa_gene_ensembl", host="www.ensembl.org")

 

listMarts(host="metazoa.ensembl.org")

useMart("metazoa_mart",dataset="bmori_eg_gene", host="metazoa.ensembl.org")

useMart("metazoa_mart",dataset="amellifera_eg_gene", host="metazoa.ensembl.org")

useMart("metazoa_mart",dataset="cgigas_eg_gene", host="metazoa.ensembl.org")

 

listMarts(host="plants.ensembl.org")

useMart("plants_mart",dataset="zmays_eg_gene", host="plants.ensembl.org")

useMart("plants_mart",dataset="sbicolor_eg_gene", host="plants.ensembl.org")

useMart("plants_mart",dataset="stuberosum_eg_gene", host="plants.ensembl.org")

useMart("plants_mart",dataset="osativa_eg_gene", host="plants.ensembl.org")

useMart("plants_mart",dataset="creinhardtii_eg_gene", host="plants.ensembl.org")

ADD COMMENT
0
Entering edit mode
Sarai.Mola • 0
@saraimola-9150
Last seen 9.0 years ago
Canada

Hi,

I use rpy2, a python module which interrogates R, and I use "ENSEMBL_MART_ENSEMBL" instead of  "ensembl" but I have a error with getGene() function :

mart = ruseMart(biomart="ENSEMBL_MART_ENSEMBL",dataset="hsapiens_gene_ensembl", host="www.ensembl.org")

 

Traceback (most recent call last):
  File "main_initiation.py", line 158, in <module>
    g = rgetGene(id=ensembl_gene_id, type="ensembl_gene_id", mart=mart)
  File "/usr/local/lib/python2.7/site-packages/rpy2-2.6.2-py2.7-linux-x86_64.egg/rpy2/robjects/functions.py", line 178, in __call__
    return super(SignatureTranslatedFunction, self).__call__(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/rpy2-2.6.2-py2.7-linux-x86_64.egg/rpy2/robjects/functions.py", line 106, in __call__
    res = super(Function, self).__call__(*new_args, **new_kwargs)
rpy2.rinterface.RRuntimeError: Error in martCheck(mart, "ensembl") :
  This function only works when used with the ensembl BioMart.

 

Any suggestions would be appreciated.

Thanks

Saraï

ADD COMMENT
0
Entering edit mode

Piggybacking on an existing thread with a new question is not really the way to go. In future, please start a new thread.

Do note the error you get:

This function only works when used with the ensembl BioMart.

And as expected, we get the same straight from R:

> getGene("ENSG00000121410", "ensembl_gene_id", mart)
Error in martCheck(mart, "ensembl") :
  This function only works when used with the ensembl BioMart.

Which seems to be pretty clear to me; getGene() expects you to be using the 'regular' BioMart at biomart.org, not the one at ensembl.org. But that's not really a problem is it? getGene() is just a thin wrapper around getBM(), so it should be simple to emulate. The stock attributes for getGene() are the gene symbol, description, chromosome, band, strand, start and end.

> attrib <- c("ensembl_gene_id","hgnc_symbol", "description", "chromosome_name", "band", "strand", "start_position", "end_position")
> getBM(attrib, "ensembl_gene_id","ENSG00000121410", mart)
  ensembl_gene_id hgnc_symbol
1 ENSG00000121410        A1BG
                                             description chromosome_name   band
1 alpha-1-B glycoprotein [Source:HGNC Symbol;Acc:HGNC:5]              19 q13.43
  strand start_position end_position
1     -1       58345178     58353499

 

ADD REPLY
0
Entering edit mode
Sarai.Mola • 0
@saraimola-9150
Last seen 9.0 years ago
Canada

Thanks you!

ADD COMMENT

Login before adding your answer.

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