Re: [Bioc-devel] Listing package-specific methods

2016-06-27 Thread Michael Lawrence
There are two relevant queries:

1) What are the methods where at least one signature component is (or
extends) this class?
2) What are the methods for this class that are defined in a specific package?

#1 is along the lines of what Vince said. I prefer that definition,
because I often want to see the methods that are specific to the
semantics of the subclass. It does not matter which package implements
the methods. I think it could be supported via
methods(class="DESeqDataSet", inherit=FALSE). But we might want a more
convenient interface. Optionally displaying the signatures would also
be good.

One of the problems is that methods are not easily accessible objects
in the search path like ordinary functions. There is no equivalent of
ls(2), and it's tougher to retrieve the definition. Maybe the IDE
could help out? For example, when typing the name of a generic, in
addition to the prompt with argument names, it could list the methods.
Type-ahead could be smart enough to handle method selection. Or, one
could enter a symbol like `findOverlaps,Ranges,Ranges` but the search
would need to be dynamic to handle method selection.

Maybe the generic function could be modeled as a container of its
methods? Like findOverlaps$IRanges (second argument wildcard) or
findOverlaps$"IRanges,IRanges" to further restrict.  Doing the same
from the class perspective semantically clashes with S4. I just don't
like the IRanges$findOverlaps syntax. It also would require formal
treatment of constructors.



On Mon, Jun 27, 2016 at 9:39 AM, Michael Love
 wrote:
> hi,
>
> Following on a conversation from Bioc2016, I think it would be good to have
> a function available to Bioconductor users that helps in the following
> situation:
>
> I'm a user, trying out a new package 'foo', which defines the FooData
> class, that builds on top of SummarizedExperiment. The package author has
> defined a set of methods for the FooData class in the 'foo' package. From
> the R console, I want to see a list of these methods, but I don't want to
> look through the entire list of methods defined for SummarizedExperiment,
> Vector, and Annotated.
>
> I think such a function should live somewhere easily accessible for
> Bioconductor users. I worked out two implementations of this function which
> you can see here:
>
> http://rpubs.com/mikelove/pkgmethods
>
> [[alternative HTML version deleted]]
>
> ___
> Bioc-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] Listing package-specific methods

2016-06-27 Thread Michael Love
This seems like a pretty simple solution, so I like that :)

On Mon, Jun 27, 2016 at 10:46 AM, Hervé Pagès  wrote:

> Hi Mike,
>
> IIUC you want to do something like
>
>   setdiff(methods(class="DESeqDataSet"),
>   methods(class="RangedSummarizedExperiment"))
>
> Maybe this could be handled by methods() itself e.g. with
> an extra argument that lets the user choose if s/he wants to see
> all the methods (i.e. specific + inherited) or only the specific
> ones?
>
> H.
>
> On 06/27/2016 09:39 AM, Michael Love wrote:
>
>> hi,
>>
>> Following on a conversation from Bioc2016, I think it would be good to
>> have
>> a function available to Bioconductor users that helps in the following
>> situation:
>>
>> I'm a user, trying out a new package 'foo', which defines the FooData
>> class, that builds on top of SummarizedExperiment. The package author has
>> defined a set of methods for the FooData class in the 'foo' package. From
>> the R console, I want to see a list of these methods, but I don't want to
>> look through the entire list of methods defined for SummarizedExperiment,
>> Vector, and Annotated.
>>
>> I think such a function should live somewhere easily accessible for
>> Bioconductor users. I worked out two implementations of this function
>> which
>> you can see here:
>>
>> http://rpubs.com/mikelove/pkgmethods
>>
>> [[alternative HTML version deleted]]
>>
>> ___
>> Bioc-devel@r-project.org mailing list
>> 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: hpa...@fredhutch.org
> Phone:  (206) 667-5791
> Fax:(206) 667-1319
>

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Re: [Bioc-devel] Listing package-specific methods

2016-06-27 Thread Hervé Pagès

Hi Mike,

IIUC you want to do something like

  setdiff(methods(class="DESeqDataSet"),
  methods(class="RangedSummarizedExperiment"))

Maybe this could be handled by methods() itself e.g. with
an extra argument that lets the user choose if s/he wants to see
all the methods (i.e. specific + inherited) or only the specific
ones?

H.

On 06/27/2016 09:39 AM, Michael Love wrote:

hi,

