Biomart error message
1
0
Entering edit mode
Aurora ▴ 20
@aurora-15104
Last seen 6.0 years ago

Good Morning, 

I am trying to use Biomart to annotate genes but I always have this error message that appears : 

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 find a subject on bioconductor about this issue : 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

But the error remains when I try to install a patched version via GitHub:

BiocInstaller::biocLite('grimbough/biomaRt')

 And the code doesn't  work when I try an archive version :

human = useMart("ensembl", dataset = "hsapiens_gene_ensembl", "http://Aug2017.archive.ensembl.org")

Error in listMarts(host = host, path = path, port = port, includeHosts = TRUE,  : 
  Unexpected format to the list of available marts.
Please check the following URL manually, and try ?listMarts for advice.
http://Aug2017.archive.ensembl.org:80/biomart/martservice?type=registry&requestid=biomaRt

 

here is the code I use :

require(biomaRt)
listMarts()
ensMart<-useMart("ensembl")
View(listDatasets(ensMart))
ensembl_hs_mart <- useMart(biomart="ensembl", dataset="mmusculus_gene_ensembl")
View(listAttributes(ensembl_hs_mart))

infos_genes = getBM(attributes=c("entrezgene"),mart = ensembl_hs_mart)
View(infos_genes)

infos_genes = getBM(attributes=c("entrezgene","percentage_gene_gc_content","gene_biotype","chromosome_name"),
                    filter="entrezgene",
                    values=rownames(countsTable),
                    mart = mart)
View(infos_genes)

 

session info :

 

Show in New WindowClear OutputExpand/Collapse Output
         used (Mb) gc trigger (Mb) max used (Mb)
Ncells 449007 24.0     750400 40.1   592000 31.7
Vcells 804975  6.2    1650153 12.6   949924  7.3
               _                           
platform       x86_64-w64-mingw32          
arch           x86_64                      
os             mingw32                     
system         x86_64, mingw32             
status                                     
major          3                           
minor          4.3                         
year           2017                        
month          11                          
day            30                          
svn rev        73796                       
language       R                           
version.string R version 3.4.3 (2017-11-30)
nickname       Kite-Eating Tree            
Memory set to  7839  Mb. 

Show in New WindowClear OutputExpand/Collapse Output
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=French_France.1252  LC_CTYPE=French_France.1252    LC_MONETARY=French_France.1252
[4] LC_NUMERIC=C                   LC_TIME=French_France.1252    

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

other attached packages:
 [1] biomaRt_2.34.2                           EDASeq_2.12.0                           
 [3] ShortRead_1.36.0                         GenomicAlignments_1.14.1                
 [5] SummarizedExperiment_1.8.1               DelayedArray_0.4.1                      
 [7] matrixStats_0.53.0                       Rsamtools_1.30.0                        
 [9] Biostrings_2.46.0                        XVector_0.18.0                          
[11] BiocParallel_1.12.0                      edgeR_3.20.7                            
[13] limma_3.34.6                             Mus.musculus_1.3.1                      
[15] TxDb.Mmusculus.UCSC.mm10.knownGene_3.4.0 org.Mm.eg.db_3.5.0                      
[17] GO.db_3.5.0                              OrganismDbi_1.20.0                      
[19] GenomicFeatures_1.30.3                   GenomicRanges_1.30.0                    
[21] GenomeInfoDb_1.14.0                      AnnotationDbi_1.40.0                    
[23] IRanges_2.12.0                           S4Vectors_0.16.0                        
[25] NOISeq_2.22.0                            Matrix_1.2-12                           
[27] Biobase_2.38.0                           BiocGenerics_0.24.0                     

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.15           locfit_1.5-9.1         lattice_0.20-35        prettyunits_1.0.2     
 [5] assertthat_0.2.0       digest_0.6.15          R6_2.2.2               aroma.light_3.8.0     
 [9] DESeq_1.30.0           RSQLite_2.0            httr_1.3.1             BiocInstaller_1.28.0  
[13] pillar_1.2.1           zlibbioc_1.24.0        rlang_0.2.0            progress_1.1.2        
[17] annotate_1.56.1        blob_1.1.0             R.utils_2.6.0          R.oo_1.21.0           
[21] RMySQL_0.10.14         geneplotter_1.56.0     stringr_1.3.0          RCurl_1.95-4.10       
[25] bit_1.1-12             compiler_3.4.3         rtracklayer_1.38.3     pkgconfig_2.0.1       
[29] tibble_1.4.2           GenomeInfoDbData_1.0.0 XML_3.98-1.10          bitops_1.0-6          
[33] R.methodsS3_1.7.1      grid_3.4.3             RBGL_1.54.0            xtable_1.8-2          
[37] DBI_0.8                magrittr_1.5           graph_1.56.0           stringi_1.1.6         
[41] genefilter_1.60.0      hwriter_1.3.2          latticeExtra_0.6-28    RColorBrewer_1.1-2    
[45] tools_3.4.3            bit64_0.9-7            survival_2.41-3        yaml_2.1.17           
[49] memoise_1.1.0          knitr_1.20            

 

 

Thanks a lot,

Have a good day

 

 

biomart • 1.3k views
ADD COMMENT
0
Entering edit mode

I can run your example code fine, so I wonder if this is an issue with your internet connection.

What do you see if you go to http://Aug2017.archive.ensembl.org:80/biomart/martservice?type=registry&requestid=biomaRt in your web browser?

You should see some XML starting with <MartRegistry> If you see anything else then something unexpected is going on with your connection to Ensembl.

ADD REPLY
0
Entering edit mode
Aurora ▴ 20
@aurora-15104
Last seen 6.0 years ago

ty for answer ,

I see this if I go to http://Aug2017.archive.ensembl.org:80/biomart/martservice?type=registry&requestid=biomaRt :

<MartRegistry>
  <MartURLLocation database="ensembl_mart_90" default="1" displayName="Ensembl Genes 90" host="aug2017.archive.ensembl.org" includeDatasets="" martUser="" name="ENSEMBL_MART_ENSEMBL" path="/biomart/martservice" port="80" serverVirtualSchema="default" visible="1" />
  <MartURLLocation database="mouse_mart_90" default="" displayName="Mouse strains 90" host="aug2017.archive.ensembl.org" includeDatasets="" martUser="" name="ENSEMBL_MART_MOUSE" path="/biomart/martservice" port="80" serverVirtualSchema="default" visible="1" />
  <MartURLLocation database="sequence_mart_90" default="" displayName="Sequence" host="aug2017.archive.ensembl.org" includeDatasets="" martUser="" name="ENSEMBL_MART_SEQUENCE" path="/biomart/martservice" port="80" serverVirtualSchema="default" visible="" />
  <MartURLLocation database="ontology_mart_90" default="" displayName="Ontology" host="aug2017.archive.ensembl.org" includeDatasets="" martUser="" name="ENSEMBL_MART_ONTOLOGY" path="/biomart/martservice" port="80" serverVirtualSchema="default" visible="" />
  <MartURLLocation database="genomic_features_mart_90" default="" displayName="Genomic features 90" host="aug2017.archive.ensembl.org" includeDatasets="" martUser="" name="ENSEMBL_MART_GENOMIC" path="/biomart/martservice" port="80" serverVirtualSchema="default" visible="" />
  <MartURLLocation database="snp_mart_90" default="" displayName="Ensembl Variation 90" host="aug2017.archive.ensembl.org" includeDatasets="" martUser="" name="ENSEMBL_MART_SNP" path="/biomart/martservice" port="80" serverVirtualSchema="default" visible="1" />
  <MartURLLocation database="regulation_mart_90" default="" displayName="Ensembl Regulation 90" host="aug2017.archive.ensembl.org" includeDatasets="" martUser="" name="ENSEMBL_MART_FUNCGEN" path="/biomart/martservice" port="80" serverVirtualSchema="default" visible="1" />
</MartRegistry>

So it seems ok,

I work in a company which uses a very secured proxy so because it has something to do with it even if I used 

Sys.setenv(https_proxy="")  to prevent this problem.

Ty a lot,

have a good day

 

ADD COMMENT
0
Entering edit mode

That looks correct, so maybe there's some inconsistency between you browser configuration and R. Can you try running the commands with the argument verbose = TRUE e.g.

human = useMart("ensembl", dataset = "hsapiens_gene_ensembl",                 
                host = "http://Aug2017.archive.ensembl.org",
                verbose = TRUE)

That should give a bit more information about what stage it's failing.

ADD REPLY
0
Entering edit mode

These commands seem to work :

 

> require(biomaRt)

> human = useMart("ensembl", dataset = "hsapiens_gene_ensembl",                 

+                 host = "http://Aug2017.archive.ensembl.org";,

+                 verbose = TRUE)

Attempting web service request:

http://Aug2017.archive.ensembl.org:80/biomart/martservice?type=version&requestid=biomaRt&mart=ENSEMBL_MART_ENSEMBL

   V1

1 0.7

BioMartServer running BioMart version: 0.7

Mart virtual schema: default

Mart host: http://Aug2017.archive.ensembl.org:80/biomart/martservice

Checking attributes ...Attempting web service request:

http://Aug2017.archive.ensembl.org:80/biomart/martservice?type=attributes&dataset=hsapiens_gene_ensembl&requestid=biomaRt&mart=ENSEMBL_MART_ENSEMBL&virtualSchema=default

 ok

Checking filters ...Attempting web service request:

http://Aug2017.archive.ensembl.org:80/biomart/martservice?type=filters&dataset=hsapiens_gene_ensembl&requestid=biomaRt&mart=ENSEMBL_MART_ENSEMBL&virtualSchema=default

 ok

ADD REPLY

Login before adding your answer.

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