[BioC] coerce biomaRt martTable into data frame

Georg Otto georg.otto at tuebingen.mpg.de
Wed Oct 5 12:43:11 CEST 2005


Hi,

I have a problem working with the biomaRt package:

I have a list of probe IDs that are differentially expressed in an
affymetrix experiment. From this I created a martTable with annotation
data using:

top.genes<-getGene(id=genes, array="zebrafish", mart=mart)

This works fine, but now I want to create data frame out of the
top.genes object, because I would like to have the results in a
table. However:

> as.data.frame(top.genes)

Results in the following error:

Error in as.data.frame.default(top.genes) : 
        cannot coerce class "martTable" into a data.frame


My question is: How can I coerce a martTable into a data frame? I
understand that this might be a more general R question, but maybe
somebody could give me a hint.

I am running

R version 2.1.0, 2005-05-12, powerpc-apple-darwin7.9.0 

biomaRt 1.2.0

Thanks a lot!

Georg



More information about the Bioconductor mailing list