grimbough / biomaRt

R package providing query functionality to BioMart instances like Ensembl
https://bioconductor.org/packages/biomaRt/
32 stars 13 forks source link

Error getLDS() #100

Open Kan-E opened 3 months ago

Kan-E commented 3 months ago

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.

wudustan commented 3 months ago

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?

RaphaelCastellan commented 1 month ago

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)