[Bioc-devel] cbind method / SummarizedExperiment

Martin Morgan mtmorgan at fhcrc.org
Wed Aug 20 21:30:27 CEST 2014


On 08/19/2014 08:50 AM, Hans-Ulrich Klein wrote:
> Hi all,
>
> I implemented a subclass of SummarizedExperiment from the GenomicRanges package.
> When I call cbind() on two objects of my subclass, I get an object of class
> SummarizedExperiment and not of my own class. So I have to re-implement cbind()
> in order to avoid this unwanted class coercing. This is not the case for, e.g.,
> combine() for class eSet. I am wondering whether it would make sense to change
> the implementation of cbind() (and also rbind() etc.) for SummarizedExperiment
> in order to make class inheritance more convenient?

Hi Hans -- Thanks for the report, this is fixed in 1.17.35 for cbind and rbind; 
if there are other methods with similar problems please don't hesitate to let us 
know.

 > A = setClass("A", contains="SummarizedExperiment")
 > class(cbind(A(), A()))
[1] "A"
attr(,"package")
[1] ".GlobalEnv"
 > class(rbind(A(), A()))
[1] "A"
attr(,"package")
[1] ".GlobalEnv"


Martin

>
> Best,
> Hans
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel


-- 
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the Bioc-devel mailing list