Skip to content

[Bioc-devel] Virtual class for `matrix` and `DelayedArray`? (or better strategy for dealing with them both)

2 messages · Elizabeth Purdom, Kasper Daniel Hansen

#
Thanks Herv? and Stephanie for your suggestions. I am really looking for a S4 methods solution however, given how my package is already set up. Also, I have several functions that I need to adapt in this way, so it seems cleaner and simpler to do the class union, which sounds like is not a problem  ? for Stephanie?s solution, for each function I?d have to write 2 S4methods and an internal function which feels more cluttered code to maintain for me. And it sounds like there?s not a virtual class I could use instead so I am correct to defining it myself. 

In terms of the setClassUnion, I chose ?DelayedArray? because I wanted to capture HDF5Matrix and DelayedMatrix, but I now see that HDF5Matrix inherits from DelayedMatrix. I must have missed that somehow. 

Thanks,
Elizabeth
#
We did this recently in minfi and getting acceptable performance was not
trivial. We are still sorting out issues; we will eventually write about
our experiences. Pete is working on some blog posts on this and we hope to
do something more formal later.

We would all love experience from more people on this, but just be aware
that right now it involves pain.

Best,
Kasper

On Wed, May 2, 2018 at 2:13 AM, Elizabeth Purdom <epurdom at stat.berkeley.edu>
wrote: