Skip to content
Back to formatted view

Raw Message

Message-ID: <55524833.4010602@fredhutch.org>
Date: 2015-05-12T18:36:35Z
From: Hervé Pagès
Subject: [Bioc-devel] SummarizedExperiment exptData() patch
In-Reply-To: <CAC+N9BVL9+-ZH3J1eJYMsw0sRnQQ+0udxPk71OVRUv3uzE0tcg@mail.gmail.com>

Unlike exptData(), metadata() returns an ordinary list. These methods
also need to be exported and have aliases in the man page for
RangedSummarizedExperiment. I'll add something like that to the
SummarizedExperiment package. Thanks Tim!

H.

On 05/12/2015 11:27 AM, Tim Triche, Jr. wrote:
> one setMethod and a setReplaceMethod later, all seems to be well...
>
> ## testing:
>
> library(SummarizedExperiment)
> nrows <- 200; ncols <- 6
> counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
> rowRanges <- GRanges(rep(c("chr1", "chr2"), c(50, 150)),
>                            IRanges(floor(runif(200, 1e5, 1e6)), width=100),
>                            strand=sample(c("+", "-"), 200, TRUE))
> colData <- DataFrame(Treatment=rep(c("ChIP", "Input"), 3),
>                              row.names=LETTERS[1:6])
> sset <- SummarizedExperiment(assays=SimpleList(counts=counts),
>                        rowRanges=rowRanges, colData=colData)
>
> ## now futz with it
> exptData(sset) <- List(foo='bar')
> identical(metadata(sset), exptData(sset))
> ## TRUE
>
> Works for my purposes...
>
>
>
> Timothy J. Triche, Jr., PhD
> Jane Anne Nohl Division of Hematology
> USC/Norris Comprehensive Cancer Center
> Harlyne Norris Research Tower, room 3509

-- 
Herv? Pag?s

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages at fredhutch.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319