Re: [Bioc-devel] plotPCA for BiocGenerics

2014-11-02 Thread Wolfgang Huber
Just to bring the discussion back to the fact that there is a need to do /something/. A function plotPCA is defined in packages EDASeq, DESeq2, DESeq, affycoretools, Rcade, facopy, CopyNumber450k, netresponse, MAIT, with a real potential for needless user confusion. And BiocGenerics already

Re: [Bioc-devel] plotPCA for BiocGenerics

2014-11-02 Thread Tim Triche, Jr.
whatever, here's a patch. If BiocGenerics had a GitHub repo I'd just submit a pull request. Bounce it or don't, it took 5 minutes of a Sunday morning for a non-core committer, so it must not be that hard to build a bikeshed after all. /s FWIW I once remarked to Robert Gentleman that it seemed

Re: [Bioc-devel] plotPCA for BiocGenerics

2014-11-02 Thread Michael Lawrence
On Sun, Nov 2, 2014 at 12:19 AM, Wolfgang Huber whu...@embl.de wrote: Just to bring the discussion back to the fact that there is a need to do /something/. A function plotPCA is defined in packages EDASeq, DESeq2, DESeq, affycoretools, Rcade, facopy, CopyNumber450k, netresponse, MAIT, with a

Re: [Bioc-devel] plotPCA for BiocGenerics

2014-11-01 Thread Michael Love
I guess I'm thinking now to move toward breaking up the PCA and plot in DESeq2, given that there is non-trivial computation going on, and then to leave plotPCA as a wrapper and to avoid breaking any user code. We had already moved this way a bit, in that in the current release, plotPCA has an

Re: [Bioc-devel] plotPCA for BiocGenerics

2014-11-01 Thread Kasper Daniel Hansen
I see the argument for separating plotting and computation. I don't see the argument for changing plotPCA to plot. base R has things that work either way; we all know hist(), boxplot() etc etc. And for this specific case there are (good) arguments for the fact that one could envision several

Re: [Bioc-devel] plotPCA for BiocGenerics

2014-10-31 Thread Thomas Lin Pedersen
With regards to abstraction - I would personally much rather read and write code that contained plotScores() and plotScree() etc. where the intend of the code is clearly communicated, instead of relying on a plot() function whose result is only known from experience. Trying to squeeze every

Re: [Bioc-devel] plotPCA for BiocGenerics

2014-10-31 Thread Steve Lianoglou
Hi, On Fri, Oct 31, 2014 at 2:35 PM, Thomas Lin Pedersen thomas...@gmail.com wrote: With regards to abstraction - I would personally much rather read and write code that contained plotScores() and plotScree() etc. where the intend of the code is clearly communicated, instead of relying on a

Re: [Bioc-devel] plotPCA for BiocGenerics

2014-10-21 Thread Thomas Dybdal Pedersen
While I tend to agree with you that PCA is too big an operation to be hidden within a plotting function (MDS is an edge-case I would say), I can’t see how we can ever reach a point where there is only one generic plot function. In the case of PCA there is a number of different plot-types that

Re: [Bioc-devel] plotPCA for BiocGenerics

2014-10-20 Thread Michael Love
hi Kevin, that would imply there is only one way to plot an object of a given class. Additionally, it would break a lot of code.​ best, Mike On Mon, Oct 20, 2014 at 12:50 PM, Kevin Coombes kevin.r.coom...@gmail.com wrote: But shouldn't they all really just be named plot for the appropriate

Re: [Bioc-devel] plotPCA for BiocGenerics

2014-10-20 Thread Michael Love
I agree it depends on programming style. But to continue with the example, it would have to be: plot(as.mySpecialObjectPCA(mySpecialObject)) because we have many packages here with their own functions. Wouldn't this just proliferate the number of classes instead of functions? For every type of

Re: [Bioc-devel] plotPCA for BiocGenerics

2014-10-20 Thread Kevin Coombes
Hi, It depends. The traditional R approach to these matters is that you (a) first perform some sort of an analysis and save the results as an object and then (b) show or plot what you got. It is part (b) that tends to be really generic, and (in my opinion) should have really generic names --

Re: [Bioc-devel] plotPCA for BiocGenerics

2014-10-20 Thread Kevin Coombes
Hi, I don't see how it needs more functions (as long as you can get developers to agree). Suppose that someone can define a reusable PCA class. This will contain a single plot generic function, defined once and reused by other classes. The existing plotPCA interface can also be implemented

Re: [Bioc-devel] plotPCA for BiocGenerics

2014-10-20 Thread Michael Love
Ah, I see now. Personally, I don't think Bioconductor developers should have to agree on single plotting functions for basic classes like 'PCA' (because this logic applies equally to the situation of all Bioconductor developers agreeing on single MA-plot, a single variance-mean plot, etc). I think

Re: [Bioc-devel] plotPCA for BiocGenerics

2014-10-20 Thread Kevin Coombes
Well. I have two responses to that. First, I think it would be a lot better/easier for users if (most) developers could make use of the same plot function for basic classes like PCA. Second, if you think the basic PCA plotting routine needs enhancements, you still have two options. On the