Re: [Bioc-devel] Hunting for the subset generic definition?

2015-07-29 Thread Hervé Pagès

Done in BiocGenerics 0.15.4.

H.

On 07/29/2015 11:00 AM, Hervé Pagès wrote:

Hi Steve,

On 07/29/2015 10:40 AM, Steve Lianoglou wrote:

Hi folks,

I'm looking to define a `subset` method on an S4 class of mine, but
can't find where to import the generic from.


That's because subset() is an implicit generic, that is, there is no
setGeneric statement for it, only setMethod statements. And so it's
automatically turned into a generic the first time a package with
a setMethod statement is loaded. More precisely, everything happens
as if setGeneric(subset) was called right before the first time
setMethod(subset, ...) is called.



I can't seem to find it anywhere in:

   * BiocGenerics
   * S4Vectors
   * XVector (

Even though S4Vectors has a:

   setMethod(subset, DataTable, ...)

It's not clear to me where it pulled the appropriate
`setGeneric(subset, ...)` from.


I believe that you need to import it from S4Vectors. But things are
going to be much clearer/cleaner if we make subset() an explicit
generic by adding setGeneric(subset) to BiocGenerics. Which I'm
going to do right now. Then you'll be able to import the subset()
generic from BiocGenerics.

Cheers,
H.



Can anyone provide a pointer?

Thanks,
-steve





--
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] Hunting for the subset generic definition?

2015-07-29 Thread Ryan C. Thompson

From base, according to my R console:

 subset
standardGeneric for subset defined from package base

function (x, ...)
standardGeneric(subset)
environment: 0x4eb60c8
Methods may be defined for arguments: x
Use  showMethods(subset)  for currently available ones.

On 07/29/2015 10:40 AM, Steve Lianoglou wrote:

Hi folks,

I'm looking to define a `subset` method on an S4 class of mine, but
can't find where to import the generic from.

I can't seem to find it anywhere in:

   * BiocGenerics
   * S4Vectors
   * XVector (

Even though S4Vectors has a:

   setMethod(subset, DataTable, ...)

It's not clear to me where it pulled the appropriate
`setGeneric(subset, ...)` from.

Can anyone provide a pointer?

Thanks,
-steve



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


Re: [Bioc-devel] Hunting for the subset generic definition?

2015-07-29 Thread Hervé Pagès

Hi Steve,

On 07/29/2015 10:40 AM, Steve Lianoglou wrote:

Hi folks,

I'm looking to define a `subset` method on an S4 class of mine, but
can't find where to import the generic from.


That's because subset() is an implicit generic, that is, there is no
setGeneric statement for it, only setMethod statements. And so it's
automatically turned into a generic the first time a package with
a setMethod statement is loaded. More precisely, everything happens
as if setGeneric(subset) was called right before the first time
setMethod(subset, ...) is called.



I can't seem to find it anywhere in:

   * BiocGenerics
   * S4Vectors
   * XVector (

Even though S4Vectors has a:

   setMethod(subset, DataTable, ...)

It's not clear to me where it pulled the appropriate
`setGeneric(subset, ...)` from.


I believe that you need to import it from S4Vectors. But things are
going to be much clearer/cleaner if we make subset() an explicit
generic by adding setGeneric(subset) to BiocGenerics. Which I'm
going to do right now. Then you'll be able to import the subset()
generic from BiocGenerics.

Cheers,
H.



Can anyone provide a pointer?

Thanks,
-steve



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