[BioC] Converting annotate lists to a matrix

michael watson (IAH-C) michael.watson at bbsrc.ac.uk
Thu Feb 10 12:31:20 CET 2005


Hi

This is kind of an R problem, but on bioconductor data.  For example, I
have the hu6800PATH environment from the hu6800 annotation package.  The
example in the help is this:

xx <- as.list(hu6800PATH)
xx <- xx[!is.na(xx)]

What I actually want is a matrix with two columns, the first being probe
id and the second being pathway id - I'm going to do some relational
joins with this data using merge().

I've got as far as:

as.matrix(unlist(xx))

But that doesn't give me exactly what I want.  The rownames of the
resulting matrix are set to the probe_ids but where there are duplicate
probe ids (where probes are in >1 pathway) then R appends a numerator on
the end.

Can anyone help me convert the list format from an annotation package to
a matrix as I describe above?

Thanks
Mick



More information about the Bioconductor mailing list