grimbough / biomaRt

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

Error choosing mirror #99

Open Merguerrero opened 3 months ago

Merguerrero commented 3 months ago

First, I would like to thank for this super package that saved my life several times...

But, lately I have been having trouble connecting to any mirror... I got this error while knitting the .Rmd file:

processing file: X.Rmd |........... | 21% [unnamed-chunk-1] Quitting from lines 49-80 [unnamed-chunk-1] (X.Rmd) Error in .chooseEnsemblMirror(): ! Unable to query any Ensembl site Backtrace:

  1. biomaRt::useEnsembl(biomart = "genes", dataset = "hsapiens_gene_ensembl")
  2. biomaRt:::.chooseEnsemblMirror(mirror = mirror, httr_config = httr_config)

The code used is:

// Code used to annotate DESeq2 results:

ensembl <- useEnsembl(biomart = "genes", dataset = "hsapiens_gene_ensembl")

my_annotations = function(res){
  library(biomaRt)
  x = getBM(attributes =c('hgnc_symbol',
                     'gene_biotype',
                     'description'),
        filters =  c('hgnc_symbol'),
        values =  rownames(res),
        mart =  ensembl,
        uniqueRows =  TRUE )
  res$hgnc_symbol = rownames(res)
  y = left_join(as.data.frame(res),x, by=c('hgnc_symbol'))
  return(y)
}

ann = my_annotations(res)

I don't know how to solve this... Or if there is a better alternative to do this.

HELP 🥲🙏🏻

> sessionInfo()
R version 4.3.1 (2023-06-16)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /mnt/beegfs/mguerrero/miniconda3/envs/r.4.3/lib/libopenblasp-r0.3.21.so;  LAPACK version 3.9.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: Europe/Madrid
tzcode source: system (glibc)

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

other attached packages:
 [1] biomaRt_2.58.2              GSVA_1.50.1                
 [3] EnhancedVolcano_1.20.0      clusterProfiler_4.10.1     
 [5] ggrepel_0.9.5               VennDiagram_1.7.3          
 [7] futile.logger_1.4.3         DESeq2_1.42.1              
 [9] SummarizedExperiment_1.32.0 Biobase_2.62.0             
[11] MatrixGenerics_1.14.0       matrixStats_1.2.0          
[13] GenomicRanges_1.54.1        GenomeInfoDb_1.38.8        
[15] IRanges_2.36.0              S4Vectors_0.40.2           
[17] BiocGenerics_0.48.1         dplyr_1.1.4                
[19] data.table_1.15.2           Seurat_5.0.3               
[21] SeuratObject_5.0.1          sp_2.1-3                   
[23] ggplot2_3.5.0               knitr_1.45                 

loaded via a namespace (and not attached):
  [1] fs_1.6.3                    spatstat.sparse_3.0-3      
  [3] bitops_1.0-7                enrichplot_1.22.0          
  [5] HDO.db_0.99.1               httr_1.4.7                 
  [7] RColorBrewer_1.1-3          tools_4.3.1                
  [9] sctransform_0.4.1           utf8_1.2.4                 
 [11] R6_2.5.1                    HDF5Array_1.30.1           
 [13] lazyeval_0.2.2              uwot_0.1.16                
 [15] rhdf5filters_1.14.1         withr_3.0.0                
 [17] prettyunits_1.2.0           gridExtra_2.3              
 [19] progressr_0.14.0            cli_3.6.2                  
 [21] formatR_1.14                spatstat.explore_3.2-6     
 [23] fastDummies_1.7.3           scatterpie_0.2.1           
 [25] sass_0.4.9                  spatstat.data_3.0-4        
 [27] ggridges_0.5.6              pbapply_1.7-2              
 [29] yulab.utils_0.1.4           gson_0.1.0                 
 [31] DOSE_3.28.2                 parallelly_1.37.1          
 [33] RSQLite_2.3.5               generics_0.1.3             
 [35] gridGraphics_0.5-1          ica_1.0-3                  
 [37] spatstat.random_3.2-3       GO.db_3.18.0               
 [39] Matrix_1.6-5                fansi_1.0.6                
 [41] abind_1.4-5                 lifecycle_1.0.4            
 [43] yaml_2.3.8                  BiocFileCache_2.10.1       
 [45] rhdf5_2.46.1                qvalue_2.34.0              
 [47] SparseArray_1.2.4           Rtsne_0.17                 
 [49] blob_1.2.4                  promises_1.2.1             
 [51] crayon_1.5.2                miniUI_0.1.1.1             
 [53] lattice_0.22-6              beachmat_2.18.1            
 [55] cowplot_1.1.3               annotate_1.80.0            
 [57] KEGGREST_1.42.0             pillar_1.9.0               
 [59] fgsea_1.28.0                future.apply_1.11.1        
 [61] codetools_0.2-19            fastmatch_1.1-4            
 [63] leiden_0.4.3.1              glue_1.7.0                 
 [65] ggfun_0.1.4                 vctrs_0.6.5                
 [67] png_0.1-8                   treeio_1.26.0              
 [69] spam_2.10-0                 gtable_0.3.4               
 [71] cachem_1.0.8                xfun_0.42                  
 [73] S4Arrays_1.2.1              mime_0.12                  
 [75] tidygraph_1.3.1             survival_3.5-8             
 [77] SingleCellExperiment_1.24.0 ellipsis_0.3.2             
 [79] fitdistrplus_1.1-11         ROCR_1.0-11                
 [81] nlme_3.1-164                ggtree_3.10.1              
 [83] bit64_4.0.5                 filelock_1.0.3             
 [85] progress_1.2.3              RcppAnnoy_0.0.22           
 [87] bslib_0.6.1                 irlba_2.3.5.1              
 [89] KernSmooth_2.23-22          colorspace_2.1-0           
 [91] DBI_1.2.2                   tidyselect_1.2.1           
 [93] curl_5.2.1                  bit_4.0.5                  
 [95] compiler_4.3.1              graph_1.80.0               
 [97] xml2_1.3.6                  DelayedArray_0.28.0        
 [99] plotly_4.10.4               shadowtext_0.1.3           
