The query to the BioMart webservice returned an invalid result: biomaRt expected a character string of length 1.
1
0
Entering edit mode
frank007 • 0
@frank007-19497
Last seen 4.3 years ago

The original dataframe gene2disease_group looks like this and has no empty values:

eidh;symbh
1;A1BG
1;A1BG
2;A2M

This call

gene2disease_group <- mapEntrezToEnsembl(1, gene2disease_group)

of the follwing function

mapEntrezToEnsembl <- function(columnIndex, result, mart = useDataset("hsapiens_gene_ensembl", useMart("ensembl"))){

  #as.data.frame is needed, because result[, columnIndex] throws error if result is a data.table
  result <- as.data.frame(result)
  val <- result[, columnIndex]

  colnames(result)[columnIndex] <- "GeneID"

  attributes <- c("ensembl_gene_id", "entrezgene_id")

  ensemblGenes <- getBM(filters = "entrezgene_id", attributes= attributes, values = val, mart = mart)
  }

ended with the error

Batch submitting query [============================>----------------------------------------------------------------------------------------------]  24% eta: 47mError in getBM(filters = "entrezgene_id", attributes = attributes, values = val,  : 
  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
Called from: getBM(filters = "entrezgene_id", attributes = attributes, values = val, 
    mart = mart)

Any idea to solve this problem?

Frank

#
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Scientific Linux 7.4 (Nitrogen)

Matrix products: default
BLAS/LAPACK: /apps/prod/easybuild/sl7.x86_64/software/OpenBLAS/0.2.20-GCC-6.4.0-2.28/lib/libopenblasp-r0.2.20.so

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

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  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] openxlsx_4.1.0.1  R.utils_2.9.0     R.oo_1.22.0       R.methodsS3_1.7.1 InterMineR_1.6.1  tidyr_1.0.0       ggplot2_3.2.1     readxl_1.3.1      biomaRt_2.40.3   
[10] rvest_0.3.4       xml2_1.2.0        jsonlite_1.6      RCurl_1.95-4.12   bitops_1.0-6      png_0.1-7         stringr_1.4.0     optparse_1.6.2    dplyr_0.8.3      
[19] data.table_1.12.2 magrittr_1.5      flextable_0.5.5   officer_0.3.5     plyr_1.8.4        hash_2.2.6.1

...

software error • 348 views
ADD COMMENT
0
Entering edit mode
Mike Smith ★ 6.5k
@mike-smith
Last seen 6 hours ago
EMBL Heidelberg

This usually indicates some instability with the main Ensembl webserver. You can try querying one of the mirrors e.g.

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

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

I've updated the developmental version of biomaRt to try and detect this and do the redirection automatically in the future.

Since you're running a large query (the progress bar only shows up for large queries) you should also find that if you rerun the query it will pick up where it left off as it caches intermediate results. It's not ideal, but hopefully better than restarting from scratch each time.

ADD COMMENT

Login before adding your answer.

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