Error message: "Request to BioMart web service failed."
Entering edit mode
ktd2918 • 0
Last seen 5.1 years ago

When running the "listMarts()" command in R I have received the following error message:

"Request to BioMart web service failed. The BioMart web service you're accessing may be down. Check the following URL and see if this website is available: Error in if (!grepl(x = registry, pattern = "^\n*<martregistry>")) { : argument is of length zero"

I have tried the proxy suggestions online and the website is working when accessed through my browser. Are there any reasons why it may not run in R?

The session info output is:

sessionInfo() R version 3.5.3 Patched (2019-03-11 r76519) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS Mojave 10.14.2

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale: [1] enGB.UTF-8/enGB.UTF-8/enGB.UTF-8/C/enGB.UTF-8/en_GB.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] biomaRt2.38.0 proxysnps0.0.1 MendelianRandomization0.4.1 MRInstruments0.3.2
[5] TwoSampleMR0.4.22 usethis1.5.0 devtools_2.0.2

loaded via a namespace (and not attached): [1] Biobase2.42.0 httr1.4.0 pkgload1.0.2 tidyr0.8.3 bit640.9-7
[6] jsonlite
1.6 viridisLite0.3.0 assertthat0.2.1 BiocManager1.30.4 stats43.5.3
[11] arrangements1.1.5 blob1.1.1 progress1.2.2 robustbase0.93-5 remotes2.0.4
[16] sessioninfo
1.1.1 pillar1.4.1 RSQLite2.1.1 backports1.1.4 lattice0.20-38
[21] glue1.3.1 digest0.6.19 iterpc0.4.1 colorspace1.4-1 htmltools0.3.6
[26] Matrix
1.2-17 plyr1.8.4 XML3.98-1.20 pkgconfig2.0.2 purrr0.3.2
[31] scales1.0.0 processx3.3.1 tibble2.1.3 gmp0.5-13.5 IRanges2.16.0
[36] ggplot2
3.1.1 withr2.1.2 BiocGenerics0.28.0 lazyeval0.2.2 cli1.1.0
[41] magrittr1.5 crayon1.3.4 memoise1.1.0 evaluate0.14 ps1.3.0
[46] fs
1.3.1 pkgbuild1.0.3 tools3.5.3 data.table1.12.2 prettyunits1.0.2
[51] hms0.4.2 stringr1.4.0 S4Vectors0.20.1 plotly4.9.0 munsell0.5.0
[56] AnnotationDbi
1.44.0 callr3.2.0 compiler3.5.3 rlang0.3.4 grid3.5.3
[61] RCurl1.95-4.12 rstudioapi0.10 rjson0.2.20 htmlwidgets1.3 bitops1.0-6
[66] labeling
0.3 rmarkdown1.13 gtable0.3.0 DBI1.0.0 curl3.3
[71] R62.4.0 knitr1.23 dplyr0.8.1 bit1.1-14 rprojroot1.3-2
[76] desc
1.2.0 stringi1.4.3 parallel3.5.3 Rcpp1.0.1 DEoptimR1.0-8
[81] tidyselect0.2.5 xfun0.7

BiocManager biomaRt listMarts() ensembl Biomart • 1.5k views
Entering edit mode

Do either of these commands work for you?


You should get back a character string that starts with "\n<MartRegistry>\n

Entering edit mode

The first doesn't work but the second command gives the following output:

[1] "\n<martregistry>\n <marturllocation database="\"ensembl_mart_96\"" default="\"1\"" displayname="\"Ensembl" genes="" 96\"="" host="\"\"" includedatasets="\"\"" martuser="\"\"" name="\"ENSEMBL_MART_ENSEMBL\"" path="\"/biomart/martservice\"" port="\"80\"" servervirtualschema="\"default\"" visible="\"1\""/>\n <marturllocation database="\"mouse_mart_96\"" default="\"\"" displayname="\"Mouse" strains="" 96\"="" host="\"\"" includedatasets="\"\"" martuser="\"\"" name="\"ENSEMBL_MART_MOUSE\"" path="\"/biomart/martservice\"" port="\"80\"" servervirtualschema="\"default\"" visible="\"1\""/>\n <marturllocation database="\"sequence_mart_96\"" default="\"\"" displayname="\"Sequence\"" host="\"\"" includedatasets="\"\"" martuser="\"\"" name="\"ENSEMBL_MART_SEQUENCE\"" path="\"/biomart/martservice\"" port="\"80\"" servervirtualschema="\"default\"" visible="\"\""/>\n <marturllocation database="\"ontology_mart_96\"" default="\"\"" displayname="\"Ontology\"" host="\"\"" includedatasets="\"\"" martuser="\"\"" name="\"ENSEMBL_MART_ONTOLOGY\"" path="\"/biomart/martservice\"" port="\"80\"" servervirtualschema="\"default\"" visible="\"\""/>\n <marturllocation database="\"genomic_features_mart_96\"" default="\"\"" displayname="\"Genomic" features="" 96\"="" host="\"\"" includedatasets="\"\"" martuser="\"\"" name="\"ENSEMBL_MART_GENOMIC\"" path="\"/biomart/martservice\"" port="\"80\"" servervirtualschema="\"default\"" visible="\"\""/>\n <marturllocation database="\"snp_mart_96\"" default="\"\"" displayname="\"Ensembl" variation="" 96\"="" host="\"\"" includedatasets="\"\"" martuser="\"\"" name="\"ENSEMBL_MART_SNP\"" path="\"/biomart/martservice\"" port="\"80\"" servervirtualschema="\"default\"" visible="\"1\""/>\n <marturllocation database="\"regulation_mart_96\"" default="\"\"" displayname="\"Ensembl" regulation="" 96\"="" host="\"\"" includedatasets="\"\"" martuser="\"\"" name="\"ENSEMBL_MART_FUNCGEN\"" path="\"/biomart/martservice\"" port="\"80\"" servervirtualschema="\"default\"" visible="\"1\""/>\n</martregistry>\n"

After running it the listMarts() command still yields the original error message though.

Entering edit mode
Mike Smith ★ 6.5k
Last seen 7 hours ago
EMBL Heidelberg

It looks like that regular HTP traffic on port 80 isn't working for you for some reason. Since the second command works you can try those parameter when you setup the mart, something like:

mart <- useMart(host = "", 
                biomart = "ensembl", 
                dataset = "hsapiens_gene_ensembl",
                port = 443)

You might need to change the dataset if you aren't querying human genes, that's just a guess since you didn't provide the details.

Entering edit mode

Thank you for the suggestion. I unfortunately still get the same error message when trying that:

"Request to BioMart web service failed. The BioMart web service you're accessing may be down. Check the following URL and see if this website is available: Error in if (!grepl(x = registry, pattern = "^\n<martregistry>")) { : argument is of length zero"*

Do you think it could be something to do with my R package?


Login before adding your answer.

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