Error in biomaRt
1
0
Entering edit mode
@angelicalindlof-20481
Last seen 5.6 years ago

Error 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.

I have previously used BioMart without any problems. But now I get this error message, with code that previously worked fine.

My code:

library( "biomaRt" ) res <- fc$counts tmp <- sapply( strsplit( rownames(res), split="\+" ), "[", 1 ) tmp <- sapply( strsplit(tmp, split="\." ), "[", 1 ) res$ensembl <- tmp ensembl = useMart( "ensembl", dataset = "hsapiensgeneensembl" ) genemap <- getBM( attributes = c("ensemblgeneid", "entrezgene", "hgncsymbol"), filters = "ensemblgene_id", values = res$ensembl, mart = ensembl )

fc$counts are gene IDs and counts from featureCounts function.

biomaRt getBM • 1.0k views
ADD COMMENT
0
Entering edit mode
Mike Smith ★ 6.6k
@mike-smith
Last seen 2 hours ago
EMBL Heidelberg

I'm seeing a few reports of this error at the moment, which suggests to me that maybe Ensembl is being quite slow and timing out on your query. Can you try using a different mirror that may be faster? You can do this by running this line before calling getBM():

ensembl = useEnsembl( "ensembl", 
                      dataset = "hsapiens_gene_ensembl", 
                      mirror = "useast" )

Available options for the mirror argument are: 'uswest', 'useast', 'asia'

ADD COMMENT
0
Entering edit mode

Thank you! It seems correct. Now it's working fine and much faster as well. I also tried BiomaRt web server at Ensembl, but that doesn't respond very well either at the moment.

ADD REPLY

Login before adding your answer.

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