Error in BiomaRt package
1
0
Entering edit mode
Peter • 0
@peter-7485
Last seen 10.7 years ago
Switzerland

Dear all,

I have a problem with the biomaRt package. I want to retrieve genes in a certain genomic loci and with some coordinates it works, but with some it fails. As an example below you see one locus where it works and the second where it fails. I cannot figure out what is the problem and in the error message I was asked to post it to the mailing list.

Can you reproduce this error? Does someone know what the problem is?

thanks for your help!

Peter

 

Commands:

rm(list=ls())
library(biomaRt)

ensembl.mart <- useMart("ENSEMBL_MART_ENSEMBL", dataset="hsapiens_gene_ensembl", host="www.ensembl.org")

getBM(c("hgnc_symbol","ensembl_gene_id", "band", "gene_biotype"), filters=c("chromosome_name","start","end"),
               values=list("2", 168873645, 169073645), mart=ensembl.mart)

getBM(c("hgnc_symbol","ensembl_gene_id", "band", "gene_biotype"), filters=c("chromosome_name","start","end"),
      values=list("2", 202567581, 202767581), mart=ensembl.mart)

sessionInfo()
traceback()

 

Output:

> rm(list=ls())
> library(biomaRt)
> 
> ensembl.mart <- useMart("ENSEMBL_MART_ENSEMBL", dataset="hsapiens_gene_ensembl", host="www.ensembl.org")
> 
> getBM(c("hgnc_symbol","ensembl_gene_id", "band", "gene_biotype"), filters=c("chromosome_name","start","end"), 
+                values=list("2", 168873645, 169073645), mart=ensembl.mart)
  hgnc_symbol ensembl_gene_id  band   gene_biotype
1      ABCB11 ENSG00000073734 q31.1 protein_coding
2       DHRS9 ENSG00000073737 q31.1 protein_coding
3       SPC25 ENSG00000152253 q31.1 protein_coding
4       G6PC2 ENSG00000152254 q31.1 protein_coding
> 
> getBM(c("hgnc_symbol","ensembl_gene_id", "band", "gene_biotype"), filters=c("chromosome_name","start","end"), 
+       values=list("2", 202567581, 202767581), mart=ensembl.mart)
Error in getBM(c("hgnc_symbol", "ensembl_gene_id", "band", "gene_biotype"),  : 
  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.
> 
> sessionInfo()
R version 3.1.3 (2015-03-09)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=German_Switzerland.1252  LC_CTYPE=German_Switzerland.1252    LC_MONETARY=German_Switzerland.1252
[4] LC_NUMERIC=C                        LC_TIME=German_Switzerland.1252    

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

other attached packages:
[1] biomaRt_2.22.0

loaded via a namespace (and not attached):
 [1] AnnotationDbi_1.28.1 Biobase_2.26.0       BiocGenerics_0.12.1  bitops_1.0-6         DBI_0.3.1            GenomeInfoDb_1.2.4  
 [7] IRanges_2.0.1        parallel_3.1.3       RCurl_1.95-4.5       RSQLite_1.0.0        S4Vectors_0.4.0      stats4_3.1.3        
[13] tools_3.1.3          XML_3.98-1.1        
> traceback()
2: stop("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.")
1: getBM(c("hgnc_symbol", "ensembl_gene_id", "band", "gene_biotype"), 
       filters = c("chromosome_name", "start", "end"), values = list("2", 
           202567581, 202767581), mart = ensembl.mart)
biomart • 1.3k views
ADD COMMENT
0
Entering edit mode

Your query works for me....

ADD REPLY
0
Entering edit mode
Peter • 0
@peter-7485
Last seen 10.7 years ago
Switzerland

Yes, I also tested now the script again on the same computer and it works.

ADD COMMENT

Login before adding your answer.

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