[Bioc-devel] SummarizedExperiment initialisation and manipulation question.

Hervé Pagès hpages at fredhutch.org
Tue Jun 30 07:26:51 CEST 2015

Hi Nico,

It seems reasonable indeed to support rowRanges<- on
SummarizedExperiment0. It might be a little bit surprising for the
user that the setter changes the class of the object but it looks
like a perfectly legit situation for doing so here. Also there are
some precedents:

   > x <- 1:5
   > x[1] <- "a"
   > x
   [1] "a" "2" "3" "4" "5"


   dna <- DNAString("GGATTAAA")
   class(dna)  # DNAString
   masks(dna) <- Mask(length(dna), 2, 5)
   class(dna)  # MaskedDNAString

I'll add this, unless someone has a better idea?


On 06/29/2015 03:13 AM, Nicolas Delhomme wrote:
> Hej alla!
> In the simpleRNASeq function of the easyRNASeq package, I start by instantiating a SummarizedExperiment object not initially providing the rowRanges. This results in the creation of an object of the class SummarizedExperiment0. When later, once I have validated the annotation, I try to extend the rowRanges of my SummarizedExperiment object, I get an error message that "rowRanges<-" is not implemented for signature "SummarizedExperiment0, GRangesList".
> I'm now wondering if this has been omitted on purpose for SummarizedExperiment0 objects or is not yet implemented. The reason I'm wondering is because there is the possibility to cast a SummarizedExperiment0 object as a RangedSummarizedExperiment (which is my current work-around), but I'm wondering if that's the best way to go.
> I don't have access to my Rsession right now, so no sessionInfo(), but I'm using R3.2.1 on OSX 10.10.3 (Yosemite), and the latest devel packages (updated today; SummarizedExperiment version is 0.3.0).
> Cheers,
> Nico
> ---------------------------------------------------------------
> Nicolas Delhomme, PhD
> The Street Lab
> Department of Plant Physiology
> Umeå Plant Science Center
> Tel: +46 90 786 5478
> Email: nicolas.delhomme at umu.se
> SLU - Umeå universitet
> Umeå S-901 87 Sweden
> ---------------------------------------------------------------
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel

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

More information about the Bioc-devel mailing list