Error using BioMart. No encoding supplied.
2
1
Entering edit mode
6.3 years ago
scottschu97 ▴ 20

Does anyone know how to solve this error? I have never seen this error before and my current script has been working fine up until this point.

 > t2g <- biomaRt::getBM(
 +   attributes = c("ensembl_transcript_id", "transcript_version",
 +                  "ensembl_gene_id", "external_gene_name", "description",
 +                  "transcript_biotype"), mart = mart)
 No encoding supplied: defaulting to UTF-8.
 Error in biomaRt::getBM(attributes = c("ensembl_transcript_id", "transcript_version",  : 
 The query to the BioMart webservice returned an invalid result: biomaRt expected 
 a character string of length 1. Please report this to the mailing list.
RNA-Seq R bio genome biomart • 2.3k views
ADD COMMENT
0
Entering edit mode

Tagging: Emily_Ensembl

ADD REPLY
2
Entering edit mode
6.3 years ago
Mike Smith ★ 2.0k

For me the Ensembl mirror sites are down. It looks like you're US based, so by default you'll get redirected to uswest.ensembl.org or useast.ensembl.org, neither of which are working for me at the moment.

The main site is working so you want to use www.ensembl.org as your host. However you also have to supply the argument ensemblRedirect = FALSE, otherwise their internal redirection will simply send you back to your local site. This works for me, even if I'm using a server based in Texas:

mart <- useMart(biomart = "ENSEMBL_MART_ENSEMBL", 
                dataset = "hsapiens_gene_ensembl", 
                host = 'www.ensembl.org',
                ensemblRedirect = FALSE)

After some discussion with the Ensembl BioMart team the plan going forward is to remove the redirection entirely when using biomaRt, so this should no longer be an issue, and you'll go to whatever address you've provided. I'll try to update here when that's been done.


The 'No Encoding Supplied' message is a red herring relating to the content being returned by the server - you see it whether there's a problem or not. I've already addressed this in the developmental version of biomaRt, and will update the release version too. It's not very helpful to end users!

ADD COMMENT
0
Entering edit mode

Thank you! This helped!

ADD REPLY
1
Entering edit mode
6.3 years ago
Emily 23k

Your query works fine for me. There is a similar query on Ensembl helpdesk with the same error at about the same time, so maybe there was a short-term problem with biomaRt connectivity.

If you're still having the problem, can you send us details of your connection to the mart. Are you using the main mart or one of the mirrors (eg uswest.ensembl.org)?

ADD COMMENT
0
Entering edit mode

Thank you! It seems it was a small connection error. It is working fine now!

ADD REPLY

Login before adding your answer.

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