Following on a conversation from Bioc2016, I think it would be good to have
a function available to Bioconductor users that helps in the following
situation:

I'm a user, trying out a new package 'foo', which defines the FooData
class, that builds on top of SummarizedExperiment. The package author has
defined a set of methods for the FooData class in the 'foo' package. From
the R console, I want to see a list of these methods, but I don't want to
look through the entire list of methods defined for SummarizedExperiment,
Vector, and Annotated.

I think such a function should live somewhere easily accessible for
Bioconductor users. I worked out two implementations of this function which
you can see here:

http://rpubs.com/mikelove/pkgmethods

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
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: hpa...@fredhutch.org
Phone:  (206) 667-5791
Fax:(206) 667-1319

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] Listing package-specific methods

2016-06-27 Thread Michael Love
1) I guess if someone else defined methods for the FooData class then those
could be of interest, but I think nearly all of the time I want to know
just what this specific package author has defined.

2) This is getting down to my (perhaps idiosyncratic) wants, but I would
like a quick and short printout to the console, so that I can recall the
names (maybe I just forgot) or to look up the man page. So the signatures
then just take up extra space IMO.

On Mon, Jun 27, 2016 at 10:08 AM, Vincent Carey 
wrote:

> 1) is the package connection key, or is it the 'directness' of the method
> in connection
>
> with the class of interest?  (sorry to be so vague, there must be a more
> scientific term...)
>
> 2) it seems useful to get the signature too.  this uses string operations
> to get at something that
>
> the class system likely "knows about" but seems to get close to your target
>
> > directMethods = function(cl) {
>
> +  grep(cl, methods(class=cl), value=TRUE)
>
> + }
>
> > directMethods(class(dds))
>
>  [1] "coef.DESeqDataSet"
>
>  [2] "coerce,DESeqDataSet,RangedSummarizedExperiment-method"
>
>  [3] "coerce<-,DESeqDataSet,RangedSummarizedExperiment-method"
>
>  [4] "counts,DESeqDataSet-method"
>
>  [5] "counts<-,DESeqDataSet,matrix-method"
>
>  [6] "design,DESeqDataSet-method"
>
>  [7] "design<-,DESeqDataSet,formula-method"
>
>  [8] "dispersionFunction,DESeqDataSet-method"
>
>  [9] "dispersionFunction<-,DESeqDataSet,function-method"
>
> [10] "dispersions,DESeqDataSet-method"
>
> [11] "dispersions<-,DESeqDataSet,numeric-method"
>
> [12] "estimateDispersions,DESeqDataSet-method"
>
> [13] "estimateSizeFactors,DESeqDataSet-method"
>
> [14] "normalizationFactors,DESeqDataSet-method"
>
> [15] "normalizationFactors<-,DESeqDataSet,matrix-method"
>
> [16] "plotDispEsts,DESeqDataSet-method"
>
> [17] "plotMA,DESeqDataSet-method"
>
> [18] "sizeFactors,DESeqDataSet-method"
>
> [19] "sizeFactors<-,DESeqDataSet,numeric-method"
>
> On Mon, Jun 27, 2016 at 9:39 AM, Michael Love  > wrote:
>
>> hi,
>>
>> Following on a conversation from Bioc2016, I think it would be good to
>> have
>> a function available to Bioconductor users that helps in the following
>> situation:
>>
>> I'm a user, trying out a new package 'foo', which defines the FooData
>> class, that builds on top of SummarizedExperiment. The package author has
>> defined a set of methods for the FooData class in the 'foo' package. From
>> the R console, I want to see a list of these methods, but I don't want to
>> look through the entire list of methods defined for SummarizedExperiment,
>> Vector, and Annotated.
>>
>> I think such a function should live somewhere easily accessible for
>> Bioconductor users. I worked out two implementations of this function
>> which
>> you can see here:
>>
>> http://rpubs.com/mikelove/pkgmethods
>>
>> [[alternative HTML version deleted]]
>>
>> ___
>> Bioc-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>
>
>

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] Listing package-specific methods

2016-06-27 Thread Vincent Carey
1) is the package connection key, or is it the 'directness' of the method
in connection

with the class of interest?  (sorry to be so vague, there must be a more
scientific term...)

2) it seems useful to get the signature too.  this uses string operations
to get at something that

the class system likely "knows about" but seems to get close to your target

> directMethods = function(cl) {

+  grep(cl, methods(class=cl), value=TRUE)

+ }

