Skip to content
Prev 20429 / 21312 Next

[Bioc-devel] Question relating to extending a class and inclusion of data

Hi,
On 5/21/24 01:58, Vilhelm Suksi wrote:
Since you already have a user base, you will need a roadmap for the 
transition from Metaboset to MetaboExperiment. Bioconductor has a 
6-month release cycle that facilitates this. More on this below.
It's better to define your own SummarizedExperiment extension with the 
three additional slots. This way you will have a container 
(MetaboExperiment) that is semantically equivalent (or close) to 
Metaboset. Which means that: (1) in principle you won't need to modify 
the interface of your existing functions, and (2) you'll be able to 
provide coercion methods to go back and forth between the 
MetaboExperiment and Metaboset representations (see ?setAs). Overall 
this should make the transition from Metaboset to MetaboExperiment 
easier/smoother.

This transition would roughly look something like this:

1. Submit theMetaboset-based version of the package for inclusion in 
BioC 3.20.

2. After the 3.20 release (next Fall), make the following changes in the 
devel branch of the package:

- Implement the MetaboExperiment class + accessors (getters/setters) + 
constructor function(s) + show() method.

- Implement the coercion methods to go from Metaboset to 
MetaboExperiment and vice-versa.

- Modify the implementation of all the functions that deal with 
Metaboset objects to deal with MetaboExperiment objects. This will be 
the primary representation that they handle. If they receive a 
Metaboset, they will immediately replace it with a MetaboExperiment 
using as(..., "MetaboExperiment").

- Modify all the documentation, unit tests, and serialized objects 
accordingly.

3. Now you are ready to deprecate the Metaboset class. I recommend that 
you also do this in the devel branch before the 3.21 release. There are 
no well established guidelines to deprecate an S4 class. I recommend 
that you use .Deprecated() to display a deprecation message in its 
show() method, constructor function(s), getters/setters, and coercion 
method from MetaboExperiment to Metaboset.

4. After the 3.21 release (Spring 2025), make the Metaboset class 
defunct by replacing all the .Deprecated() calls with .Defunct() calls.
I'm not sure I fully understand the question (or its connection with 
Excel) but yes you can include unrealistic data in the package. As long 
as it allows you to properly illustrate the basic usage of your 
functions in the man pages and/or vignette(s). It can also be useful to 
have small (and unrealistic) data for the unit tests. The important 
thing here is that the data must be small.
It depends on the size of the data. For a software package, we limit the 
size of the source tarball to 5G. So if you're going to exceed that 
limit then the datasets need to go in an experiment data package.
The availability of the original data is not strictly necessary but the 
data still needs to be documented i.e. what's its nature, where it's 
coming from, how it was imported/transformed, etc...

Best,

H.