[BioC] [devteam-bioc] Worker count specification in functions using bplapply from the BiocParallel pkg

Martin Morgan mtmorgan at fhcrc.org
Thu Jun 5 20:40:49 CEST 2014


On 6/5/2014 11:32 AM, Maintainer wrote:
> This addresses functions summarizeOverlaps in GenomicAlignments and tallyVariants in VariantTools, and perhaps others, not BiocParallel, really, but only one CC: is available on this form.
>
> Those two functions invoke BiocParallel capabilities to use multiple cores when appropriate, much like mclapply in the parallel package. Like mclapply they identify and utilize all available cores by default. On a multi-user system that is frowned on.
>
> The tallyVariants argument list includes BPPARAM, I learned how to use that to specify the number of cores used (see code below).
>
> The help for summarizeOverlaps says "control parallel evaluation using the register interface in the
> BiocParallel package."  I looked into that, but not long enough to be able to set core number.  BPPARAM is not in the argument list.
>
> Controlling the number of cores used in an R session is important in my work environment. Functions invoking multiple cores should be clear about it in their help pages and provide an obvious way to control worker number.
>
> I don't think that's done with these two functions. Apologies if I'm not up to speed with developments, on asking for uniform specification of BiocParallel parameters in the argument list of functions using that package.
>

The idea is that BiocParallel maintains a registry (more like a queue) of 
BiocParallelParam instances, and it uses the first (most recently registered) as 
the default. So

   BiocParallel::register(MulticoreParam(workers=5))

and then summarizeOverlaps will use a multicore backe end with 5 workers.

I'll improve the documentation for summarizeOverlaps.

Martin

>
>
>
>
>
>
>
>
>
>
>   -- output of sessionInfo():
>
> BPPARAM=MulticoreParam(workers=5)
>
> --
> Sent via the guest posting facility at bioconductor.org.
>
> ________________________________________________________________________
> devteam-bioc mailing list
> To unsubscribe from this mailing list send a blank email to
> devteam-bioc-leave at lists.fhcrc.org
> You can also unsubscribe or change your personal options at
> https://lists.fhcrc.org/mailman/listinfo/devteam-bioc
>


-- 
Dr. Martin Morgan, PhD
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109



More information about the Bioconductor mailing list