[101] scales_1.3.0                lmtest_0.9-40              
[103] rappdirs_0.3.3              stringr_1.5.1              
[105] digest_0.6.35               goftest_1.2-3              
[107] spatstat.utils_3.0-4        rmarkdown_2.26             
[109] XVector_0.42.0              htmltools_0.5.7            
[111] pkgconfig_2.0.3             sparseMatrixStats_1.14.0   
[113] dbplyr_2.5.0                fastmap_1.1.1              
[115] rlang_1.1.3                 htmlwidgets_1.6.4          
[117] DelayedMatrixStats_1.24.0   shiny_1.8.0                
[119] farver_2.1.1                jquerylib_0.1.4            
[121] zoo_1.8-12                  jsonlite_1.8.8             
[123] BiocParallel_1.36.0         GOSemSim_2.28.1            
[125] BiocSingular_1.18.0         RCurl_1.98-1.14            
[127] magrittr_2.0.3              GenomeInfoDbData_1.2.11    
[129] ggplotify_0.1.2             dotCall64_1.1-1            
[131] patchwork_1.2.0             Rhdf5lib_1.24.2            
[133] munsell_0.5.0               Rcpp_1.0.12                
[135] ape_5.7-1                   viridis_0.6.5              
[137] reticulate_1.35.0           stringi_1.8.3              
[139] ggraph_2.2.1                zlibbioc_1.48.2            
[141] MASS_7.3-60.0.1             plyr_1.8.9                 
[143] parallel_4.3.1              listenv_0.9.1              
[145] deldir_2.0-4                Biostrings_2.70.3          
[147] graphlayouts_1.1.1          splines_4.3.1              
[149] tensor_1.5                  hms_1.1.3                  
[151] locfit_1.5-9.9              igraph_2.0.3               
[153] spatstat.geom_3.2-9         RcppHNSW_0.6.0             
[155] ScaledMatrix_1.10.0         reshape2_1.4.4             
[157] futile.options_1.0.1        XML_3.99-0.16.1            
[159] evaluate_0.23               lambda.r_1.2.4             
[161] tweenr_2.0.3                httpuv_1.6.14              
[163] RANN_2.6.1                  tidyr_1.3.1                
[165] purrr_1.0.2                 polyclip_1.10-6            
[167] future_1.33.1               scattermore_1.2            
[169] ggforce_0.4.2               rsvd_1.0.5                 
[171] xtable_1.8-4                RSpectra_0.16-1            
[173] tidytree_0.4.6              later_1.3.2                
[175] viridisLite_0.4.2           tibble_3.2.1               
[177] aplot_0.2.2                 memoise_2.0.1              
[179] AnnotationDbi_1.64.1        cluster_2.1.6              
[181] globals_0.16.3              GSEABase_1.64.0