> directMethods(class(dds))

 [1] "coef.DESeqDataSet"

 [2] "coerce,DESeqDataSet,RangedSummarizedExperiment-method"

 [3] "coerce<-,DESeqDataSet,RangedSummarizedExperiment-method"

 [4] "counts,DESeqDataSet-method"

 [5] "counts<-,DESeqDataSet,matrix-method"

 [6] "design,DESeqDataSet-method"

 [7] "design<-,DESeqDataSet,formula-method"

 [8] "dispersionFunction,DESeqDataSet-method"

 [9] "dispersionFunction<-,DESeqDataSet,function-method"

[10] "dispersions,DESeqDataSet-method"

[11] "dispersions<-,DESeqDataSet,numeric-method"

[12] "estimateDispersions,DESeqDataSet-method"

[13] "estimateSizeFactors,DESeqDataSet-method"

[14] "normalizationFactors,DESeqDataSet-method"

[15] "normalizationFactors<-,DESeqDataSet,matrix-method"

[16] "plotDispEsts,DESeqDataSet-method"

[17] "plotMA,DESeqDataSet-method"

[18] "sizeFactors,DESeqDataSet-method"

[19] "sizeFactors<-,DESeqDataSet,numeric-method"

On Mon, Jun 27, 2016 at 9:39 AM, Michael Love 
wrote:

> hi,
>
> Following on a conversation from Bioc2016, I think it would be good to have
> a function available to Bioconductor users that helps in the following
> situation:
>
> I'm a user, trying out a new package 'foo', which defines the FooData
> class, that builds on top of SummarizedExperiment. The package author has
> defined a set of methods for the FooData class in the 'foo' package. From
> the R console, I want to see a list of these methods, but I don't want to
> look through the entire list of methods defined for SummarizedExperiment,
> Vector, and Annotated.
>
> I think such a function should live somewhere easily accessible for
> Bioconductor users. I worked out two implementations of this function which
> you can see here:
>
> http://rpubs.com/mikelove/pkgmethods
>
> [[alternative HTML version deleted]]
>
> ___
> Bioc-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


[Bioc-devel] Listing package-specific methods

2016-06-27 Thread Michael Love
hi,

Following on a conversation from Bioc2016, I think it would be good to have
a function available to Bioconductor users that helps in the following
situation:

I'm a user, trying out a new package 'foo', which defines the FooData
class, that builds on top of SummarizedExperiment. The package author has
defined a set of methods for the FooData class in the 'foo' package. From
the R console, I want to see a list of these methods, but I don't want to
look through the entire list of methods defined for SummarizedExperiment,
Vector, and Annotated.

I think such a function should live somewhere easily accessible for
Bioconductor users. I worked out two implementations of this function which
you can see here:

http://rpubs.com/mikelove/pkgmethods

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


[Bioc-devel] 15th Bioconductor birthday coming up

2016-06-27 Thread Steffen Neumann
Hi,

I was just digging up some stats on BioC, 
and I found in the SVN the first commit:

r21 | rgentlem | 2001-07-29 23:51:48 +0200 (So, 29 Jul 2001)

So we should not forget to celebrate the 15th anniversary 
in ~4 weeks this year, or put up blog posts somewhere. 

Other things you can learn from the treasure of SVN 
is that as of 27.06.2016 we had ~119.000 commits by 865 contributors,
so since 100k commits this took us a bit more than a year. 
https://stat.ethz.ch/pipermail/bioc-devel/2015-February/007024.html

If the pace continues, 2016 will see more commits 
than any previous year!

Yours,
Steffen

P.S.: Annual breakdown of commits into trunk/madman/Rpacks,
      I didn't look at the other branches which have a smaller,
      but >0 count of commits

   5570  2016
  10791  2015
   8838  2014
   8793  2013
   7584  2012
   7126  2011
   5438  2010
   5818  2009
   5271  2008
   4812  2007
   4076  2006
   3697  2005
   2663  2004
   2880  2003
   1565  2002
196  2001



-- 
IPB HalleAG Massenspektrometrie & Bioinformatik
Dr. Steffen Neumann  http://www.IPB-Halle.DE
Weinberg 3                   Tel. +49 (0) 345 5582 - 1470
06120 Halle                       +49 (0) 345 5582 - 0           
sneumann(at)IPB-Halle.DE Fax. +49 (0) 345 5582 - 1409

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel