The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Parallelize 'scuttle' functions

The 'scuttle' logo + The 'futurize' hexlogo = The 'future' logo

The futurize package allows you to easily turn sequential code into parallel code by piping the sequential code to the futurize() function. Easy!

TL;DR

library(futurize)
plan(multisession)
library(scuttle)

qc <- perFeatureQCMetrics(sce) |> futurize()

Introduction

This vignette demonstrates how to use this approach to parallelize the scuttle functions.

The scuttle Bioconductor package provides basic utility functions for single-cell RNA-seq data analysis, including quality control, normalization, and aggregation, which can be parallelized across cells or features.

Example: Computing per-feature QC metrics in parallel

The perFeatureQCMetrics() function computes quality control metrics for each feature (gene) in a SingleCellExperiment object:

library(scuttle)

# Simulate data
sce <- mockSCE()

qc <- perFeatureQCMetrics(sce)

Here perFeatureQCMetrics() runs sequentially, but we can easily make it run in parallel by piping to futurize():

library(futurize)

qc <- perFeatureQCMetrics(sce) |> futurize()

This will distribute the work across the available parallel workers, given that we have set up parallel workers, e.g.

plan(multisession)

The built-in multisession backend parallelizes on your local computer and works on all operating systems. There are other parallel backends to choose from, including alternatives to parallelize locally as well as distributed across remote machines, e.g.

plan(future.mirai::mirai_multisession)

and

plan(future.batchtools::batchtools_slurm)

Supported Functions

The following scuttle functions are supported by futurize():

The following scuttle functions are deprecated in scuttle (>= 1.22) in favor of counter-part functions in Bioconductor package scrapper. Support for futurize() of the these deprecated functions remains, but will be phased out;

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.