[Bioc-devel] plotPCA for BiocGenerics

davide risso risso.davide at gmail.com
Mon Oct 20 21:47:07 CEST 2014


Hi Kevin,

I don't agree. In the case of EDASeq (as I suppose it is the case for
DESeq/DESeq2) plotting the principal components of the count matrix is only
one of possible exploratory plots (RLE plots, MA plots, etc.).
So, in my opinion, it makes more sense from an object oriented point of
view to have multiple plotting methods for a single "RNA-seq experiment"
object.

In addition, this is the same strategy adopted elsewhere in Bioconductor,
e.g., for the plotMA method.

Just my two cents.

Best,
davide

On Mon, Oct 20, 2014 at 11:30 AM, Kevin Coombes <kevin.r.coombes at gmail.com>
wrote:

>  I understand that breaking code is a problem, and that is admittedly the
> main reason not to immediately adopt my suggestion.
>
> But as a purely logical exercise, creating a "PCA" object X or something
> similar and using either
>     plot(X)
> or
>     plot(as.PCA(mySpecialObject))
> is a much more sensible use of object-oriented programming/design. This
> requires no new generics (to write or to learn).
>
> And you could use it to transition away from the current system by
> convincing the various package maintainers to re-implement plotPCA as
> follows:
>
> plotPCA <- function(object, ...) {
>   plot(as.PCA(object), ...)
> }
>
> This would be relatively easy to eventually deprecate and teach users to
> switch to the alternative.
>
>
> On 10/20/2014 1:07 PM, Michael Love wrote:
>
>  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.coombes at gmail.com
> > wrote:
>
>> But shouldn't they all really just be named "plot" for the appropriate
>> objects?  In which case, there would already be a perfectly good generic....
>>  On Oct 20, 2014 10:27 AM, "Michael Love" <michaelisaiahlove at gmail.com>
>> wrote:
>>
>>>  I noticed that 'plotPCA' functions are defined in EDASeq, DESeq2,
>>> DESeq,
>>> affycoretools, Rcade, facopy, CopyNumber450k, netresponse, MAIT (maybe
>>> more).
>>>
>>> Sounds like a case for BiocGenerics.
>>>
>>> best,
>>>
>>> Mike
>>>
>>>          [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> Bioc-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>>
>>
>
>
>
> ------------------------------
>    <http://www.avast.com/>
>
> This email is free from viruses and malware because avast! Antivirus
> <http://www.avast.com/> protection is active.
>
>


-- 
Davide Risso, PhD
Post Doctoral Scholar
Division of Biostatistics
School of Public Health
University of California, Berkeley
344 Li Ka Shing Center, #3370
Berkeley, CA 94720-3370
E-mail: davide.risso at berkeley.edu

	[[alternative HTML version deleted]]



More information about the Bioc-devel mailing list