502 error biomaRt getLDS()
1
1
Entering edit mode
Pez ▴ 10
@724e8e11
Last seen 9 months ago
Australia

I have been trying to convert ensembl gene IDs between species, but I keep getting a 502 error that tells me to report it here.

library(biomaRt)
hsa_mart<- useEnsembl(biomart="genes",dataset="hsapiens_gene_ensembl", mirror="useast")
aca_mart<- useEnsembl("ensembl",dataset="acarolinensis_gene_ensembl", mirror="useast")

aca_hsa_mart<- getLDS(attributes=c("entrezgene_accession","entrezgene_id","uniprot_gn_id", "ensembl_gene_id"),
                      mart=hsa_mart,values="ENSG00000049130", filters="ensembl_gene_id",
                      attributesL=c("entrezgene_accession","entrezgene_id","uniprot_gn_id", "ensembl_gene_id"),
                      martL=aca_mart,
                      verbose=TRUE)

I get the error at the getLDS() step.

"<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE Query><Query virtualSchemaName = 'default' uniqueRows = '1' count = '0' datasetConfigVersion = '0.6' header='1' formatter = 'TSV' requestid= 'biomaRt'> <Dataset name = 'hsapiens_gene_ensembl'><Attribute name = 'entrezgene_accession'/><Attribute name = 'entrezgene_id'/><Attribute name = 'uniprot_gn_id'/><Attribute name = 'ensembl_gene_id'/><Filter name = "ensembl_gene_id" value = "ENSG00000049130" /></Dataset><Dataset name = 'acarolinensis_gene_ensembl' ><Attribute name = 'entrezgene_accession'/><Attribute name = 'entrezgene_id'/><Attribute name = 'uniprot_gn_id'/><Attribute name = 'ensembl_gene_id'/></Dataset></Query> Error: biomaRt has encountered an unknown server error. HTTP error code: 502 Please report this on the Bioconductor support site at https://support.bioconductor.org/ Consider trying one of the Ensembl mirrors (for more details look at ?useEnsembl)"

I also tried using the "www" mirror and I get the same answer. I also tried on a different internet connection with the same error. Also I can use the command getBM() without issue.

Any ideas?


sessionInfo( )


"R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default


locale:
[1] LC_COLLATE=English_Australia.utf8 
[2] LC_CTYPE=English_Australia.utf8   
[3] LC_MONETARY=English_Australia.utf8
[4] LC_NUMERIC=C                      
[5] LC_TIME=English_Australia.utf8    

time zone: America/New_York
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods  
[7] base     

other attached packages:
[1] biomaRt_2.58.2

loaded via a namespace (and not attached):
 [1] rappdirs_0.3.3          utf8_1.2.4             
 [3] generics_0.1.3          xml2_1.3.6             
 [5] bitops_1.0-7            RSQLite_2.3.5          
 [7] stringi_1.8.3           hms_1.1.3              
 [9] digest_0.6.34           magrittr_2.0.3         
[11] evaluate_0.23           pkgload_1.3.4          
[13] fastmap_1.1.1           blob_1.2.4             
[15] progress_1.2.3          AnnotationDbi_1.64.1   
[17] GenomeInfoDb_1.38.5     DBI_1.2.1              
[19] httr_1.4.7              purrr_1.0.2            
[21] fansi_1.0.6             XML_3.99-0.16.1        
[23] Biostrings_2.70.2       cli_3.6.2              
[25] rlang_1.1.3             crayon_1.5.2           
[27] dbplyr_2.4.0            XVector_0.42.0         
[29] Biobase_2.62.0          bit64_4.0.5            
[31] withr_3.0.0             cachem_1.0.8           
[33] yaml_2.3.8              tools_4.3.2            
[35] memoise_2.0.1           dplyr_1.1.4            
[37] filelock_1.0.3          GenomeInfoDbData_1.2.11
[39] BiocGenerics_0.48.1     curl_5.2.0             
[41] vctrs_0.6.5             R6_2.5.1               
[43] png_0.1-8               stats4_4.3.2           
[45] lifecycle_1.0.4         BiocFileCache_2.10.1   
[47] zlibbioc_1.48.0         KEGGREST_1.42.0        
[49] stringr_1.5.1           S4Vectors_0.40.2       
[51] IRanges_2.36.0          bit_4.0.5              
[53] pkgconfig_2.0.3         pillar_1.9.0           
[55] glue_1.7.0              tidyselect_1.2.0       
[57] xfun_0.41               tibble_3.2.1           
[59] rstudioapi_0.15.0       knitr_1.45             
[61] htmltools_0.5.7         rmarkdown_2.25         
[63] compiler_4.3.2          prettyunits_1.2.0      
[65] RCurl_1.98-1.14
ensembldb biomaRt • 861 views
ADD COMMENT
0
Entering edit mode

