[Bioc-devel] BiocGenerics proposal

Kevin R. Coombes kevin.r.coombes at gmail.com
Mon Mar 5 18:15:46 CET 2012


By definition, you are unlikely to foresee all the needs of future 
authors who will use the generics.   I'll cast as many votes as I can 
get away with for just adding "..." everywhere.
     Kevin

On 3/5/2012 10:28 AM, Kasper Daniel Hansen wrote:
> I agree with Steve; we should have ... on all generics just in case.
>
> One disadvantage is that there is better argument checking without the
> ..., but I think we can live with that.  Steve's use case "I am now in
> a different situation from the original author and I need more
> flexibility" is, in my experience, not uncommon.
>
> Kasper
>
> On Mon, Mar 5, 2012 at 11:05 AM, Steve Lianoglou
> <mailinglist.honeypot at gmail.com>  wrote:
>> Hi,
>>
>> I think this has come up before (maybe even by me in some tangential
>> way (probably related to the strand generic)) but I think it would be
>> a "friendly" thing to do to define generics w/ the `...` argument
>> after all the args we *think* people might want to use, because we
>> can't really anticipate every way which people will eventually use
>> things.
>>
>> For instance, the `strand` generic is just `strand(x)`, and you might
>> say to yourself: "Self, when would you ever want to use the ... in a
>> call to strand?" and a voice from afar might say "You would never."
>>
>> But we know that we should never say never, and really ... is it any
>> skin off of our backs/noses to include this extra concession?
>>
>> I'm currently being bit by the `counts` generic in DE(X)Seq, which
>> I've defined in my own package but it takes extra args, now I've got
>> to go hacking my stuff, or hack the DEXSeq source to add a `...` to
>> its counts generic that I guess I need to import now.
>>
>> Now you say "why would you need extra args?"
>>
>> Then I'd say, just for example, "Imagine you had something like a
>> SummarizedExperiment-like object and you want the counts per 'event'
>> or summarized by 'gene'", so I have an option to pull a `counts(x,
>> by="gene")` maneuver.
>>
>> So:
>>
>> * How does the court feel about this general sentiment? Are there any
>> reasons to strongly *avoid* doing this?
>>
>> * Can we add `...` to the strand generic, eg:
>>   setGeneric("strand", function(x, ...) standardGeneric("strand"))
>>
>> * Can we add `counts(x, ...)` to BiocGenerics, while we're at it?
>>
>> Thanks,
>> -steve
>>
>> --
>> Steve Lianoglou
>> Graduate Student: Computational Systems Biology
>>   | Memorial Sloan-Kettering Cancer Center
>>   | Weill Medical College of Cornell University
>> Contact Info: http://cbio.mskcc.org/~lianos/contact
>>
>> _______________________________________________
>> Bioc-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel



More information about the Bioc-devel mailing list