Re: [Bioc-devel] as.list of a GRanges

2018-02-19 Thread Hervé Pagès
Hi Renan, Most packages affected by these changes are packages that loop on the individual ranges of a GRanges object. They generally don't call as.list() directly but use something like lapply(), vapply(), sapply(), Map(), Reduce(), etc... All these functions indeed call as.list() internally on

Re: [Bioc-devel] as.list of a GRanges

2018-02-19 Thread Hervé Pagès
On 02/19/2018 06:43 AM, Michael Lawrence wrote: On Mon, Feb 19, 2018 at 2:10 AM, Bernat Gel > wrote: Hi Hervé, I completely agree with the goal of having the semantics of list-like operations standardised and documented to avoid surprises,

Re: [Bioc-devel] as.list of a GRanges

2018-02-19 Thread Michael Lawrence
On Mon, Feb 19, 2018 at 2:10 AM, Bernat Gel wrote: > Hi Hervé, > > I completely agree with the goal of having the semantics of list-like > operations standardised and documented to avoid surprises, and if to do so, > the current use of as.list must be changed I'm pefectly ok with

Re: [Bioc-devel] as.list of a GRanges

2018-02-19 Thread Bernat Gel
Hi Hervé, I completely agree with the goal of having the semantics of list-like operations standardised and documented to avoid surprises, and if to do so, the current use of as.list must be changed I'm pefectly ok with that. I had not seen the strange behaviour with IRanges, so I was not

Re: [Bioc-devel] as.list of a GRanges

2018-02-16 Thread Hervé Pagès
Hi Bernat, On 02/15/2018 11:57 PM, Bernat Gel wrote: Hi Hervé and others, Thanks for the responses. I woudn't call as.list() of a GRanges an "obscure behaviour" but more a "works as expected, even if not clearly documented" behaviour. Most users/developers will probably agree that

Re: [Bioc-devel] as.list of a GRanges

2018-02-16 Thread Kasper Daniel Hansen
This is one reason why I strongly advocate keeping NEWS up to date on the devel branch. Not that it would necessarily be easy for Nathan to track it down based on NEWS on all the packages he depends on. On Fri, Feb 16, 2018 at 10:25 AM, Nathan Sheffield wrote: > For

Re: [Bioc-devel] as.list of a GRanges

2018-02-16 Thread Renan Valieris
FWIW, this change also affects code that don't call as.list() explicitly. such as calling Reduce(union, granges), Reduce is implemented on base, and will call as.list() if the predicate isn't a vector already. I understand it wasn't intended to be used this way, but with this in mind there are

Re: [Bioc-devel] as.list of a GRanges

2018-02-16 Thread Nathan Sheffield
For what it's worth, my package (LOLA) was one that used as.list on a GRanges or GRangesList, and those calls were broken by changes to devel. Since I was also pushing changes at the time, I assumed the devel build errors were due to my updates -- I spent quite a bit of time trying to figure

Re: [Bioc-devel] as.list of a GRanges

2018-02-15 Thread Bernat Gel
Hi Hervé and others, Thanks for the responses. I woudn't call as.list() of a GRanges an "obscure behaviour" but more a "works as expected, even if not clearly documented" behaviour. In any case I can change the code to as(gr, "GRangesList") as suggested. Thanks again for the responses and

Re: [Bioc-devel] as.list of a GRanges

2018-02-15 Thread Hervé Pagès
On 02/15/2018 01:57 PM, Michael Lawrence wrote: On Thu, Feb 15, 2018 at 1:45 PM, Hervé Pagès > wrote: On 02/15/2018 11:53 AM, Cook, Malcolm wrote: Hi, Can I ask, is this change under discussion in current release or

Re: [Bioc-devel] as.list of a GRanges

2018-02-15 Thread Michael Lawrence
On Thu, Feb 15, 2018 at 1:45 PM, Hervé Pagès wrote: > On 02/15/2018 11:53 AM, Cook, Malcolm wrote: > >> Hi, >> >> Can I ask, is this change under discussion in current release or so far >> in Bioconductor devel only (my assumption)? >> > > Bioconductor devel only. > > >>

Re: [Bioc-devel] as.list of a GRanges

2018-02-15 Thread Hervé Pagès
On 02/15/2018 11:53 AM, Cook, Malcolm wrote: Hi, Can I ask, is this change under discussion in current release or so far in Bioconductor devel only (my assumption)? Bioconductor devel only. > On 02/15/2018 08:37 AM, Michael Lawrence wrote: > > So is as.list() no longer supported for

Re: [Bioc-devel] as.list of a GRanges

2018-02-15 Thread Michael Lawrence
On Thu, Feb 15, 2018 at 11:53 AM, Cook, Malcolm wrote: > Hi, > > Can I ask, is this change under discussion in current release or so far in > Bioconductor devel only (my assumption)? > > > On 02/15/2018 08:37 AM, Michael Lawrence wrote: > > > So is as.list() no longer

Re: [Bioc-devel] as.list of a GRanges

2018-02-15 Thread Cook, Malcolm
Hi, Can I ask, is this change under discussion in current release or so far in Bioconductor devel only (my assumption)? > On 02/15/2018 08:37 AM, Michael Lawrence wrote: > > So is as.list() no longer supported for GRanges objects? I have found it > > useful in places. > > Very few places.

Re: [Bioc-devel] as.list of a GRanges

2018-02-15 Thread Hervé Pagès
On 02/15/2018 08:37 AM, Michael Lawrence wrote: So is as.list() no longer supported for GRanges objects? I have found it useful in places. Very few places. I found a dozen of them in the entire software repo. Now you should use as.list(as(gr, "GRangesList")) instead. as.list() was behaving

Re: [Bioc-devel] as.list of a GRanges

2018-02-15 Thread Michael Lawrence
So is as.list() no longer supported for GRanges objects? I have found it useful in places. On Thu, Feb 15, 2018 at 8:30 AM, Hervé Pagès wrote: > Hi Bernat, > > Use as(gr, "GRangesList") instead of as.list() on your GRanges objects. > > Most of the times (e.g. for passing

Re: [Bioc-devel] as.list of a GRanges

2018-02-15 Thread Hervé Pagès
Hi Bernat, Use as(gr, "GRangesList") instead of as.list() on your GRanges objects. Most of the times (e.g. for passing to lapply() or mclapply()), you don't need an ordinary list, but, if you really want one, you can call as.list() on the GRangesList object returned by as(gr, "GRangesList").

[Bioc-devel] as.list of a GRanges

2018-02-15 Thread Bernat Gel
Hi, I'm having an error in the devel version of my package karyoploteR due to an error when converting a GRanges into a list of GRanges with "as.list". This used to be possible and it was working a few weeks ago. Am I suposed to use a different approach or is there a problem somewhere?