Problems with biomaRt's getLDS
1
0
Entering edit mode
dr ▴ 10
@dr-9473
Last seen 12 months ago
United States

Hi,

I'm trying to use the biomaRt package in order to map mouse gene names to the their human orthologs, retrieving the human gene names and Ensembl IDs as well as the mouse Ensembl IDs. I started trying this:

human.mart <- biomaRt::useMart(host="https://www.ensembl.org", "ENSEMBL_MART_ENSEMBL", dataset="hsapiens_gene_ensembl")
mouse.mart <- biomaRt::useMart(host="https://www.ensembl.org", "ENSEMBL_MART_ENSEMBL", dataset="mmusculus_gene_ensembl")
mouse2human.df <- biomaRt::getLDS(attributes=c("external_gene_name","ensembl_gene_id"),filters=c("external_gene_name"),values=c("Nf1","Pten","Rb1"),mart=mouse.mart,attributesL=c("external_gene_name","ensembl_gene_id"),martL=human.mart)

But it's producing this error:

Error: biomaRt has encountered an unexpected server error.
Consider trying one of the Ensembl mirrors (for more details look at ?useEnsembl)

So then I switched to trying the uswest mirror site:

httr::set_config(httr::config(ssl_verifypeer = FALSE))
human.mart <- biomaRt::useMart(host="https://uswest.ensembl.org", "ENSEMBL_MART_ENSEMBL", dataset="hsapiens_gene_ensembl")
mouse.mart <- biomaRt::useMart(host="https://uswest.ensembl.org", "ENSEMBL_MART_ENSEMBL", dataset="mmusculus_gene_ensembl")
mouse2human.df <- biomaRt::getLDS(attributes=c("external_gene_name","ensembl_gene_id"),filters=c("external_gene_name"),values=c("Nf1","Pten","Rb1"),mart=mouse.mart,attributesL=c("external_gene_name","ensembl_gene_id"),martL=human.mart)

But this is producing this error message:

Error in .createErrorMessage(error_code = status_code(res), host = host) : 
  object 'err_msg' not found

Any idea what's causing this and how to get what I want?

biomaRt • 3.1k views
ADD COMMENT
2
Entering edit mode
Curiousity ▴ 20
@d295a89e
Last seen 23 months ago
Finland

Hi,

Sadly, I have no idea what is causing this, apart from some possible incompatability between getLDS() and newer versions of the database, but I was trying to achieve something very similar using getLDS() with identical error messages after trying to use the alternative mirror sites as well. The automatically suggested usage of useEnsembl() doesn't seem applicable either because its usage resulted, in my case, in another error and the R documentation for getLDS() also states that the mart-parameter should be an "object of class Mart created with the useMart function".

What worked for me was to use archived versions of the database. The problem persisted using the latest archive i.e., version 106, https://apr2022.archive.ensembl.org. But using version 105, https://dec2021.archive.ensembl.org, solved the problem in my case.

So, according to the R documentation for useMart you can just specify the desired archive url as the host, instead of using the deprecated parameter archive. A list of the available archives can be seen using listEnsemblArchives().

In your case, this might look like: human.mart <- biomaRt::useMart(host="https://dec2021.archive.ensembl.org", "ENSEMBL_MART_ENSEMBL", dataset="hsapiens_gene_ensembl")

Since this solved a very similar problem in my case, I think it is worth trying out. Good luck.

ADD COMMENT
0
Entering edit mode

I met the same question. I took your advice, and found it working! Thanks.

ADD REPLY

Login before adding your answer.

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