Question: Error using BioMart. No encoding supplied.
1
gravatar for scottschu97
21 months 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 • 898 views
ADD COMMENTlink modified 21 months ago by Mike Smith1.4k • written 21 months ago by scottschu9710

Tagging: Emily_Ensembl

ADD REPLYlink modified 21 months ago • written 21 months ago by genomax73k
2
gravatar for Mike Smith
21 months ago by
Mike Smith1.4k
EMBL Heidelberg / de.NBI
Mike Smith1.4k 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 21 months ago • written 21 months ago by Mike Smith1.4k

Thank you! This helped!

ADD REPLYlink written 21 months ago by scottschu9710
1
gravatar for Emily_Ensembl
21 months ago by
Emily_Ensembl19k
EMBL-EBI
Emily_Ensembl19k 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 21 months ago • written 21 months ago by Emily_Ensembl19k

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

ADD REPLYlink written 21 months 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: 2055 users visited in the last hour