getLDS error in scan
Entering edit mode
mvis1231 • 0
Last seen 6 months ago


I have been trying to convert mouse gene symbols to human gene symbols using biomaRt. To do so, I am running this demo code first:

human = useMart("ensembl", dataset = "hsapiens_gene_ensembl", host = "")
mouse = useMart("ensembl", dataset = "mmusculus_gene_ensembl", host = "")
genes = c("Zfp286", "Tmx2")
genes = getLDS(attributes = c("mgi_symbol"), filters = "mgi_symbol", values = genes ,mart = mouse, attributesL = c("hgnc_symbol","chromosome_name", "start_position"), martL = human, uniqueRows=T)

Unfortunately, I keep getting this error when I run getLDS:

Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, : line 1 did not have 3 elements

Also for your information, when I tried to approach with version and to see what version was available by running listEnsemblArchives(), I also see this error:

Error: failed to load external entity ""

Could you please advise me how to fix error? It will be much appreciated. (I posted the same question in GitHub ( as well yesterday. I will remove one, once I get a support! Thank you for your understandings in advance)

The session info is:

R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

Random number generation:
 RNG:     Mersenne-Twister 
 Normal:  Inversion 
 Sample:  Rounding 

[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
 [1] biomaRt_2.42.1              cowplot_1.1.0               SingleCellExperiment_1.8.0 
 [4] SingleR_1.0.6               SummarizedExperiment_1.16.1 DelayedArray_0.12.3        
 [7] BiocParallel_1.20.1         matrixStats_0.56.0          Biobase_2.46.0             
[10] GenomicRanges_1.38.0        GenomeInfoDb_1.22.1         IRanges_2.20.2             
[13] S4Vectors_0.24.4            BiocGenerics_0.32.0         ggplot2_3.3.2              
[16] patchwork_1.0.1             dplyr_1.0.0                 Seurat_3.2.1               
[19] bdsmatrix_1.3-4            

loaded via a namespace (and not attached):

  [1] AnnotationHub_2.18.0          BiocFileCache_1.10.2          plyr_1.8.6                   
  [4] igraph_1.2.5                  lazyeval_0.2.2                splines_3.6.3                
  [7] listenv_0.8.0                 digest_0.6.25                 htmltools_0.5.0              
 [10] magrittr_1.5                  memoise_1.1.0                 tensor_1.5                   
 [13] cluster_2.1.0                 ROCR_1.0-11                   globals_0.13.1               
 [16] askpass_1.1                   prettyunits_1.1.1             colorspace_1.4-1             
 [19] blob_1.2.1                    rappdirs_0.3.1                ggrepel_0.8.2                
 [22] xfun_0.17                     crayon_1.3.4                  RCurl_1.98-1.2               
 [25] jsonlite_1.7.1                spatstat_1.64-1               spatstat.data_1.4-3          
 [28] survival_3.1-8                zoo_1.8-8                     glue_1.4.0                   
 [31] polyclip_1.10-0               gtable_0.3.0                  zlibbioc_1.32.0              
 [34] XVector_0.26.0                leiden_0.3.3                  future.apply_1.6.0           
 [37] abind_1.4-5                   scales_1.1.1                  DBI_1.1.0                    
 [40] miniUI_0.1.1.1                Rcpp_1.0.4.6                  viridisLite_0.3.0            
 [43] xtable_1.8-4                  progress_1.2.2                reticulate_1.16              
 [46] bit_4.0.4                     rsvd_1.0.3                    htmlwidgets_1.5.2            
 [49] httr_1.4.2                    RColorBrewer_1.1-2            ellipsis_0.3.0               
 [52] ica_1.0-2                     pkgconfig_2.0.3               XML_3.99-0.3                 
 [55] uwot_0.1.8                    dbplyr_1.4.4                  deldir_0.1-28                
 [58] tidyselect_1.1.0              rlang_0.4.6                   reshape2_1.4.4               
 [61] later_1.1.0.1                 AnnotationDbi_1.48.0          munsell_0.5.0                
 [64] BiocVersion_3.10.1            tools_3.6.3                   generics_0.0.2               
 [67] RSQLite_2.2.0                 ExperimentHub_1.12.0          ggridges_0.5.2               
 [70] stringr_1.4.0                 fastmap_1.0.1                 yaml_2.2.1                   
 [73] goftest_1.2-2                 knitr_1.30                    bit64_4.0.5                  
 [76] fitdistrplus_1.1-1            purrr_0.3.4                   RANN_2.6.1                   
 [79] pbapply_1.4-3                 future_1.19.1                 nlme_3.1-144                 
 [82] mime_0.9                      compiler_3.6.3                rstudioapi_0.11              
 [85] plotly_4.9.2.1                curl_4.3                      png_0.1-7                    
 [88] interactiveDisplayBase_1.24.0 spatstat.utils_1.17-0         tibble_3.0.1                 
 [91] stringi_1.4.6                 lattice_0.20-38               Matrix_1.2-18                
 [94] vctrs_0.3.1                   pillar_1.4.6                  lifecycle_0.2.0              
 [97] BiocManager_1.30.10           lmtest_0.9-38                 RcppAnnoy_0.0.16             
[100] BiocNeighbors_1.4.2           data.table_1.12.8             bitops_1.0-6                 
[103] irlba_2.3.3                   httpuv_1.5.4                  R6_2.4.1                     
[106] promises_1.1.1                KernSmooth_2.23-16            gridExtra_2.3                
[109] codetools_0.2-16              MASS_7.3-51.5                 assertthat_0.2.1             
[112] openssl_1.4.2                 withr_2.3.0                   sctransform_0.2.1            
[115] GenomeInfoDbData_1.2.2        mgcv_1.8-31                   hms_0.5.3                    
[118] grid_3.6.3                    rpart_4.1-15                  tidyr_1.1.2                  
[121] DelayedMatrixStats_1.8.0      Rtsne_0.15                    shiny_1.5.0
biomaRt getLDS convert gene symbols • 306 views
Entering edit mode

I'm actually getting the same error. Possible issue with the database?

Entering edit mode
Mike Smith ★ 4.9k
Last seen 1 day ago
EMBL Heidelberg / de.NBI

First, you're going to need to update to the latest version of biomaRt, and since you're using an old version of R we'll need to get that from GitHub with


Then create the two mart objects with useEnsembl()

human = useEnsembl("ensembl", dataset = "hsapiens_gene_ensembl")
mouse = useEnsembl("ensembl", dataset = "mmusculus_gene_ensembl")

I only have access to a phone right now, so can't run that code, but does that solve it?

Entering edit mode

Hi Mike, Thank you so so much for your prompt support! Now it works very well. Thank you once again for your help.

Entering edit mode

Just one more simple question, Mike. Does the useEnsembl() give us GRCh38 as default for both mouse and human?

Entering edit mode
ensembl <- useEnsembl(biomart = "ensembl")
searchDatasets(mart = ensembl, pattern = "sapiens|musculus")

Returns the current genomic build for human and mouse

Entering edit mode

Yes, useEnsembl() will use the most recent Ensembl version by default, so for humans that's currently GRCh38. @bioresearchg's code shows you how to list the builds that a specific mart object will access for various species.


Login before adding your answer.

Traffic: 421 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6