Error in getBM - biomaRt expected a character string of 1
1
0
Entering edit mode
meesonnl • 0
@meesonnl-20898
Last seen 4.9 years ago

Hi,

I've been using the following code in order to get gene names etc from ensembl based on a list of ensembl IDs from a sequencing experiment, and it has previously been running without issue.

mart <- useMart(biomart = "ensembl", dataset = "rnorvegicus_gene_ensembl")

genes_biomart <- getBM(attributes = c("ensembl_gene_id", "external_gene_name", "entrezgene"),

                                   filters = "ensembl_gene_id",

                                   values = geneid$`rownames(x)`, # column in df of ensembl IDs from RNA seq

                                  mart = mart)

However, since Friday (24/05) I have been getting the following error when running getBM

Batch submitting query [================>-------------------------------------------------]  26% eta: 17mError in getBM(attributes = c("ensembl_gene_id", "external_gene_name",  : 

The query to the BioMart webservice returned an invalid result: biomaRt expected a character string of length 1. 
Please report this on the support site at http://support.bioconductor.org

I have tried changing the attributes I am calling in, and have changed it so I'm only asking for one of the attributes but I still get this error.

Session info:

> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

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

other attached packages:
[1] RColorBrewer_1.1-2 Glimma_1.12.0      biomaRt_2.40.0     stringr_1.4.0      dplyr_0.8.1       
[6] edgeR_3.26.4       limma_3.40.2      

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.1           pillar_1.4.1         compiler_3.6.0       BiocManager_1.30.4   prettyunits_1.0.2   
 [6] progress_1.2.2       bitops_1.0-6         tools_3.6.0          digest_0.6.19        bit_1.1-14          
[11] jsonlite_1.6         RSQLite_2.1.1        memoise_1.1.0        tibble_2.1.1         lattice_0.20-38     
[16] pkgconfig_2.0.2      rlang_0.3.4          DBI_1.0.0            rstudioapi_0.10      curl_3.3            
[21] parallel_3.6.0       xml2_1.2.0           httr_1.4.0           hms_0.4.2            IRanges_2.18.0      
[26] S4Vectors_0.22.0     locfit_1.5-9.1       stats4_3.6.0         bit64_0.9-7          grid_3.6.0          
[31] tidyselect_0.2.5     glue_1.3.1           Biobase_2.44.0       R6_2.4.0             AnnotationDbi_1.46.0
[36] XML_3.98-1.19        purrr_0.3.2          blob_1.1.1           magrittr_1.5         BiocGenerics_0.30.0 
[41] assertthat_0.2.1     stringi_1.4.3        RCurl_1.95-4.12      crayon_1.3.4  

Any help is much appreciated!

Natalie

biomaRt • 932 views
ADD COMMENT
1
Entering edit mode
Mike Smith ★ 6.5k
@mike-smith
Last seen 4 hours ago
EMBL Heidelberg

You can try querying one of the Ensembl mirrors which may be more responsive for you e.g.

mart <- useEnsembl(biomart = "ensembl", 
                   dataset = "rnorvegicus_gene_ensembl", 
                   mirror = "useast")

Values for the mirror argument are: useast, uswest, asia

ADD COMMENT
0
Entering edit mode

Great thank you- I got an error when I used "mirror" unused argument (mirror = "useast") but searched it and found another answer where you'd suggesting using "host" and this worked perfectly. Thanks again!

ADD REPLY
0
Entering edit mode

There's a different set of arguments for useMart() and useEnsembl(), which I think is probably the cause of the error your got. I prefer to go with useEnsembl() when working with Ensembl as it makes some of the options such as version or mirror more explicit when I come to reuse code later on, but both functions work in the same way, so if you have it working then that's great.

ADD REPLY

Login before adding your answer.

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