[BioC] need to clarify RangedData documentation?
Steve Lianoglou
mailinglist.honeypot at gmail.com
Wed Nov 3 16:38:22 CET 2010
Hi,
On Wed, Nov 3, 2010 at 10:35 AM, Michael Dondrup <Michael.Dondrup at uni.no> wrote:
> Hi,
>
> I am trying to create a RangedData object and then add a DataFrame of extra annotation columns in a second step.
> From the documentation of the method columnMetadata, I was assuming this function was meant to do this,
> but it doesn't seem to work. The documentation says:
>
> "columnMetadata(x): Get the DataFrame of metadata along the value columns, i.e., where each column in x is represented by a row in the metadata. Note that calling elementMetadata(x)returns the metadata on each space in x.
> columnMetadata(x) <- value: Set the DataFrame of metadata for the columns."
>
> After reading this more closely, I wasn't able to figure what this really means, and I didn't get it to work at all.
> Can someone clarify what this is for?
I think you want to be using elementMetadata() or its alias values().
I guess columnMetadata is supposed to hold information about the
columns(?) but I'm not quite sure ... I've never used it before.
For example:
R> rd = RangedData(ranges=IRanges(start=1:2, width=1), space=1, somedata=1:2)
R> values(rd) <- DataFrame(something.else=100:101)
R> rd
RangedData with 2 rows and 1 value column across 1 space
space ranges | something.else
<character> <IRanges> | <integer>
1 1 [1, 1] | 100
2 1 [2, 2] | 101
Hope that helps,
-steve
--
Steve Lianoglou
Graduate Student: Computational Systems Biology
| Memorial Sloan-Kettering Cancer Center
| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact
More information about the Bioconductor
mailing list