Hello there
I have recently installed the package biomaRt (v. 1.6.0)
with R version 2.3.0 running on a Debian (sarge) GNU/Linux system.

I am extremely pleased that biomaRt is available.
However I would like to report a difficulty using the
function getGene
to query Ensembl with IDs for Affymetrix probesets.

I can execute the example code available from the vignette
(for a human dataset) without problems.

However when I try the following code on the rat dataset:

 > library("biomaRt")
 > rat.mart <- useMart("ensembl")
 > rat.mart <- useDataset(dataset="rnorvegicus_gene_ensembl", mart=rat.mart)
 > getGene(id="AJ001517cds_at", array="affy_rg_u34a", mart= rat.mart)
Error in getBM(attributes = c(attrib, "hgnc_symbol", "description", 
chrname,  :
    attribute: hgnc_symbol not found, please use the function 
'listAttributes' to get valid attribute names

The error seems to come from the attempt to retrieve
HUGO gene symbols ('hgnc_symbol')
from Ensembl in the calls to getBM in getGene.
These calls worked fine on the human dataset but not on the rat
(I have not tried other datasets).
This may reflect a restriction at the Ensembl end,
but nevertheless it prevents getGene from returning
any data at all.

I got round the problem by modifying lines 103 and 124
of getGene (the calls to getBM)
to remove the second ("hgnc_symbol") attribute:

table = getBM(attributes = c(att, "hgnc_symbol",
                "description", chrname, "band", strand, startpos,
                endpos, geneid, transid), filters = filter, values = id,
                mart = mart)

and also modified line 130 to make the columns
of the table returned consistent,
by removing the one for the HUGO symbol:

colnames(table) = c("ID", "HUGO symbol", "description",
           "chromosome", "band", "strand", "chromosome_start",
           "chromosome_end", "ensembl_gene_id", "ensembl_transcript_id")

Calling the modified function getGene.withoutHUGO
and executing it gives me other valuable data:

 > getGene.withoutHUGO(id="AJ001517cds_at", array= "affy_rg_u34a", mart= 
rat.mart)
              ID
1 AJ001517cds_at
2 AJ001517cds_at
3 AJ001517cds_at
                                                                                             
description
1 Hereditary hemochromatosis protein homolog precursor (RT1-CAFE). 
[Source:Uniprot/SWISSPROT;Acc:O35799]
2 Hereditary hemochromatosis protein homolog precursor (RT1-CAFE). 
[Source:Uniprot/SWISSPROT;Acc:O35799]
3 Hereditary hemochromatosis protein homolog precursor (RT1-CAFE). 
[Source:Uniprot/SWISSPROT;Acc:O35799]
  chromosome band strand chromosome_start chromosome_end    ensembl_gene_id
1         17  p11     -1         48469930       48478502 ENSRNOG00000016967
2         17  p11     -1         48469930       48478502 ENSRNOG00000016967
3         17  p11     -1         48469930       48478502 ENSRNOG00000016967
  ensembl_transcript_id
1    ENSRNOT00000022881
2    ENSRNOT00000022809
3    ENSRNOT00000022810


So I can happily carry on using biomaRt to annotate rat affys for now!

Many thanks to biomaRt (and bioconductor) developers.

Vini.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dr Vini PEREIRA
Centre for the Study of Evolution
School of Life Sciences
The University of Sussex
Falmer
Brighton BN1 9QG
UK

v.pereira@sussex.ac.uk
Tel. +44 (0)1273 872954
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


"in the seed is the tree; in the tree is the forest"


	[[alternative HTML version deleted]]

