biomaRt icon indicating copy to clipboard operation
biomaRt copied to clipboard

Error getLDS()

Open Kan-E opened this issue 11 months ago • 2 comments

Dear biomaRt team,

I ran the following code and encountered an error message. Trying other mirror sites didn't resolve the issue. Could you please advise on how to handle this error?

library(biomaRt)
genes <- c("LOC119647577","LOC119652571","LOC119654764","LOC119650780","LOC119654504","LOC119660709")
mart = useMart("metazoa_mart", dataset = "higca905115235v1_eg_gene", host="https://metazoa.ensembl.org")
ortho_mart = useMart("metazoa_mart", dataset = "dmelanogaster_eg_gene", host="https://metazoa.ensembl.org")
getLDS(attributes = c("ensembl_gene_id"),
       values = genes ,mart = mart,filters = "ensembl_gene_id",
       attributesL = c("ensembl_gene_id"),
       martL = ortho_mart)

error message:

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

Note: The conversion from human gene IDs to mouse gene IDs was worked properly under the same environment.

Thank you for your considaration.

Kan-E avatar Mar 21 '24 21:03 Kan-E

I get a similar issue with mouse also:

> library(biomaRt)
> human = useMart("ensembl", dataset = "hsapiens_gene_ensembl", host = "https://jan2024.archive.ensembl.org/")
> mouse = useMart("ensembl", dataset = "mmusculus_gene_ensembl", host = "https://jan2024.archive.ensembl.org/")
> genesV2 = getLDS(attributes = c("hgnc_symbol"),
+                  mart = human, 
+                  attributesL = c("mgi_symbol"), 
+                  martL = mouse, 
+                  uniqueRows = TRUE,
+                  filters = "hgnc_symbol")
Error: biomaRt has encountered an unexpected server error.
Consider trying one of the Ensembl mirrors (for more details look at ?useEnsembl)

@Kan-E

The conversion from human gene IDs to mouse gene IDs was worked properly under the same environment.

Would you be able to share code that you got to work for conversion?

wudustan avatar Mar 23 '24 11:03 wudustan

Hi! Getting the same issue here as well. At first I thought it was relating to issue https://github.com/grimbough/biomaRt/issues/104 with Ensembl release 112, but setting a version and the host has not helped. The getBM() function also works fine.

> library(biomaRt)
> human <- useEnsembl(biomart = "genes", 
+                     dataset = "hsapiens_gene_ensembl",
+                     version = 110,
+                     host = "https://jul2023.archive.ensembl.org")
> rat <- useEnsembl(biomart = "genes", 
+                   dataset = "rnorvegicus_gene_ensembl",
+                   version = 110,
+                   host = "https://jul2023.archive.ensembl.org")
> getBM(
+   attributes = c("ensembl_gene_id", "hgnc_symbol"),
+   filter = "hgnc_symbol",
+   values = c("CSF1R", "EGFR"),
+   mart = human
+ )
  ensembl_gene_id hgnc_symbol
1 ENSG00000182578       CSF1R
2 ENSG00000146648        EGFR
> # create annotation lookup table
> annot_table <- getLDS(
+   mart = rat,
+   attributes = c('ensembl_gene_id','external_gene_name','chromosome_name'),
+   martL = human,
+   attributesL = c('ensembl_gene_id','external_gene_name','chromosome_name','gene_biotype'))
Error: biomaRt has encountered an unexpected server error.
Consider trying one of the Ensembl mirrors (for more details look at ?useEnsembl)

RaphaelCastellan avatar May 15 '24 10:05 RaphaelCastellan