[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bioc-devel
Subject:    Re: [Bioc-devel] SummarizedExperiment exptData() patch
From:       <hpages () fredhutch ! org>
Date:       2015-05-12 18:36:35
Message-ID: 55524833.4010602 () fredhutch ! org
[Download RAW message or body]

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@fredhutch.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319

_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic