[BioC] multicore and GRangesList [Resurrected]

Martin Morgan mtmorgan at fhcrc.org
Thu Sep 20 15:11:16 CEST 2012


On 09/19/2012 09:30 AM, Cook, Malcolm wrote:
> The question of approaches to parallelizing operations on a GRangesList was raised in this thread:  http://thread.gmane.org/gmane.science.biology.informatics.conductor/32799
>
> I find the issue still relevant when using the new `parallel` package.
>
> I have adopted the following practice, for which I seek your criticism or accolades.  Your choice.
>
> The approach is to use parallel::pvec over the indices of the GRangesList, with a little sugar in the form of...
>
> pvec_along <-function(x,FUN,...) {
> ### PURPOSE: extension to parallel::pvec for non-vectors which is
> ### vectorized over the indices of x.
> ###
> ### Example: pvec_along(myGRangesList,width)
> ###
> ### Requires: `library(functional)` `library(parallel)`
>    indices<-seq_along(x)
>    FUN<-match.fun(FUN)
>    pvec(indices,Compose(Curry(`[`,x),FUN),...)
> }
>
> Discuss?

pvec seems conceptually relevant; the benefits of the functional stuff 
not immediately clear. Explain.

>
> Best,
>
> ~ Malcolm Cook
>


-- 
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the Bioconductor mailing list