Re: [Bioc-devel] Subsetting Lists by Lists

2014-04-03 Thread Hervé Pagès
Behalf Of Michael Lawrence >Sent: Tuesday, April 01, 2014 9:21 AM >To: bioc-devel@r-project.org <mailto:bioc-devel@r-project.org> <mailto:bioc-devel@r-project.__org <mailt

Re: [Bioc-devel] Subsetting Lists by Lists

2014-04-01 Thread Michael Lawrence
seq_len(pmin(__elementLengths(cvg), 5))] >> >> >>RleList of length 3 >>$chr1 >>integer-Rle of length 5 with 2 runs >> Lengths: 4 1 >> Values : 1 2 >> >> >>$chr2 >>integer-Rle of length

Re: [Bioc-devel] Subsetting Lists by Lists

2014-04-01 Thread Tim Triche, Jr.
Hi Herve, I think you read my mind. However, now I have managed to come to a slightly different bump. I don't want to use averaged values, per se (I think there's a UCSC tool of some sort that would do that), but rather I want to let Gviz or trackViewer plot both the individiual data points and

Re: [Bioc-devel] Subsetting Lists by Lists

2014-04-01 Thread Hervé Pagès
On 04/01/2014 10:40 AM, Tim Triche, Jr. wrote: Hi all, The following is tangentially related, but hopefully the answer will be useful to others (both directly and via my package, which prompts this)... Suppose I do this: dat <- GRangesList( lapply( bigWigFileNames, import, select

Re: [Bioc-devel] Subsetting Lists by Lists

2014-04-01 Thread Hervé Pagès
Hi Tim, There is probably too much guess work for me to really be able to help... However, and FWIW, in Bioc-devel the 'asRle' argument of import() has been replaced by the 'as' argument and it can be set to "GRanges", "RleList", or "NumericList". Be aware that, surprisingly, if you specify a 'se

Re: [Bioc-devel] Subsetting Lists by Lists

2014-04-01 Thread Hervé Pagès
nces@r-__project.org <mailto:bioc-devel-boun...@r-project.org>] On Behalf Of Michael Lawrence >Sent: Tuesday, April 01, 2014 9:21 AM >To: bioc-devel@r-project.org <mailto:bioc-devel@r-project.org> >Subjec

Re: [Bioc-devel] Subsetting Lists by Lists

2014-04-01 Thread Michael Lawrence
t; >> On Tue Apr 1 09:24:51 2014, Cook, Malcolm wrote: >> >>> in the mean time, >>> >>> lapply(`[`,x,IntegerList(1:5)) >>> >>> ?? >>> >>> >-Original Message- >>> >From: bioc-devel-boun...@r-p

Re: [Bioc-devel] Subsetting Lists by Lists

2014-04-01 Thread Hervé Pagès
gt;From: bioc-devel-boun...@r-project.org [mailto:bioc-devel-boun...@r-project.org] On Behalf Of Michael Lawrence >Sent: Tuesday, April 01, 2014 9:21 AM >To: bioc-devel@r-project.org >Subject: [Bioc-devel] Subsetting Lists by Lists > >Mostly to Herve: > >Sometimes we want

Re: [Bioc-devel] Subsetting Lists by Lists

2014-04-01 Thread Hervé Pagès
Hi Michael, On 04/01/2014 07:21 AM, Michael Lawrence wrote: Mostly to Herve: Sometimes we want to pluck the first 1, or 10, or whatever elements from each element of a list. If I had a list 'x', I thought I could do this with: x[IntegerList(1:5)] But it only gives elements 1:5 from x[[1]], no

Re: [Bioc-devel] Subsetting Lists by Lists

2014-04-01 Thread Tim Triche, Jr.
Hi all, The following is tangentially related, but hopefully the answer will be useful to others (both directly and via my package, which prompts this)... Suppose I do this: dat <- GRangesList( lapply( bigWigFileNames, import, selection=someRanges ) ) Now I have a GRangesList of

Re: [Bioc-devel] Subsetting Lists by Lists

2014-04-01 Thread Ryan
:bioc-devel-boun...@r-project.org] On Behalf Of Michael Lawrence >Sent: Tuesday, April 01, 2014 9:21 AM >To: bioc-devel@r-project.org >Subject: [Bioc-devel] Subsetting Lists by Lists > >Mostly to Herve: > >Sometimes we want to pluck the first 1, or 10, or whatever

Re: [Bioc-devel] Subsetting Lists by Lists

2014-04-01 Thread Cook, Malcolm
bject: [Bioc-devel] Subsetting Lists by Lists > >Mostly to Herve: > >Sometimes we want to pluck the first 1, or 10, or whatever elements from >each element of a list. If I had a list 'x', I thought I could do this with: > >x[IntegerList(1:5)] > >But it only

[Bioc-devel] Subsetting Lists by Lists

2014-04-01 Thread Michael Lawrence
Mostly to Herve: Sometimes we want to pluck the first 1, or 10, or whatever elements from each element of a list. If I had a list 'x', I thought I could do this with: x[IntegerList(1:5)] But it only gives elements 1:5 from x[[1]], not each element of 'x'. In other words, I thought the index woul