I have a similar problem.

I run the following:

ensembl <- useEnsembl("genes")
ensembl_Mmus <- useDataset("mmusculus_gene_ensembl",mart = ensembl)
ensembl_Pmur <- useDataset("pmuralis_gene_ensembl",mart = ensembl)
annot_table <- getLDS(mart = ensembl_Pmur, 
                      attributes = c('external_gene_name'),
                      martL = ensembl_Mmus, 
                      attributesL = c('external_gene_name'))

And get the following error:

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

I tried all the mirrors using eg mirror = "www", none work. When I use "useast" I get the same error code as the author above (502). When I use "asia" I instead get error code 404.

I also tried using the four first archives (without setting mirrors) using e.g. host = "https://oct2022.archive.ensembl.org".

head(listEnsemblArchives())
            name     date                                 url version current_release
1 Ensembl GRCh37 Feb 2014          https://grch37.ensembl.org  GRCh37                
2    Ensembl 111 Jan 2024 https://jan2024.archive.ensembl.org     111               *
3    Ensembl 110 Jul 2023 https://jul2023.archive.ensembl.org     110                
4    Ensembl 109 Feb 2023 https://feb2023.archive.ensembl.org     109                
5    Ensembl 108 Oct 2022 https://oct2022.archive.ensembl.org     108                
6    Ensembl 107 Jul 2022 https://jul2022.archive.ensembl.org     107                

That did not work either.

Would be grateful for any advice!

Best, Robin

> sessionInfo()
R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22631)

Matrix products: default


locale:
[1] LC_COLLATE=English_Sweden.utf8  LC_CTYPE=English_Sweden.utf8    LC_MONETARY=English_Sweden.utf8
[4] LC_NUMERIC=C                    LC_TIME=English_Sweden.utf8    

time zone: Europe/Stockholm
tzcode source: internal

attached base packages:
[1] stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] biomaRt_2.58.2              scmap_1.24.0                SingleCellExperiment_1.24.0
 [4] SummarizedExperiment_1.32.0 Biobase_2.62.0              GenomicRanges_1.54.1       
 [7] GenomeInfoDb_1.38.5         IRanges_2.36.0              S4Vectors_0.40.2           
[10] BiocGenerics_0.48.1         MatrixGenerics_1.14.0       matrixStats_1.0.0          
[13] lubridate_1.9.3             forcats_1.0.0               stringr_1.5.1              
[16] dplyr_1.1.3                 purrr_1.0.2                 readr_2.1.5                
[19] tidyr_1.3.0                 tibble_3.2.1                ggplot2_3.4.4              
[22] tidyverse_2.0.0            

