Hi,
I'm trying to convert some Entrez Gene IDs from mouse to human Gene Names using the following code and get an error message (see below):
human = useMart("ensembl", dataset = "hsapiens_gene_ensembl")
mouse = useMart("ensembl", dataset = "mmusculus_gene_ensembl")
genes = c(68355,70018,67373)
genes = getLDS(attributes = c("entrezgene"), filters = "entrezgene", values = genes ,mart = mouse, attributesL = c("hgnc_symbol"), martL = human, uniqueRows=F)
[1] EntrezGene.ID
<0 rows> (or 0-length row.names)
Error in getLDS(attributes = c("entrezgene"), filters = "entrezgene", : The query to the BioMart webservice returned an invalid result: the number of columns in the result table does not equal the number of attributes in the query. Please report this to the mailing list.
Does anyone have an idea, how to fix this?
Thanks,
Carsten
Thanks a lot that makes sense! I've tried now a number of other IDs and the code works.
This has been patched in biomaRt version 2.31.3. The misleading error should not be thrown in this scenario anymore. If no results are returned you now get a
data.frame
with 0 rows, which is the same behaviour as forgetBM()
.Thanks for confirming that it works with other ID values. I'll try to get a patch in place to give a more helpful message for this use case. This isn't really an 'Error' or an 'invalid result' and the current message isn't very informative.