[Bioc-devel] Why BiocGenerics (was Re: parallel package generics)

Martin Morgan mtmorgan at fhcrc.org
Thu Oct 25 21:43:49 CEST 2012


On 10/25/2012 07:53 PM, Cook, Malcolm wrote:
> Question: Why do we have BiocGenerics at all?
>
> I notice for instance that the definition of Reduce that it provides is different in only one respect from base::Reduce.

For most of the generics the motivation was different -- different packages 
would independently implement S4 generics and methods on them, the generics from 
different packages would mask one another, and the user would be confused when 
the wrong method was chosen.

This could still be a case of 'fix it upstream'. The upstream fix is to make S4 
generics of common / all functions. This has costs, in terms of performance and 
perhaps other issues. Also, the stats4 package is an attempt at an 'upstream' 
fix where common statistical functions are made into S4 generics.

It could be the case that some methods could be avoided by appropriate 
(re)-definition of the default.

Martin
-- 
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