Biomart error when updating to R 4.0.2
1
4
Entering edit mode
landenshanie ▴ 40
@landenshanie-23570
Last seen 6 months ago
Australia

I was using the Biomart package just before I updated my R and it was working fine, now after the update I get this message, so I changed my code to what I found here https://support.bioconductor.org/p/50102/ and then got a different error:

Here is my original code that worked on old version of R:

> mart <- useMart(biomart = "ensembl", dataset = "hsapiens_gene_ensembl") 
> results <- getBM(attributes => c("chromosome_name","external_gene_name","ensembl_gene_id"),
>                  filters = "ensembl_gene_id", values = signif_sb_genes_muscle$ensembl_gene_id,
>                  mart = mart)

This is the error I receive with this old code:

> Error: failed to load external entity "http://www.ensembl.org/info/website/archives/index.html?redirect=no"

Here is the new edited code:

> mart <- useMart("ENSEMBL_MART_ENSEMBL","hsapiens_gene_ensembl",
>                 host="www.ensembl.org") 
> mart@host="http://may2012.archive.ensembl.org:80/biomart/martservice"
> mart = useDataset("hsapiens_gene_ensembl",mart=mart)
> 
> results <- getBM(attributes =c("chromosome_name","external_gene_id","ensembl_gene_id"),
>                  filters = "ensembl_gene_id", values = signif_sb_genes_muscle$ensembl_gene_id,
>                  mart = mart)

But it is now giving this error:

