bioMaRt error : "BioMart webservice returned an invalid result: biomaRt expected a character string of length 1"
0
0
Entering edit mode
rdpinho • 0
@rdpinho-15828
Last seen 5.9 years ago

Hi, 

I am getting this error when I try to run bioMaRt on R.

Error in getBM(attributes = c("ensembl_transcript_id_version", "ensembl_gene_id"),  : 
  The query to the BioMart webservice returned an invalid result: biomaRt expected a character string of length 1. Please report this to the mailing list.

I have used this code before multiple times including with the same dataset. 

here is the sessioninfo() and the code that I have used:

> library(biomaRt)
> mart<- useMart("ensembl")
> Pig_ensembl<- useDataset("sscrofa_gene_ensembl", mart=mart)

> head(row.names(DataMalFF_ile))
[1] "ENSSSCT00000040683.1" "ENSSSCT00000058261.1"
[3] "ENSSSCT00000002343.3" "ENSSSCT00000002323.3"
[5] "ENSSSCT00000037386.1" "ENSSSCT00000057714.1"
> tx2gene <-  getBM(attributes = c( "ensembl_transcript_id_version","ensembl_gene_id"), filters= "ensembl_transcript_id_version", values = row.names(DataMalFF_ile), mart = Pig_ensembl)

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

Matrix products: default

locale:
[1] LC_COLLATE=Portuguese_Brazil.1252 
[2] LC_CTYPE=Portuguese_Brazil.1252   
[3] LC_MONETARY=Portuguese_Brazil.1252
[4] LC_NUMERIC=C                      
[5] LC_TIME=Portuguese_Brazil.1252    

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

other attached packages:
[1] biomaRt_2.36.0       edgeR_3.22.1        
[3] limma_3.36.1         BiocInstaller_1.30.0

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.16         AnnotationDbi_1.42.1
 [3] xml2_1.2.0           magrittr_1.5        
 [5] knitr_1.20           progress_1.1.2      
 [7] IRanges_2.14.9       BiocGenerics_0.26.0 
 [9] bit_1.1-12           lattice_0.20-35     
[11] R6_2.2.2             httr_1.3.1          
[13] stringr_1.3.1        blob_1.1.1          
[15] tools_3.5.0          parallel_3.5.0      
[17] grid_3.5.0           Biobase_2.40.0      
[19] DBI_1.0.0            assertthat_0.2.0    
[21] yaml_2.1.19          bit64_0.9-7         
[23] digest_0.6.15        S4Vectors_0.18.1    
[25] bitops_1.0-6         curl_3.2            
[27] RCurl_1.95-4.10      memoise_1.1.0       
[29] RSQLite_2.1.1        stringi_1.2.2       
[31] compiler_3.5.0       prettyunits_1.0.2   
[33] stats4_3.5.0         XML_3.98-1.11       
[35] locfit_1.5-9.1      

I would really appreciate some resuolution to this problem. I have updated  all packages, inclusing bioMaRt and it didn't work.

Thank you!

 

Raquel

r package problem • 2.9k views
ADD COMMENT
2
Entering edit mode

I got similar problems and could get things to work by using an Ensembl mirror site and setting 'ensemblRedirect' to FALSE:

(I am in Europe, so by default the UK Sanger site)

> mart = useMart("ensembl", dataset = "hsapiens_gene_ensembl", host="uswest.ensembl.org", ensemblRedirect = FALSE)

> annot.biomart = getBM(attributes = c("agilent_wholegenome", "entrezgene", "hgnc_symbol","description","ensembl_gene_id"), 
+                       filters = "agilent_wholegenome", values = MA.vsn.df$genes$ProbeName, mart = mart)

Hope this helps! 

regards,

Aldo

 

> sessionInfo()

R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

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] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] biomaRt_2.34.2       GSEABase_1.40.1      graph_1.56.0         annotate_1.56.2      XML_3.98-1.11       
 [6] AnnotationDbi_1.40.0 IRanges_2.12.0       S4Vectors_0.16.0     Biobase_2.38.0       BiocGenerics_0.24.0 
[11] GSVA_1.26.0          limma_3.34.9        

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.16       compiler_3.4.3     later_0.7.2        RColorBrewer_1.1-2 prettyunits_1.0.2  progress_1.1.2    
 [7] bitops_1.0-6       tools_3.4.3        digest_0.6.15      bit_1.1-12         RSQLite_2.1.1      memoise_1.1.0     
[13] shiny_1.0.5        DBI_1.0.0          curl_3.2           httr_1.3.1         stringr_1.3.0      bit64_0.9-7       
[19] grid_3.4.3         R6_2.2.2           geneplotter_1.56.0 blob_1.1.1         magrittr_1.5       promises_1.0.1    
[25] htmltools_0.3.6    shinythemes_1.1.1  assertthat_0.2.0   mime_0.5           xtable_1.8-2       httpuv_1.4.2      
[31] stringi_1.2.2      RCurl_1.95-4.10

ADD REPLY
0
Entering edit mode

It's a good idea to tag you post with the name of the package you're trying to use - that way the author of the package gets an email notifying them that a question has been asked.  You should be able to edit your post to add the biomaRt tag.

ADD REPLY

Login before adding your answer.

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