[Bioc-devel] BiocGenerics proposal

Hervé Pagès hpages at fhcrc.org
Mon Mar 5 20:24:50 CET 2012


Hi,

Sure, I'm for having ... in as many generics as possible. I complained
a long time ago about this on R-devel (I needed the ... arg to rev(),
which was never added, so I created my own reverse() generic in
IRanges).

I'll add ... to strand and `strand<-`.

Cheers,
H.


On 03/05/2012 09:20 AM, Tim Triche, Jr. wrote:
> +1 for this, has bitten me before, will be happy not to be bitten again
>
>
> On Mon, Mar 5, 2012 at 9:15 AM, Kevin R. Coombes
> <kevin.r.coombes at gmail.com>wrote:
>
>> 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<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<http://cbio.mskcc.org/~lianos/contact>
>>>>
>>>> ______________________________**_________________
>>>> Bioc-devel at r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/**listinfo/bioc-devel<https://stat.ethz.ch/mailman/listinfo/bioc-devel>
>>>>
>>> ______________________________**_________________
>>> Bioc-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/**listinfo/bioc-devel<https://stat.ethz.ch/mailman/listinfo/bioc-devel>
>>>
>>
>> ______________________________**_________________
>> Bioc-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/**listinfo/bioc-devel<https://stat.ethz.ch/mailman/listinfo/bioc-devel>
>>
>
>
>


-- 
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages at fhcrc.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



More information about the Bioc-devel mailing list