Question: Error using BioMart. No encoding supplied.
1
gravatar for scottschu97
2.5 years ago by
scottschu9710
scottschu9710 wrote:

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 bio biomart R genome • 1.2k views
ADD COMMENTlink modified 2.5 years ago by Mike Smith1.5k • written 2.5 years ago by scottschu9710

Tagging: Emily_Ensembl

ADD REPLYlink modified 2.5 years ago • written 2.5 years ago by genomax85k
2
gravatar for Mike Smith
2.5 years ago by
Mike Smith1.5k
EMBL Heidelberg / de.NBI
Mike Smith1.5k wrote:

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 COMMENTlink modified 2.5 years ago • written 2.5 years ago by Mike Smith1.5k

Thank you! This helped!

ADD REPLYlink written 2.5 years ago by scottschu9710
1
gravatar for Emily_Ensembl
2.5 years ago by
Emily_Ensembl21k
EMBL-EBI
Emily_Ensembl21k wrote:

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 COMMENTlink modified 2.5 years ago • written 2.5 years ago by Emily_Ensembl21k

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

ADD REPLYlink written 2.5 years ago by scottschu9710
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 760 users visited in the last hour