Error in biomaRt User Guide example Task 11
5
1
Entering edit mode
cring ▴ 10
@cring-11602
Last seen 8.2 years ago

I have just installed biomaRt and am having trouble with Task 11 in the User Guide (available on the web). The relevant piece of code is:

human = useMart("ensembl", dataset = "hsapiens_gene_ensembl") 
mouse = useMart("ensembl", dataset = "mmusculus_gene_ensembl") 
getLDS(attributes = c("hgnc_symbol","chromosome_name", "start_position"), filters = "hgnc_symbol", values = "TP53",mart = human, attributesL = c("refseq_mrna","chromosome_name","start_position"), martL = mouse)

When I copy and paste this code at the R command line, I get the following output and error:

[1] HGNC.symbol                     Chromosome.Name                 Gene.Start..bp.                
[4] RefSeq.mRNA..e.g..NM_001195597. Chromosome.Name.1              
<0 rows> (or 0-length row.names)
Error in getLDS(attributes = c("hgnc_symbol", "chromosome_name", "start_position"),  : 
  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. Please report this to the mailing list.

I searched for other cases where people got this error and found varying answers -- from "it's a server-side problem" to "you requested an attribute that doesn't exist" (which can't be the problem this time, unless the example itself is incorrect) to "install the newest version of biomaRt" (which shouldn't be the problem this time because I just installed it) to "this is a non-trivial bug". I now have absolutely no idea what the problem might be or how to start fixing it. Any help would be much appreciated!

I'm using RStudio Version 0.99.903, if that matters.

Here's my session info:

> sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.6 (El Capitan)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] biomaRt_2.28.0       BiocInstaller_1.22.3

loaded via a namespace (and not attached):
 [1] IRanges_2.6.1        rsconnect_0.4.3      parallel_3.3.0       DBI_0.5-1           
 [5] tools_3.3.0          RCurl_1.95-4.8       Biobase_2.32.0       AnnotationDbi_1.34.4
 [9] RSQLite_1.0.0        S4Vectors_0.10.3     BiocGenerics_0.18.0  stats4_3.3.0        
[13] bitops_1.0-6         XML_3.98-1.4        

 

biomaRt • 1.6k views
ADD COMMENT
2
Entering edit mode
Mike Smith ★ 6.6k
@mike-smith
Last seen 1 day ago
EMBL Heidelberg

Short answer is that the example and its returned value are hard-coded into the vignette.  It isn't evaluated when you install the package and is now seriously out of date.  This is true of many examples in the vignette, most of which still work, but give you different answers to what is shown in that document.  I get the same error as you do for that particular query.

A slightly longer answer is that I'm not even sure you can do this type of query against Ensembl Biomart (the webservice) any more.  It isn't the R package breaking, so much as the query no longer returning anything useful.  To test this you can perform almost any operation using the web interface at http://www.ensembl.org/biomart/martview. The equivalent of using the getLDS() function is to choose two datasets, and then select the attributes from each that you want returned.  If I do this for homo sapiens genes and mus musculus genes I get nothing returned at all, even with no filters applied.  This suggests to me that this ortholog functionality no longer works in Ensembl Biomart.  

It has always seems more natural to me to use the multiple datasets within a single species e.g. Filter by gene name and return structural variants, so maybe some internal change was made to reflect this.  Perhaps someone with more knowledge of the underlying database can shed more light on this?

You can get the query to work if you use an old archive of Ensembl, which is covered in the next section of the vignette.  This obviously has significant drawbacks however.

human.old <- useMart(host='may2012.archive.ensembl.org', 
                     biomart='ENSEMBL_MART_ENSEMBL', 
                     dataset='hsapiens_gene_ensembl')
mouse.old <- useMart(host='may2012.archive.ensembl.org', 
                     biomart='ENSEMBL_MART_ENSEMBL', 
                     dataset='mmusculus_gene_ensembl')

getLDS(attributes = c("hgnc_symbol","chromosome_name", "start_position"), 
               filters = "hgnc_symbol", 
               values = "TP53", 
               mart = human.old, 
               attributesL = c("chromosome_name","start_position"), 
               martL = mouse.old)
  HGNC.symbol Chromosome.Name Gene.Start..bp. Chromosome.Name.1 Gene.Start..bp..1
1        TP53              17         7565097                11          69393861
ADD COMMENT
0
Entering edit mode
Thomas Maurel ▴ 800
@thomas-maurel-5295
Last seen 22 months ago
United Kingdom

Dear all,

I am afraid that we have a bug affecting the multiple datasets selection in the release 86 gene mart. This is causing the BiomaRt getLDS function to fail over.
We have a working fix that we will push live early next week, I will let you know as soon as the release 86 gene mart is working again.

In the meantime, please feel free to use our previous release e!85 marts:

human <- useMart("ENSEMBL_MART_ENSEMBL", dataset = "hsapiens_gene_ensembl", host = "e85.ensembl.org")

Apologies for any inconvenience caused,
Best Regards,
Thomas

ADD COMMENT
0
Entering edit mode
Thomas Maurel ▴ 800
@thomas-maurel-5295
Last seen 22 months ago
United Kingdom

Dear all,

I am afraid that we have a bug affecting the multiple datasets selection in the release 86 gene mart. This is causing the BiomaRt getLDS function to fail over.
We have a working fix that we will push live early next week, I will let you know as soon as the release 86 gene mart is working again.

In the meantime, please feel free to use our previous release e!85 marts:

human <- useMart("ENSEMBL_MART_ENSEMBL", dataset = "hsapiens_gene_ensembl", host = "e85.ensembl.org")

Apologies for any inconvenience caused,
Best Regards,
Thomas

ADD COMMENT
0
Entering edit mode
Thomas Maurel ▴ 800
@thomas-maurel-5295
Last seen 22 months ago
United Kingdom

Dear all,

Just to let you know that we have now pushed a fix to our main website www.ensembl.org, you can access it by running:

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

We will fix the US West, US East and Asian mirrors next week.

Thank you for your patience.
Best Regards,
Thomas

ADD COMMENT
0
Entering edit mode
Thomas Maurel ▴ 800
@thomas-maurel-5295
Last seen 22 months ago
United Kingdom

Dear all,

Just to let you know that the US West, US East and Asian mirrors have now been fixed too.

Thank you for your patience.
Best Regards,
Thomas

ADD COMMENT

Login before adding your answer.

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