> Error in .processResults(postRes, mart = mart, sep = sep, fullXmlQuery
> = fullXmlQuery,  :    The query to the BioMart webservice returned an invalid result. The number of columns in the result table does not
> equal the number of attributes in the query. Please report this on the
> support site at http://support.bioconductor.org

I am reporting the error as instructed, and I'd also like to retrieve the gene names as was initially working. Thank you:)


Here is my session info:

>sessionInfo() R version 4.0.2 (2020-06-22)
> Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.5
> LTS
> 
> Matrix products: default BLAS:  
> /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1 LAPACK:
> /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
> 
> locale:  [1] LC_CTYPE=en_AU.UTF-8       LC_NUMERIC=C              
> LC_TIME=en_AU.UTF-8         [4] LC_COLLATE=en_AU.UTF-8    
> LC_MONETARY=en_AU.UTF-8    LC_MESSAGES=en_AU.UTF-8     [7]
> LC_PAPER=en_AU.UTF-8       LC_NAME=C                  LC_ADDRESS=C    
> [10] LC_TELEPHONE=C             LC_MEASUREMENT=en_AU.UTF-8
> LC_IDENTIFICATION=C       
> 
> attached base packages: [1] stats     graphics  grDevices utils    
> datasets  methods   base     
> 
> other attached packages: [1] biomaRt_2.44.1
> 
> loaded via a namespace (and not attached):  [1] Rcpp_1.0.5          
> compiler_4.0.2       pillar_1.4.6         dbplyr_1.4.4          [5]
> viridis_0.5.1        prettyunits_1.1.1    tools_4.0.2         
> progress_1.2.2        [9] digest_0.6.25        bit_4.0.4           
> viridisLite_0.3.0    gtable_0.3.0         [13] RSQLite_2.2.1       
> memoise_1.1.0        BiocFileCache_1.12.1 tibble_3.0.3         [17]
> lifecycle_0.2.0      pkgconfig_2.0.3      rlang_0.4.8         
> DBI_1.1.0            [21] rstudioapi_0.11      curl_4.3            
> parallel_4.0.2       gridExtra_2.3        [25] stringr_1.4.0       
> httr_1.4.2           dplyr_1.0.2          rappdirs_0.3.1       [29]
> generics_0.0.2       S4Vectors_0.26.1     vctrs_0.3.4         
> askpass_1.1          [33] IRanges_2.22.2       hms_0.5.3           
> grid_4.0.2           tidyselect_1.1.0     [37] stats4_4.0.2        
> bit64_4.0.5          glue_1.4.2           Biobase_2.48.0       [41]
> R6_2.4.1             AnnotationDbi_1.50.3 XML_3.99-0.5        
> ggplot2_3.3.2        [45] purrr_0.3.4          blob_1.2.1          
> magrittr_1.5         scales_1.1.1         [49] ellipsis_0.3.1      
> BiocGenerics_0.34.0  assertthat_0.2.1     colorspace_1.4-1     [53]
> stringi_1.5.3        munsell_0.5.0        openssl_1.4.3       
> crayon_1.3.4

Biomart • 9.7k views
ADD COMMENT
0
Entering edit mode

I am getting the same errors on R 3.6.2

Using the GRCh38 build of the human genome:

ensembl_gene <-  useMart("ENSEMBL_MART_ENSEMBL", dataset = "hsapiens_gene_ensembl")

getBM returns:

Error: failed to load external entity "http://www.ensembl.org/info/website/archives/index.html?redirect=no"

while trying to pull the GRCh37 (i.e. hg19) build information (my standard pipeline):

ensembl_gene <- useMart("ENSEMBL_MART_ENSEMBL",  host="grch37.ensembl.org",  path="/biomart/martservice", dataset = "hsapiens_gene_ensembl")

I'm getting:

Error in .processResults(postRes, mart = mart, sep = sep, fullXmlQuery = fullXmlQuery,  : 
  The query to the BioMart webservice returned an invalid result: the number of columns in the result table does not equal the number of attributes in the query. 
Please report this on the support site at http://support.bioconductor.org

> sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.6

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.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] forcats_0.5.0   stringr_1.4.0   dplyr_1.0.1     purrr_0.3.4     readr_1.3.1     tidyr_1.1.1     tibble_3.0.3    ggplot2_3.3.2  
 [9] tidyverse_1.3.0 biomaRt_2.42.1
ADD REPLY
2
Entering edit mode

Regarding the

Error: failed to load external entity "http://www.ensembl.org/info/website/archives/index.html?redirect=no

This looks like Ensembl may have stopped the ability to access their site via http. Can you try installing the developmental version of biomaRt from GitHub? You can do that via:

BiocManager::install('grimbough/biomaRt')

I'll take a look at why you get a different error for the GRCh37 archive. Normally the 'mismatch columns' error indicates that Ensembl is returning something completely different like an error page, rather than a table of results.

ADD REPLY
1
Entering edit mode

I'm getting the same error on R 3.6.2. After installing the development version, I get

> ensembl = biomaRt::useMart("ensembl", dataset="hsapiens_gene_ensembl")
> pcg = biomaRt::getBM(attributes = c("hgnc_symbol","gene_biotype"), mart = ensembl) 
NULL
Error in .processResults(postRes, mart = mart, sep = sep, fullXmlQuery = fullXmlQuery,  : 
  The query to the BioMart webservice returned an invalid result.
The number of columns in the result table does not equal the number of attributes in the query.
Please report this on the support site at http://support.bioconductor.org
ADD REPLY
1
Entering edit mode

I would recommend creating the GRCh37 mart with:

ensembl_gene <- useEnsembl(biomart = "ensembl",    
                           dataset = "hsapiens_gene_ensembl",
                           GRCh = "37")

You can probably modify the host argument to use https if you want to keep the existing code (see my answer below for more details), but this should deal with a few of the issues for you.

ADD REPLY
0
Entering edit mode

Thanks for your help Mike!

Unfortunately it seems the useMart function isn't recognizing the GRCh="37" argument. When I set the mart with the code as you suggest, I get:

Error in useMart(biomart = "ensembl", dataset = "hsapiens_gene_ensembl",  : 
  unused argument (GRCh = "37")

However, specifying the https host seems to do the trick:

ensembl_gene <-
  useMart("ENSEMBL_MART_ENSEMBL", 
          host="https://grch37.ensembl.org",
          path="/biomart/martservice", 
          dataset = "hsapiens_gene_ensembl")

update: now on R 4.0.2 and biomaRt 2.45.2:

R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Mojave 10.14.6

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

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] forcats_0.5.0   stringr_1.4.0   dplyr_1.0.2     purrr_0.3.4     readr_1.4.0     tidyr_1.1.2     tibble_3.0.3    ggplot2_3.3.2  
 [9] tidyverse_1.3.0 biomaRt_2.45.5
ADD REPLY
1
Entering edit mode

The function is useEnsembl() rather than useMart().

Internally they are very similar, and as you've seen useMart() will do the job, but useMart() has to be very generic as it was developed when there were many different BioMart servers, with lots of different configurations.

On the other hand useEnsembl() has some arguments and defaults that are specific to accessing Ensembl that might make your code a little neater - but if it's working then no need to change things.

ADD REPLY
1
Entering edit mode

Awesome! Thanks again Mike!! (-1 for my attention to detail...)

ADD REPLY
0
Entering edit mode

Hello, I am able to use useEnsembl to get the data.

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

When using getBM, I was getting an error

foo <- getBM(mart = mart, + filters = c("ensemblgeneid"), + attributes = c("ensemblgeneid", "externalgenename") + ) Error in martCheck(mart) : object 'mart' not found foo <- getBM(mart = ensembl, + filters = c("ensemblgeneid"), + attributes = c("ensemblgeneid", "externalgenename") + ) Error in getBM(mart = ensembl, filters = c("ensemblgeneid"), attributes = c("ensemblgeneid", : Argument 'values' must be specified.

I am so confused and am grateful for any help.

ADD REPLY
7
Entering edit mode
Mike Smith ★ 6.6k
@mike-smith
Last seen 1 day ago
EMBL Heidelberg

I think there are several issues here, but they are all related to some change in behaviour at the Ensembl website, when you use the http protocol.

Error 1

Error: failed to load external entity "http://www.ensembl.org/info/website/archives/index.html?redirect=no"`.

This first error is directly related, and easily fixed.

Error 2

The query to the BioMart webservice returned an invalid result: the number of columns in the result table does not equal the number of attributes in the query.

This second error is because useMart() doesn't specify a protocol in its default arguments, and will then use http. The query then gets redirected, and the error is because a rather than getting back a nice table of results, we get the Ensembl webpage and biomaRt doesn't know what to do with it. This doesn't happen if you create the mart with useEnsembl(), which does specify https and is the recommended way to connect to Enembl.

Solution

I've tried to address these issues in the package, so existing code should go back to working correctly. Try installing the developmental version of biomaRt via:

BiocManager::install('grimbough/biomaRt')

You will need biomaRt version >= 2.45.5 - check with:

> packageVersion('biomaRt')
[1] ‘2.45.5’

The changes have also been made in the release version on Bioconductor (v. 2.44.2), and will be available via the normal package installation in a few days.

If you are running R 3.6 & Bioconductor 3.10, then you will have to use the version from Github, as I am unable to modify the code in past releases of Bioconductor. I would recommend updating both R & Bioconductor to the most recent versions, but if that is not possible there should be no issue running this newer version of biomaRt.

Please let me know if you continue to run into issues after updating.

ADD COMMENT
0
Entering edit mode

Perfect! Had to restart my R to get it to work after the update. Thanks so much Mike and for the quick fix/reply!

ADD REPLY
0
Entering edit mode

Hi I ran the above code and I am currently using biomaRt v2.45.5 in R 4.0.2 . But I ran into the following error when running useMart()

Ensembl site unresponsive, trying useast mirror
Error in curl::curl_fetch_memory(url, handle = handle) :
  failed setting cipher list: DEFAULT@SECLEVEL=1
Calls: useMart ... request_fetch -> request_fetch.write_memory -> <Anonymous>
Execution halted

Please let me know how I can fix this . Thanks !

ADD REPLY
0
Entering edit mode

Can you provide the output of sessionInfo() and also let me know what Operating system you're using.

ADD REPLY
0
Entering edit mode
R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.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

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

other attached packages:
 [1] dplyr_1.0.2                 fgsea_1.14.0
 [3] Glimma_1.16.0               biomaRt_2.45.5
 [5] regionReport_1.22.0         DESeq2_1.28.1
 [7] SummarizedExperiment_1.18.2 DelayedArray_0.14.1
 [9] matrixStats_0.57.0          Biobase_2.48.0
[11] GenomicRanges_1.40.0        GenomeInfoDb_1.24.2
[13] IRanges_2.22.2              S4Vectors_0.26.1
[15] BiocGenerics_0.34.0         tximport_1.16.1

loaded via a namespace (and not attached):
  [1] colorspace_1.4-1         ellipsis_0.3.1           qvalue_2.20.0
  [4] htmlTable_2.1.0          markdown_1.1             XVector_0.28.0
  [7] base64enc_0.1-3          rstudioapi_0.11          DEFormats_1.16.0
 [10] bit64_4.0.5              AnnotationDbi_1.50.3     lubridate_1.7.9
 [13] RefManageR_1.2.12        xml2_1.3.2               codetools_0.2-16
 [16] splines_4.0.2            geneplotter_1.66.0       knitr_1.30
 [19] Formula_1.2-3            jsonlite_1.7.1           Rsamtools_2.4.0
 [22] annotate_1.66.0          cluster_2.1.0            dbplyr_1.4.4
 [25] png_0.1-7                BiocManager_1.30.10      compiler_4.0.2
 [28] httr_1.4.2               backports_1.1.10         assertthat_0.2.1
 [31] Matrix_1.2-18            limma_3.44.3             htmltools_0.5.0
 [34] prettyunits_1.1.1        tools_4.0.2              gtable_0.3.0
 [37] glue_1.4.2               GenomeInfoDbData_1.2.3   reshape2_1.4.4
 [40] knitcitations_1.0.10     doRNG_1.8.2              rappdirs_0.3.1
 [43] fastmatch_1.1-0          Rcpp_1.0.5               bumphunter_1.30.0
 [46] vctrs_0.3.4              Biostrings_2.56.0        rtracklayer_1.48.0
 [49] iterators_1.0.12         xfun_0.18                stringr_1.4.0
 [52] lifecycle_0.2.0          rngtools_1.5             XML_3.99-0.5
 [55] edgeR_3.30.3             zlibbioc_1.34.0          scales_1.1.1
 [58] BiocStyle_2.16.1         BSgenome_1.56.0          VariantAnnotation_1.34.0
 [61] hms_0.5.3                derfinderHelper_1.22.0   RColorBrewer_1.1-2
 [64] yaml_2.2.1               curl_4.3                 gridExtra_2.3
 [67] memoise_1.1.0            ggplot2_3.3.2            rpart_4.1-15
 [70] latticeExtra_0.6-29      stringi_1.5.3            RSQLite_2.2.1
 [73] genefilter_1.70.0        foreach_1.5.0            checkmate_2.0.0
 [76] GenomicFeatures_1.40.1   BiocParallel_1.22.0      bibtex_0.4.2.3
 [79] rlang_0.4.8              pkgconfig_2.0.3          GenomicFiles_1.24.0
 [82] bitops_1.0-6             evaluate_0.14            lattice_0.20-41
 [85] purrr_0.3.4              htmlwidgets_1.5.2        GenomicAlignments_1.24.0
 [88] bit_4.0.4                tidyselect_1.1.0         plyr_1.8.6
 [91] magrittr_1.5             R6_2.4.1                 generics_0.0.2
 [94] Hmisc_4.4-1              knitrBootstrap_1.0.2     DBI_1.1.0
 [97] pillar_1.4.6             foreign_0.8-79           nnet_7.3-14
[100] survival_3.1-12          RCurl_1.98-1.2           tibble_3.0.3
[103] crayon_1.3.4             derfinder_1.22.0         BiocFileCache_1.12.1
[106] rmarkdown_2.4            jpeg_0.1-8.1             progress_1.2.2
[109] locfit_1.5-9.4           grid_4.0.2               data.table_1.13.1
[112] blob_1.2.1               digest_0.6.25            xtable_1.8-4
[115] openssl_1.4.3            munsell_0.5.0            askpass_1.1

I am using Ubuntu LTS.

ADD REPLY
2
Entering edit mode

Thanks. I added some code to fix a problem with Ubuntu 20.04, and it looks like that broke 16.04. The offending code should now only be run if it's needed, and hopefully it's fixed if you run BiocManager::install('grimbough/biomaRt') again to get the latest version (2.45.7)

ADD REPLY
0
Entering edit mode

It seems to be working now . Thanks!

ADD REPLY
0
Entering edit mode

I get different error with version R=3.6.3.

Error in curl::curl_fetch_memory(url, handle = handle) : 
  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
ADD REPLY
0
Entering edit mode

I am getting exactly the same error. I have been trying it for two days now. First, I was asked to update my R and then this error has been popping up. I ran one old code with which I got the results earlier but now same error is popping up for that old code too.

ADD REPLY
0
Entering edit mode

I am getting exactly the same error. I have been trying it for two days now. First, I was asked to update my R and then this error has been popping up. I ran one old code with which I got the results earlier but now same error is popping up for that old code too.

Error in .processResults(postRes, mart = mart, sep = sep, fullXmlQuery = fullXmlQuery, : The query to the BioMart webservice returned an invalid result. The number of columns in the result table does not equal the number of attributes in the query. Please report this on the support site at http://support.bioconductor.org

ADD REPLY
0
Entering edit mode

Please include the output from sessionInfo() so we can see what versions of R, biomaRt and your operating system are

ADD REPLY
0
Entering edit mode

Hey Mike, Thanks here is my session info:

R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.1 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               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    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] biomaRt_2.45.6 httr_1.4.2     curl_4.3      

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5           pillar_1.4.6         compiler_3.6.3       BiocManager_1.30.10  dbplyr_1.4.4        
 [6] prettyunits_1.1.1    tools_3.6.3          progress_1.2.2       digest_0.6.25        bit_4.0.4           
[11] RSQLite_2.2.1        memoise_1.1.0        BiocFileCache_1.10.2 tibble_3.0.3         lifecycle_0.2.0     
[16] pkgconfig_2.0.3      rlang_0.4.8          DBI_1.1.0            rstudioapi_0.11      parallel_3.6.3      
[21] dplyr_1.0.2          stringr_1.4.0        xml2_1.3.2           rappdirs_0.3.1       generics_0.0.2      
[26] S4Vectors_0.24.4     vctrs_0.3.4          askpass_1.1          IRanges_2.20.2       hms_0.5.3           
[31] tidyselect_1.1.0     stats4_3.6.3         bit64_4.0.5          glue_1.4.2           Biobase_2.46.0      
[36] R6_2.4.1             AnnotationDbi_1.48.0 XML_3.99-0.3         purrr_0.3.4          blob_1.2.1          
[41] magrittr_1.5         ellipsis_0.3.1       BiocGenerics_0.32.0  assertthat_0.2.1     stringi_1.5.3       
[46] openssl_1.4.3        crayon_1.3.4
ADD REPLY
1
Entering edit mode

Thanks. I can't reproduce the error on my own Ubuntu 20.04 installation, but i have seen something similar . Hopefully it's fixed if you run BiocManager::install('grimbough/biomaRt') again to get the latest version (2.45.7)

ADD REPLY
0
Entering edit mode

Hi Mike! I'm encountering the same error:

Error: failed to load external entity "http://www.ensembl.org/info/website/archives/index.html?redirect=no"

I tried several solutions here but it seems that none of them worked. Here is my code:

  ens <- useEnsembl("ensembl")
    listDatasets(ens) %>% filter(str_detect(dataset, "mus"))
    ensemble <- useEnsembl("mmusculus_gene_ensembl", mart=ens)
    listFilters(ensemble) %>% filter(str_detect(name,"symbol"))
    myfilter <- "mgi_symbol"
    #listAttributes(ensemble)
    myattribute <- c("mgi_symbol", "description")
    annot <- getBM(attributes = myattribute, filters = myfilter, values = genes, mart = ensemble)
ADD REPLY
0
Entering edit mode

Here is my session info:

> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS High Sierra 10.13.6

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

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] biomaRt_2.45.7         forcats_0.5.0          stringr_1.4.0          purrr_0.3.4           
 [5] readr_1.4.0            tidyr_1.1.2            tibble_3.0.4           ggplot2_3.3.2         
 [9] tidyverse_1.3.0        pheatmap_1.0.12        dplyr_1.0.2            ReactomePA_1.32.0     
[13] clusterProfiler_3.16.1 mygene_1.24.0          GenomicFeatures_1.40.1 GenomicRanges_1.40.0  
[17] GenomeInfoDb_1.24.2    reactome.db_1.70.0     AnnotationDbi_1.50.3   IRanges_2.22.2        
[21] S4Vectors_0.26.1       Biobase_2.48.0         BiocGenerics_0.34.0    fgsea_1.14.0          

loaded via a namespace (and not attached):
  [1] readxl_1.3.1                backports_1.1.10            Hmisc_4.4-1                
  [4] fastmatch_1.1-0             BiocFileCache_1.12.1        plyr_1.8.6                 
  [7] igraph_1.2.6                splines_4.0.2               BiocParallel_1.22.0        
 [10] urltools_1.7.3              digest_0.6.25               htmltools_0.5.0            
 [13] GOSemSim_2.14.2             viridis_0.5.1               GO.db_3.11.4               
 [16] fansi_0.4.1                 magrittr_1.5                checkmate_2.0.0            
 [19] memoise_1.1.0               cluster_2.1.0               remotes_2.2.0              
 [22] Biostrings_2.56.0           graphlayouts_0.7.0          modelr_0.1.8               
 [25] matrixStats_0.57.0          askpass_1.1                 enrichplot_1.8.1           
 [28] prettyunits_1.1.1           jpeg_0.1-8.1                colorspace_1.4-1           
 [31] rvest_0.3.6                 blob_1.2.1                  rappdirs_0.3.1             
 [34] ggrepel_0.8.2               haven_2.3.1                 xfun_0.18                  
 [37] callr_3.5.0                 crayon_1.3.4                RCurl_1.98-1.2             
 [40] jsonlite_1.7.1              graph_1.66.0                scatterpie_0.1.5           
 [43] survival_3.2-7              glue_1.4.2                  polyclip_1.10-0            
 [46] gtable_0.3.0                zlibbioc_1.34.0             XVector_0.28.0             
 [49] DelayedArray_0.14.1         pkgbuild_1.1.0              graphite_1.34.0            
 [52] scales_1.1.1                DOSE_3.14.0                 DBI_1.1.0                  
 [55] Rcpp_1.0.5                  viridisLite_0.3.0           progress_1.2.2             
 [58] htmlTable_2.1.0             gridGraphics_0.5-0          foreign_0.8-80             
 [61] bit_4.0.4                   europepmc_0.4               Formula_1.2-3              
 [64] sqldf_0.4-11                htmlwidgets_1.5.2           httr_1.4.2                 
 [67] RColorBrewer_1.1-2          ellipsis_0.3.1              pkgconfig_2.0.3            
 [70] XML_3.99-0.5                farver_2.0.3                nnet_7.3-14                
 [73] dbplyr_1.4.4                ggplotify_0.0.5             tidyselect_1.1.0           
 [76] rlang_0.4.8                 reshape2_1.4.4              cellranger_1.1.0           
 [79] munsell_0.5.0               tools_4.0.2                 cli_2.1.0                  
 [82] downloader_0.4              gsubfn_0.7                  generics_0.0.2             
 [85] RSQLite_2.2.1               broom_0.7.1                 ggridges_0.5.2             
 [88] evaluate_0.14               yaml_2.2.1                  processx_3.4.4             
 [91] fs_1.5.0                    knitr_1.30                  bit64_4.0.5                
 [94] tidygraph_1.2.0             ggraph_2.0.3                DO.db_2.9                  
 [97] xml2_1.3.2                  compiler_4.0.2              rstudioapi_0.11            
[100] curl_4.3                    png_0.1-7                   reprex_0.3.0               
[103] tweenr_1.0.1                stringi_1.5.3               ps_1.4.0
ADD REPLY
0
Entering edit mode

Hi I'm getting the same error unfortunately.

I'm not sure if I'm missing something.

 grch37 = biomaRt::useEnsembl(biomart="ensembl", dataset="hsapiens_gene_ensembl", GRCh="37")
genes <- biomaRt::getBM(attributes=c('ensembl_gene_id','hgnc_symbol'), filters = 'ensembl_gene_id', 
                     values = as.matrix(counts$ensembl_gene_id), uniqueRows = FALSE,
                     mart = grch37)
NULL
Error in .processResults(postRes, mart = mart, sep = sep, fullXmlQuery = fullXmlQuery,  : 
The query to the BioMart webservice returned an invalid result.
The number of columns in the result table does not equal the number of attributes in the query.
Please report this on the support site at http://support.bioconductor.org

system info: R version 4.0.2 (2020-06-22) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Catalina 10.15.6

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

locale: [1] enUS.UTF-8/enUS.UTF-8/enUS.UTF-8/C/enUS.UTF-8/en_US.UTF-8

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

other attached packages: [1] BiocVersion3.11.1 biomaRt2.45.7 tibble3.0.4
[4] dplyr
1.0.2 DESeq21.28.1 SummarizedExperiment1.18.2 [7] DelayedArray0.14.1 matrixStats0.57.0 Biobase2.48.0
[10] GenomicRanges
1.40.0 GenomeInfoDb1.24.2 IRanges2.22.2
[13] S4Vectors0.26.1 BiocGenerics0.34.0

loaded via a namespace (and not attached): [1] httr1.4.2 bit644.0.5 splines4.0.2 assertthat0.2.1
[5] askpass1.1 BiocManager1.30.10 BiocFileCache1.12.1 blob1.2.1
[9] GenomeInfoDbData1.2.3 progress1.2.2 pillar1.4.6 RSQLite2.2.1
[13] lattice0.20-41 glue1.4.2 digest0.6.25 RColorBrewer1.1-2
[17] XVector0.28.0 colorspace1.4-1 Matrix1.2-18 XML3.99-0.5
[21] pkgconfig2.0.3 genefilter1.70.0 zlibbioc1.34.0 purrr0.3.4
[25] xtable1.8-4 scales1.1.1 BiocParallel1.22.0 openssl1.4.3
[29] annotate1.66.0 generics0.0.2 ggplot23.3.2 ellipsis0.3.1
[33] cli2.1.0 survival3.2-7 magrittr1.5 crayon1.3.4
[37] memoise1.1.0 fansi0.4.1 xml21.3.2 tools4.0.2
[41] prettyunits1.1.1 hms0.5.3 lifecycle0.2.0 stringr1.4.0
[45] munsell0.5.0 locfit1.5-9.4 AnnotationDbi1.50.3 compiler4.0.2
[49] tinytex0.26 rlang0.4.8 grid4.0.2 RCurl1.98-1.2
[53] rstudioapi0.11 rappdirs0.3.1 bitops1.0-6 gtable0.3.0
[57] DBI1.1.0 curl4.3 R62.4.1 bit4.0.4
[61] utf81.1.4 stringi1.5.3 Rcpp1.0.5 vctrs0.3.4
[65] geneplotter1.66.0 dbplyr1.4.4 tidyselect1.1.0 xfun0.18

Thank you for your help!

ADD REPLY
0
Entering edit mode

I think there was still a problem with using https for the GRCh37 archive. I've hopefully patched that in the latest version.

ADD REPLY
0
Entering edit mode

Thank you. I was able to get it to work successfully

ADD REPLY
0
Entering edit mode

Thank you. I was able to get it to work successfully

ADD REPLY
0
Entering edit mode

Hi, I am still getting the second error after installing the developmental version.

This works:

mart <- useEnsembl(biomart = "ensembl", dataset = "hsapiens_gene_ensembl")
human.genes.IDs.conversion <- getBM(attributes=c('ensembl_gene_id','hgnc_symbol','ensembl_transcript_id','refseq_mrna','ucsc','chromosome_name','transcript_start','transcript_end'), mart = mart)
dim(human.genes.IDs.conversion)
[1] 269419      8

However, I want an old ENSEMBL version (v82). And this doesn't work (it worked for me last week):

mart <- useEnsembl(biomart = "ensembl", dataset = "hsapiens_gene_ensembl", version = "82", host = "http://sep2015.archive.ensembl.org")
human.genes.IDs.conversion <- getBM(attributes=c('ensembl_gene_id','hgnc_symbol','ensembl_transcript_id','refseq_mrna','ucsc','chromosome_name','transcript_start','transcript_end'), mart = mart)

NULL
Error in .processResults(postRes, mart = mart, sep = sep, fullXmlQuery = fullXmlQuery,  : 
  The query to the BioMart webservice returned an invalid result.
The number of columns in the result table does not equal the number of attributes in the query.
Please report this on the support site at http://support.bioconductor.org

Thanks!

EDIT: Forgot to add the sessioninfo()

> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.1 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

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

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

other attached packages:
[1] biomaRt_2.45.8

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5           compiler_3.6.3       pillar_1.4.6        
 [4] dbplyr_1.4.4         prettyunits_1.1.1    tools_3.6.3         
 [7] progress_1.2.2       digest_0.6.25        bit_4.0.4           
[10] RSQLite_2.2.1        memoise_1.1.0        BiocFileCache_1.10.2
[13] tibble_3.0.4         lifecycle_0.2.0      pkgconfig_2.0.3     
[16] rlang_0.4.8          DBI_1.1.0            curl_4.3            
[19] parallel_3.6.3       dplyr_1.0.2          stringr_1.4.0       
[22] httr_1.4.2           xml2_1.3.2           rappdirs_0.3.1      
[25] generics_0.0.2       S4Vectors_0.24.4     vctrs_0.3.4         
[28] askpass_1.1          IRanges_2.20.2       hms_0.5.3           
[31] tidyselect_1.1.0     stats4_3.6.3         bit64_4.0.5         
[34] glue_1.4.2           Biobase_2.46.0       R6_2.4.1            
[37] AnnotationDbi_1.48.0 XML_3.99-0.3         purrr_0.3.4         
[40] blob_1.2.1           magrittr_1.5         ellipsis_0.3.1      
[43] BiocGenerics_0.32.0  assertthat_0.2.1     stringi_1.5.3       
[46] openssl_1.4.3        crayon_1.3.4
ADD REPLY
0
Entering edit mode

Hi all. I am still getting an error, after updating the biomaRt version as suggested. Can you help? Many thanks in advance!

This is my code:

mart = biomaRt::useEnsembl(biomart="ensembl",
                           dataset="drerio_gene_ensembl",
                           mirror=NULL,
                           version=95)

Error is:

Ensembl site unresponsive, trying uswest mirror
Error in bmRequest(request = request, verbose = verbose) : 
  Internal Server Error (HTTP 500).

Biomart version is:

> packageVersion("biomaRt")
[1] ‘2.45.9’
ADD REPLY
0
Entering edit mode

Session info is:

> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.6

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.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] future_1.19.1   enrichR_2.1     reticulate_1.16 magrittr_1.5    patchwork_1.0.1 ggplot2_3.3.2   Seurat_3.2.2   

loaded via a namespace (and not attached):
  [1] BiocFileCache_1.10.2  plyr_1.8.6            igraph_1.2.6          lazyeval_0.2.2        GSEABase_1.48.0       shinydashboard_0.7.1  splines_3.6.1        
  [8] listenv_0.8.0         digest_0.6.25         htmltools_0.5.0       viridis_0.5.1         formattable_0.2.0.1   fansi_0.4.1           memoise_1.1.0        
 [15] tensor_1.5            cluster_2.1.0         ROCR_1.0-11           openxlsx_4.2.2        readr_1.4.0           globals_0.13.1        annotate_1.64.0      
 [22] matrixStats_0.57.0    askpass_1.1           prettyunits_1.1.1     colorspace_1.4-1      blob_1.2.1            rvest_0.3.6           rappdirs_0.3.1       
 [29] ggrepel_0.8.2         xfun_0.18             dplyr_1.0.2           crayon_1.3.4          RCurl_1.98-1.2        jsonlite_1.7.1        graph_1.64.0         
 [36] spatstat_1.64-1       spatstat.data_1.4-3   ape_5.4-1             survival_3.2-7        zoo_1.8-8             glue_1.4.2            kableExtra_1.2.1     
 [43] polyclip_1.10-0       gtable_0.3.0          webshot_0.5.2         leiden_0.3.3          future.apply_1.6.0    BiocGenerics_0.32.0   msigdbr_7.2.1        
 [50] abind_1.4-5           scales_1.1.1          DBI_1.1.0             bibtex_0.4.2.3        miniUI_0.1.1.1        Rcpp_1.0.5            viridisLite_0.3.0    
 [57] xtable_1.8-4          progress_1.2.2        tidytree_0.3.3        bit_4.0.4             rsvd_1.0.3            stats4_3.6.1          GSVA_1.34.0          
 [64] DT_0.16               htmlwidgets_1.5.2     httr_1.4.2            RColorBrewer_1.1-2    ellipsis_0.3.1        ica_1.0-2             pkgconfig_2.0.3      
 [71] XML_3.99-0.3          uwot_0.1.8            dbplyr_1.4.4          deldir_0.1-29         tidyselect_1.1.0      rlang_0.4.8           reshape2_1.4.4       
 [78] later_1.1.0.1         AnnotationDbi_1.48.0  munsell_0.5.0         tools_3.6.1           cli_2.1.0             generics_0.0.2        RSQLite_2.2.1        
 [85] ggridges_0.5.2        evaluate_0.14         stringr_1.4.0         fastmap_1.0.1         yaml_2.2.1            goftest_1.2-2         RefManageR_1.2.12    
 [92] ggtree_2.0.4          knitr_1.30            bit64_4.0.5           fitdistrplus_1.1-1    zip_2.1.1             purrr_0.3.4           RANN_2.6.1           
 [99] pbapply_1.4-3         nlme_3.1-149          mime_0.9              xml2_1.3.2            biomaRt_2.45.9        shinythemes_1.1.2     compiler_3.6.1       
[106] rstudioapi_0.11       plotly_4.9.2.1        curl_4.3              png_0.1-7             spatstat.utils_1.17-0 treeio_1.10.0         geneplotter_1.64.0   
[113] tibble_3.0.4          stringi_1.5.3         lattice_0.20-41       Matrix_1.2-18         cerebroApp_1.2.2      vctrs_0.3.4           knitcitations_1.0.10 
[120] pillar_1.4.6          lifecycle_0.2.0       BiocManager_1.30.10   lmtest_0.9-38         RcppAnnoy_0.0.16      bitops_1.0-6          data.table_1.12.8    
[127] cowplot_1.1.0         irlba_2.3.3           qvalue_2.18.0         httpuv_1.5.4          R6_2.4.1              promises_1.1.1        KernSmooth_2.23-17   
[134] gridExtra_2.3         IRanges_2.20.2        sessioninfo_1.1.1     codetools_0.2-16      colourpicker_1.1.0    MASS_7.3-53           assertthat_0.2.1     
[141] openssl_1.4.3         rjson_0.2.20          shinyWidgets_0.5.4    withr_2.3.0           sctransform_0.3.1     S4Vectors_0.24.4      mgcv_1.8-33          
[148] parallel_3.6.1        hms_0.5.3             grid_3.6.1            rpart_4.1-15          tidyr_1.1.2           rvcheck_0.1.8         rmarkdown_2.4        
[155] Rtsne_0.15            lubridate_1.7.9       Biobase_2.46.0        shiny_1.5.0
ADD REPLY
0
Entering edit mode

Hello, I'm also getting the second error message. However, I'm using plants_mart so I need the useMart function. Is there any way to fix this?

ADD REPLY
0
Entering edit mode

Does setting host = "https://plants.ensembl.org" make a difference?

ADD REPLY
1
Entering edit mode

Yes, it works. Thanks!

ADD REPLY
0
Entering edit mode

Ok, it works now, thank you :).

packageVersion("biomaRt")
[1] ‘2.45.9’
ADD REPLY

Login before adding your answer.

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