Re: [Bioc-devel] coverage(gr, weight='score') does not work when score(gr) is an Rle

2015-04-20 Thread Hervé Pagès
Hi, On 04/17/2015 09:42 AM, Hervé Pagès wrote: Hi, I think we should just expand the Rle internally. That will produce a numeric vector of the length of the GRanges i.e. it will be the same size as the start and end components of the GRanges object itself. No big deal at all. I'll make that ch

Re: [Bioc-devel] coverage(gr, weight='score') does not work when score(gr) is an Rle

2015-04-17 Thread Michael Lawrence
Sorry, I was confused. You're right, there's not much point in keeping it compressed. On Fri, Apr 17, 2015 at 10:14 AM, Hervé Pagès wrote: > On 04/17/2015 10:00 AM, Michael Lawrence wrote: > >> Is that the case here? He has an Rle as an mcol in the GRanges, so in >> general expanding it will not

Re: [Bioc-devel] coverage(gr, weight='score') does not work when score(gr) is an Rle

2015-04-17 Thread Hervé Pagès
On 04/17/2015 10:00 AM, Michael Lawrence wrote: Is that the case here? He has an Rle as an mcol in the GRanges, so in general expanding it will not align with the other components. Not sure what you mean. Can you give an example? H. On Fri, Apr 17, 2015 at 9:42 AM, Hervé Pagès mailto:hpa...

Re: [Bioc-devel] coverage(gr, weight='score') does not work when score(gr) is an Rle

2015-04-17 Thread Michael Lawrence
Is that the case here? He has an Rle as an mcol in the GRanges, so in general expanding it will not align with the other components. On Fri, Apr 17, 2015 at 9:42 AM, Hervé Pagès wrote: > Hi, > > I think we should just expand the Rle internally. That will produce > a numeric vector of the length

Re: [Bioc-devel] coverage(gr, weight='score') does not work when score(gr) is an Rle

2015-04-17 Thread Hervé Pagès
Hi, I think we should just expand the Rle internally. That will produce a numeric vector of the length of the GRanges i.e. it will be the same size as the start and end components of the GRanges object itself. No big deal at all. I'll make that change. H. On 04/17/2015 09:00 AM, Michael Lawren

Re: [Bioc-devel] coverage(gr, weight='score') does not work when score(gr) is an Rle

2015-04-17 Thread Michael Lawrence
Ideally it should be supported, but it would take some work as the coverage stuff is all in C. Could you give more details on your use case? For example, if you already have a range for every position on the chromosome, you could just extract the score column. I'm guessing it's more complicated tha

[Bioc-devel] coverage(gr, weight='score') does not work when score(gr) is an Rle

2015-04-17 Thread Philip Lijnzaad
Dear all, I'm puzzled by the following behaviour: Given n <- 10 gr <- GRanges(seqnames=Rle('A', n), ranges=IRanges(1:n, width=1), score=Rle(5,n)) If I do coverage(gr,weight='score') I get Error in .normarg_shift_or_weight(weight, "weight",