2 Parallelization

Whenever possible, CopyKit uses the BiocParallel framework.

Running parallel processes is highly recommended to speed up CopyKit calculations.

Make sure to read the BiocParallel vignette to choose the best parameters for your machine and OS.

Use BiocParallel::register() function to register the number of workers (threads) desired. To visually monitor the progress, you can use the argument progressbar.

library(BiocParallel)
register(MulticoreParam(progressbar = T, workers = 8), default = T)

Confirm parameters:

BiocParallel::bpparam()

Note about plotHeatmap() function parallelization: plotHeatmap() uses a different framework and requires the argument n_threads to set the number of threads when in use with the argument order_cells = hclust. This is to speed up the calculation of a distance matrix. Using more threads when ordering the heatmap with hclust will significantly speed up the plotting of the heatmap. See example in plotHeatmap help.