bioMart error - The query to the BioMart webservice returned an invalid result: biomaRt expected a character string of length 1
1
2
Entering edit mode
Lucy ▴ 60
@lucy-17014
Last seen 2 days ago
United Kingdom

Hi,

Recently I have been getting an error with biomaRt that I didn't use to get with the same command.

The error is:

Batch submitting query [============================================================>---] 95% eta: 29sError in getBM(attributes = c("ensemblgeneid", "entrezgene", "hgnc_symbol"), : The query to the BioMart webservice returned an invalid result: biomaRt expected a character string of length 1. Please report this on the support site at http://support.bioconductor.org

Here is my code:

ensembl <- useMart("ensembl")
ensembl <- useMart("ensembl", dataset = "hsapiens_gene_ensembl")    
mapping <- getBM(attributes = c("ensembl_gene_id", "entrezgene", "hgnc_symbol"), filters = "ensembl_gene_id", values = counts_table_annotated$`Ensembl ID`, mart = ensembl)

countstableannotated$Ensembl ID is a character vector of Ensembl IDs.

Any help with this error would be appreciated.

Best wishes, Lucy

biomaRt • 1.2k views
ADD COMMENT
2
Entering edit mode
Mike Smith ★ 6.5k
@mike-smith
Last seen 1 hour ago
EMBL Heidelberg

To use one of the mirror sites you can do:

mart <- useEnsembl(biomart = "ensembl", 
                   dataset = "hsapiens_gene_ensembl", 
                   mirror = "useast")

Values for the mirror argument are: useast, uswest, asia.

This problem has been arising a lot recently, and I'm in contact with Ensembl to try and find a sustainable solution.

ADD COMMENT
0
Entering edit mode

Great, thank you. This worked well.

ADD REPLY

Login before adding your answer.

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