BiocDuckDB

High-level Bioconductor integration for DuckDB-backed data — read and write Experiment objects as Parquet, analyze them on disk.

Overview

BiocDuckDB is the integration layer of the BiocDuckDB suite. It brings together DuckDBDataFrame, DuckDBArray, and DuckDBGRanges to provide:

The on-disk format is a Frictionless Data Package, readable by other tools and languages, not just R.

Installation

# once available from Bioconductor:
if (!require("BiocManager")) install.packages("BiocManager")
BiocManager::install("BiocDuckDB")

Quick start

library(BiocDuckDB)
library(SummarizedExperiment)

data(airway, package = "airway")

# write to Parquet, read back as DuckDB-backed
path <- file.path(tempdir(), "airway_se")
writeParquet(airway, path)
se <- readParquet(path)

assay(se, "counts")                 # a DuckDBArray, on disk
colSums(assay(se[1:1000, ], "counts"))   # pushed to SQL

Many scran/scuttle steps run directly on the DuckDB-backed matrix:

library(scuttle)
perCellQCMetrics(assay(se, "counts"))    # SQL-optimized, no realization

The filter, realize, analyze pattern

For data larger than memory: filter and summarize on disk with DuckDB, realize the manageable subset into memory, run the standard pipeline, and persist results back to Parquet. See the Introduction to BiocDuckDB vignette.

Documentation

License

MIT License. Copyright Genentech, Inc., 2026. See inst/COPYRIGHTS for bundled third-party schema components.