loaded via a namespace (and not attached):
  [1] RcppAnnoy_0.0.21        splines_4.3.2           later_1.3.1            
  [4] filelock_1.0.3          bitops_1.0-7            polyclip_1.10-4        
  [7] XML_3.99-0.16.1         fastDummies_1.7.3       lifecycle_1.0.4        
 [10] globals_0.16.2          lattice_0.22-5          MASS_7.3-60            
 [13] magrittr_2.0.3          plotly_4.10.4           rmarkdown_2.25         
 [16] yaml_2.3.7              httpuv_1.6.11           Seurat_5.0.1           
 [19] sctransform_0.4.1       spam_2.10-0             sp_2.0-0               
 [22] spatstat.sparse_3.0-2   reticulate_1.32.0       cowplot_1.1.3          
 [25] pbapply_1.7-2           DBI_1.2.1               RColorBrewer_1.1-3     
 [28] pkgload_1.3.4           abind_1.4-5             zlibbioc_1.48.0        
 [31] Rtsne_0.16              RCurl_1.98-1.14         rappdirs_0.3.3         
 [34] GenomeInfoDbData_1.2.11 ggrepel_0.9.3           irlba_2.3.5.1          
 [37] listenv_0.9.1           spatstat.utils_3.0-3    goftest_1.2-3          
 [40] RSpectra_0.16-1         spatstat.random_3.1-6   fitdistrplus_1.1-11    
 [43] parallelly_1.36.0       leiden_0.4.3.1          codetools_0.2-19       
 [46] DelayedArray_0.28.0     xml2_1.3.6              tidyselect_1.2.0       
 [49] farver_2.1.1            BiocFileCache_2.10.1    spatstat.explore_3.2-3 
 [52] jsonlite_1.8.4          e1071_1.7-14            ellipsis_0.3.2         
 [55] progressr_0.14.0        ggridges_0.5.6          survival_3.5-7         
 [58] progress_1.2.3          tools_4.3.2             ica_1.0-3              
 [61] Rcpp_1.0.11             glue_1.6.2              gridExtra_2.3          
 [64] SparseArray_1.2.3       xfun_0.39               withr_3.0.0            
 [67] fastmap_1.1.1           fansi_1.0.4             digest_0.6.31          
 [70] timechange_0.3.0        R6_2.5.1                mime_0.12              
 [73] colorspace_2.1-0        scattermore_1.2         tensor_1.5             
 [76] spatstat.data_3.0-4     RSQLite_2.3.5           utf8_1.2.3             
 [79] generics_0.1.3          data.table_1.14.8       class_7.3-22           
 [82] prettyunits_1.2.0       httr_1.4.7              htmlwidgets_1.6.4      
 [85] S4Arrays_1.2.0          uwot_0.1.16             pkgconfig_2.0.3        
 [88] gtable_0.3.4            blob_1.2.4              lmtest_0.9-40          
 [91] XVector_0.42.0          htmltools_0.5.7         dotCall64_1.1-1        
 [94] SeuratObject_5.0.1      scales_1.3.0            png_0.1-8              
 [97] knitr_1.45              rstudioapi_0.15.0       tzdb_0.4.0             
[100] reshape2_1.4.4          curl_5.2.0              nlme_3.1-164           
[103] cachem_1.0.8            proxy_0.4-27            zoo_1.8-12             
[106] KernSmooth_2.23-22      parallel_4.3.2          miniUI_0.1.1.1         
[109] AnnotationDbi_1.64.1    pillar_1.9.0            grid_4.3.2             
[112] vctrs_0.6.3             RANN_2.6.1              promises_1.2.1         
[115] randomForest_4.7-1.1    dbplyr_2.4.0            xtable_1.8-4           
[118] cluster_2.1.6           evaluate_0.23           cli_3.6.1              
[121] compiler_4.3.2          rlang_1.1.1             crayon_1.5.2           
[124] future.apply_1.11.1     labeling_0.4.3          plyr_1.8.8             
[127] stringi_1.7.12          viridisLite_0.4.2       googleVis_0.7.1        
[130] deldir_1.0-9            Biostrings_2.70.2       munsell_0.5.0          
[133] lazyeval_0.2.2          spatstat.geom_3.2-5     Matrix_1.6-4           
[136] RcppHNSW_0.5.0          hms_1.1.3               patchwork_1.2.0        
[139] bit64_4.0.5             future_1.33.1           KEGGREST_1.42.0        
[142] shiny_1.8.0             ROCR_1.0-11             igraph_1.5.1           
[145] memoise_2.0.1           bit_4.0.5
ADD REPLY
0
Entering edit mode

Hi, still experiencing the same issue here:

musGenes <- c("Hmmr", "Tlx3", "Cpeb4")
human_mart <- useEnsembl("ensembl","hsapiens_gene_ensembl",mirror="useast")
mouse_mart <- useEnsembl("ensembl","mmusculus_gene_ensembl",mirror="useast")
getLDS(attributes = c("mgi_symbol"), filters = "mgi_symbol", 
       values = musGenes , 
       mart = mouse_mart, attributesL = c("hgnc_symbol"), martL = human_mart)

returns

Error in `httr2::req_perform()`:
! HTTP 502 Bad Gateway.

but both the following calls


biomaRt::getBM(attributes = c("mgi_symbol","ensembl_gene_id"), filters = "mgi_symbol", values = musGenes , mart = mouse_mart)
biomaRt::getBM(attributes = c("hsapiens_homolog_associated_gene_name"), filters = "mgi_symbol", values = musGenes , mart = mouse_mart)

return the dataframe of names with no issue.

how can i use the getLDS function in the correct way to get the mouse ids together with the human ids ?

thanks!

ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 hour ago
United States

See here:

biomaRt has encountered an unknown server error while using getLDS

Login before adding your answer.

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