Biomart: Error in getLDS
1
0
Entering edit mode
Carsten ▴ 10
@carsten-11929
Last seen 7.4 years ago
Germany

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

Biomart • 1.6k views
ADD COMMENT
3
Entering edit mode
@james-w-macdonald-5106
Last seen 5 minutes ago
United States

I am not sure there is a 'fix' for this. All three of those genes are putative Riken genes, so I don't think there is (or should be) any expectation that there will be a known human ortholog. In addition, only one of those IDs is even known to Biomart:

> getBM(c("entrezgene", "mgi_symbol"),"entrezgene", genes, mouse)
  entrezgene    mgi_symbol
1      67373 2210010C04Rik

The other two are (according to NCBI) also Riken genes, but evidently EBI/Ensembl doesn't agree.

ADD COMMENT
1
Entering edit mode

Thanks a lot that makes sense! I've tried now a number of other IDs and the code works. 

ADD REPLY
1
Entering edit mode

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 for getBM()

ADD REPLY
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

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