biomaRt useMart Error in textConnection(BioMartVersion) : invalid 'text' argument
1
0
Entering edit mode
pcantalupo ▴ 10
@pcantalupo-8617
Last seen 5 months ago
United States

Hello,

I'm having trouble connecting to ensembl with biomaRt package. I'm using this code

useMart(biomart="ensembl", dataset="hsapiens_gene_ensembl", verbose = TRUE)

About 50% of the time I get the following error. It is impossible to reproduce consistently

Ensembl site unresponsive, trying uswest mirror
Attempting web service request:
https://www.ensembl.org:443/biomart/martservice?type=version&requestid=biomaRt&mart=ENSEMBL_MART_ENSEMBL
Ensembl site unresponsive, trying asia mirror
Error in textConnection(BioMartVersion) : invalid 'text' argument
In addition: Warning message:
In if (BioMartVersion == "\n" | BioMartVersion == "") { :
  the condition has length > 1 and only the first element will be used

What am I doing wrong? How to make it more consistent so that I can trust my scripts to run without problems?

I'm running R 4.1.1 and biomaRt 2.50.3

Thank you,

Paul

biomaRt • 2.5k views
ADD COMMENT
1
Entering edit mode
sbcn ▴ 80
@sbcn-4752
Last seen 2.3 years ago
Spain

Hi Paul,

I was getting the exact same error with biomaRt 2.50.3 under R 4.1.3, running:

mart <- useMart(biomart = "ensembl", dataset = "hsapiens_gene_ensembl")

(while this command was working ok a few days back!).

I fixed it by explicitely stating the host, as mentioned in this post:

mart <- useMart(biomart = "ensembl", dataset = "hsapiens_gene_ensembl", host="https://uswest.ensembl.org")

so it might be an issue with the current host useMart is using by default (Defaults to www.ensembl.org)?

ADD COMMENT
0
Entering edit mode

Thank you! Seems to be working consistently right now. I'm surprised the default doesn't work correctly. Notice that my error message above says Ensembl site unresponsive, trying uswest mirror. So I'm baffled why it wouldn't work by trying the different mirrors. Oh well, maybe overall the service is a bit flaky and just have to deal with it.

Thank you again

ADD REPLY

Login before adding your answer.

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