Re: [Bioc-devel] VariantAnnotation::VRanges() & defunct ifelse method for Rle objects in devel IRanges

2015-10-22 Thread Michael Lawrence
Just for the record, I've removed the usage of ifelse() by VRanges in release and devel. On Wed, Oct 21, 2015 at 6:50 AM, Robert Castelo wrote: > hi, > > one of the recent changes in the devel IRanges has been to defunct the > 'ifelse' method for 'Rle' objects. This was warned during the previou

Re: [Bioc-devel] VariantAnnotation::VRanges() & defunct ifelse method for Rle objects in devel IRanges

2015-10-22 Thread Robert Castelo
Michael, Hervé, thanks for your enlightening discussion about proper overload of base:: methods. I guess you're going to take action on the S4Vectors package (and not IRanges, as I wrongly put on the subject), right? i'm afraid i lack a full understanding of what are the best practices when

Re: [Bioc-devel] VariantAnnotation::VRanges() & defunct ifelse method for Rle objects in devel IRanges

2015-10-21 Thread Michael Lawrence
Ok, thanks. That's what R (in my working copy) basically does now. Since internal sub-assignment is vector-based, it just calls as.vector(). That vector may be subsequently "promoted" given the type of "x" and "value" (like integer to real, real to character, etc). So it could be optimized, but it

Re: [Bioc-devel] VariantAnnotation::VRanges() & defunct ifelse method for Rle objects in devel IRanges

2015-10-21 Thread Hervé Pagès
On 10/21/2015 03:36 PM, Michael Lawrence wrote: That sucks. I was thinking we could easily make R smarter about sub-assignment, so that base::ifelse would just work with value Rle, as would [<- in general. The C code would just call as.vector() on the object. The problem is that S4 objects are se

Re: [Bioc-devel] VariantAnnotation::VRanges() & defunct ifelse method for Rle objects in devel IRanges

2015-10-21 Thread Michael Lawrence
That sucks. I was thinking we could easily make R smarter about sub-assignment, so that base::ifelse would just work with value Rle, as would [<- in general. The C code would just call as.vector() on the object. The problem is that S4 objects are seen by that code as "scalar" and are wrapped in a l

Re: [Bioc-devel] VariantAnnotation::VRanges() & defunct ifelse method for Rle objects in devel IRanges

2015-10-21 Thread Hervé Pagès
Hi Michael, On 10/21/2015 07:09 AM, Michael Lawrence wrote: News to me. Why was this deprecated? Why can't the ifelse() method just do what it is now telling the user to do? Is it to make the inefficiency of the implementation more obvious? There was some discussion about this here: https:/

Re: [Bioc-devel] VariantAnnotation::VRanges() & defunct ifelse method for Rle objects in devel IRanges

2015-10-21 Thread Michael Lawrence
News to me. Why was this deprecated? Why can't the ifelse() method just do what it is now telling the user to do? Is it to make the inefficiency of the implementation more obvious? The goal with Rle was to make it behave as conveniently and as vector-like as possible. On Wed, Oct 21, 2015 at 6:5

[Bioc-devel] VariantAnnotation::VRanges() & defunct ifelse method for Rle objects in devel IRanges

2015-10-21 Thread Robert Castelo
hi, one of the recent changes in the devel IRanges has been to defunct the 'ifelse' method for 'Rle' objects. This was warned during the previous devel cycle and so it does with current release. One of the affected functions is the VRanges object constructor, 'VRanges()'. Since I use this fu