[BioC] Help using biomaRt
john seers (IFR)
john.seers at bbsrc.ac.uk
Mon Jan 26 09:45:12 CET 2009
Thanks for the suggested ways forward. I will try again ...
mailto:John.Seers at bbsrc.ac.uk
Bioinformatics & Statistics
Institute of Food Research
Norwich Research Park
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/
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
> Question 1
> I am using the Ensembl database. Looking at the www.ensembl.org
> 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
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
> by the attribute not being in that table.
> 1 Query ERROR: caught BioMart::Exception::Usage: Attributes from
> multiple attribute pages are not allowed
> Error in getBM(attnames, filters = filtnames, values = transcripts,
> = mart) :
> Number of columns in the query result doesn't equal number of
> attributes in query. This is probably an internal error, please
> How can I avoid this error other than by trial and error? Is there a
> more documentation somewhere that I have not found that describes the
> data structure/format in more detail? i.e. how to select the
> 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
this information with:
hope this helps.
More information about the Bioconductor