Skip to content
Prev 4634 / 21312 Next

[Bioc-devel] [devteam-bioc] Very slow when operate GRangesList

Thanks Jianhong for reporting this.

Changes implemented in IRanges 1.19.27:
- RleList() constructor now has default 'compress=TRUE'.
- seqselect,Vector-method lapply() loop was replaced with direct subset.

New timings:

## generic subset function
fun0 <- function(x) x[500:1]

## GRangesList with RleList as metadata col
grll <- GRanges(seqnames="chr1",
                 IRanges(start=1:500, width=2),
                 someInfo=rep(RleList("*"), 500))
grr <- split(grll, 1:500)
 > microbenchmark(fun0(grr), times=10)
Unit: milliseconds
       expr      min       lq   median      uq      max neval
  fun0(grr) 28.88062 29.31157 30.58494 31.4393 32.26367    10

Median is now 0.031 seconds compared to the previous 1.635.
Valerie
On 08/23/2013 11:17 AM, Michael Lawrence wrote: