[BioC] Help using biomaRt

john seers (IFR) john.seers at bbsrc.ac.uk
Mon Jan 26 09:45:12 CET 2009


Hi Steffen 

Thanks for the suggested ways forward. I will try again ...

Regards

John Seers



 
---


mailto:John.Seers at bbsrc.ac.uk


John Seers
Bioinformatics & Statistics
Institute of Food Research
Norwich Research Park
Colney
Norwich
NR4 7UA
 
Location: IFR1 N102
PC Machine ID: N198


tel +44 (0)1603 251497
fax +44 (0)1603 507723
e-mail john.seers at bbsrc.ac.uk                         
e-disclaimer at http://www.ifr.ac.uk/edisclaimer/ 
 
Web sites:

www.ifr.ac.uk   
www.foodandhealthnetwork.com

-----Original Message-----
From: steffen at stat.Berkeley.EDU [mailto:steffen at stat.Berkeley.EDU] 
Sent: 25 January 2009 23:20
To: john seers (IFR)
Cc: bioconductor at stat.math.ethz.ch
Subject: Re: [BioC] Help using biomaRt

Hi John,


> 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?
>

No you don't have to specify a filter and associated values.  You can do
for example:

mart = useMart("ensembl",dataset="hsapiens_gene_ensembl")
ensid = getBM(attributes="ensembl_gene_id", mart=mart)

This will return all ensembl gene identifiers.


> 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.
>>
>
> How can I avoid this error other than by trial and error? Is there a
bit
> more documentation somewhere that I have not found that describes the
> data structure/format in more detail? i.e. how to select the
attributes
> that are not on "multiple attribute pages"?  At the moment I am just
> building my queries by trying something and seeing if it works which
> does not seem right. I think there must be some more information that
> will make it a bit easier.
>
> Also I cannot find anything that describes the groups/categories/types
> and what they mean or do.
>


You can see to which attribute page an attribute belongs using the
function listAttributes(mart, showGroups = TRUE)

note that if you're using the developmental version of biomaRt you can
get
this information with:
listAttributes(mart, what=c("name","page"))

hope this helps.

Best,
Steffen



More information about the Bioconductor mailing list