Bioconductor / BiocGenerics

Defines many S4 generic functions used in Bioconductor
https://bioconductor.org/packages/BiocGenerics
11 stars 7 forks source link

Why S4 generics out of parallel's cluster functions? #9

Closed HenrikBengtsson closed 3 years ago

HenrikBengtsson commented 4 years ago

It was added eight years ago, but I'm curious what's the reason for making S4 generics out of the parallel functions https://github.com/Bioconductor/BiocGenerics/blob/master/R/clusterApply.R resulting in:

> library(BiocGenerics)
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, clusterExport, clusterMap, parApply,
    parCapply, parLapply, parLapplyLB, parRapply, parSapply, parSapplyLB

Is that really needed? Doesn't that just add unnecessary noise?

hpages commented 4 years ago

This predates the BiocParallel era. I suspect this is no longer needed (or was it ever?) so would gladly remove. But first:

  1. I want to check with @mtmorgan. Martin IIRC you wanted these generics at the time. We added them to BiocGenerics right after parallel came to existence and a few months before BiocParallel came to existence. I don't know if they are "used" (i.e. if methods are defined for them) in BiocParallel, or if there are any plans to use them at some point in the package.
  2. I'll need to grep the full Bioconductor base code to make sure nobody defines/uses methods for these generics.

In any case the removal won't happen before we start the BioC 3.13 devel cycle.

mtmorgan commented 4 years ago

I don't think BiocParallel uses these, and don't have any plans to write methods for them; I'm not sure where else they might have been needed.

hpages commented 3 years ago

I just removed all these generics. See commit bd8defbe5d691604954504f3237c00dc0c0cdfc2.