[BioC] Faster way to apply a function than endoapply on 40K GrangesList

Lakshmanan Iyer laxvid at gmail.com
Wed Aug 10 21:36:54 CEST 2011

I am trying to add 10K to the end of the intervals in a GRangesList
object using endoapply and flank using the comand:
p3UTRs10K <- endoapply(p3UTRs,function (z) flank (z, 10000,start=FALSE));

I am writing to find out if someone has a suggestion for a faster way
of doing this?  With 40000 elements it is taking a long time..

Here is what I am doing:

class (p3UTRs)
[1] "GRangesList"
[1] "GenomicRanges"

length (p3UTRs)
[1] 41053

p3UTRs10K <- endoapply(p3UTRs,function (z) flank (z, 10000,start=FALSE));

> sessionInfo()
R version 2.13.0 (2011-04-13)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
 [1] BSgenome.Mmusculus.UCSC.mm9_1.3.17 GenomicFeatures_1.4.0
 [3] leeBamViews_0.99.11                BSgenome_1.20.0
 [5] Biobase_2.12.1                     Rsamtools_1.4.1
 [7] Biostrings_2.20.0                  GenomicRanges_1.4.3
 [9] IRanges_1.10.0                     rtracklayer_1.12.0
[11] RCurl_1.5-0                        bitops_1.0-4.1

loaded via a namespace (and not attached):
[1] biomaRt_2.8.0 DBI_0.2-5     RSQLite_0.9-4 tools_2.13.0  XML_3.2-0

More information about the Bioconductor mailing list