[Bioc-devel] BiocGenerics proposal

Steve Lianoglou mailinglist.honeypot at gmail.com
Mon Mar 5 17:05:51 CET 2012


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

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.


* 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?


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

More information about the Bioc-devel mailing list