[BioC] Converting an Annbuilder object to a dataframe

Robert Gentleman rgentlem at fhcrc.org
Thu Jan 4 18:44:53 CET 2007


Hi Daniel,
   The main reason that they are not data.frames is that they don't fit 
into that kind of a box, so you are trying to do something that will 
require that you make specific choices along the way.

  Then, are you sure that is what you want to do? For example,

  library(hgu95av2)
 > v1=as.list(hgu95av2CHRLOC)
 > v1[1]
$`986_at`
        15
-49288963


  says this probe maps to chromosome 15, antisense strand position 
49288963. You can find out the name (if that is what you want)
  by
  > hgu95av2SYMBOL$"986_at"
[1] "CYP19A1"

  So all most all things you want can be achieved with fairly simple 
programs.

  If you really want to make data frames, then I suggest looking at 
functions like as.list and eapply, but there is not simple way to get 
what you want.

  An alternative is to make use of some of the interfaces to relational 
databases (eg RSQLite) as a way to get slightly more power than can be 
achieved easily from within R.  Annotation packages based on SQLite will 
be made available in the next release of Bioconductor and we are likely 
to shift over exclusively to them in the future (provided the 
performance is satisfactory).

  best wishes
    Robert


Daniel Brewer wrote:
> Hello,
> 
> I am attempting to use the "hgug4100a" library (built using AnnBuilder)
> to integrate location information into a limma object.  The problem I am
> having is how to change the annotation objects into a dataframe (once
> there I can use the merge function).  Ideally I would have a dataframe
> with the following columns:
> Identifier	Chromosome	Location
> 
> Anyone has any idea how to do this?  It is easy enough to change it into
> the list but I need to strip out:
> 1) The antisense location
> 2) Reduce it to one entry per identifier
> and the identifier has quotes round it
> 
> Very confused about how to do this and any help would be appreciated.
> 
> Thanks
> 

-- 
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
rgentlem at fhcrc.org



More information about the Bioconductor mailing list