[BioC] Help using biomaRt

Steve Lianoglou mailinglist.honeypot at gmail.com
Fri Jan 23 17:46:15 CET 2009


Hi,

> Question 1
> ===========
>
> I am using the Ensembl database. Looking at the www.ensembl.org  
> website
> it looks like you do not have to specify a filter. Do you have to
> specify a filter using biomaRt/R? If not how is it done?

I'm not sure I get what you're getting at, and probably others will  
jump in to answer your question with ease (I'm also getting more  
acquainted w/ biomaRt), but could you give an example of a query  
you're trying to do that wouldn't use a filter?

Perhaps one I can think of off hand would be to get all the gene id's  
for your organism. Intuitively you might think that there are no  
filters you can use in this case, but you do: you would use the  
chromosomes you want to get the info for (in this case, it would be  
all of them). So, you would just do something like:

annos <- getBM(..., attributes='ensembl_gene_id',  
filters='chromosome_name', values=CHROMOSOMES)

That's a butchered-for-brevity piece of code. There is an example in  
the recent Toedling and Huber chip-chip tutorial from plos compbio  
where they call getBM as many times as there are chromosomes and  
filter/collate afterwards.

Anyway ... an example of the query you have in mind might help.

> Question 2
> ==============
>
> While trying things I get the following error message, presumably  
> caused
> by the attribute not being in that table.
>
>
> V1
> 1 Query ERROR: caught BioMart::Exception::Usage: Attributes from
> multiple attribute pages are not allowed
> Error in getBM(attnames, filters = filtnames, values = transcripts,  
> mart
> = mart) :
>  Number of columns in the query result doesn't equal number of
> attributes in query.  This is probably an internal error, please  
> report.


I was fighting with a similar error recently, I was using gene symbols/ 
names to look up annotation info for them. It turned out that some of  
my names had an apostrophe in the ('), and another gene name somehow  
had a "<b>" tacked on to it. I received a gene list from an  
experimentalist and just didn't think to scrub it, so it took a while  
to figure out that that was the problem.

Perhaps you have some illegal characters in your transcript names, too.

HTH,
-steve

--
Steve Lianoglou
Graduate Student: Physiology, Biophysics and Systems Biology
Weill Medical College of Cornell University

http://cbio.mskcc.org/~lianos



More information about the Bioconductor mailing list