brisc#

brisc brisc

brisc is a high-performance library for analyzing single-cell data at scale. It prioritizes running as fast as possible on multi-core CPU systems, strict reproducibility, and a clean, user-friendly interface. On datasets of 1 to 20 million cells, it cuts the runtime of common workflows from hours to minutes. Get started.

Blazing fast

Achieved through ground-up optimization of core algorithms and effective parallelism.

Deterministic

Every step gives floating-point identical results between runs, regardless of the number of threads used.

Complete toolkit

Supports preprocessing, dimensionality reduction, harmonization, label transfer, clustering, embedding, pseudobulk differential expression, and plotting.

Interoperable

Reads and writes .h5ad, .rds, .h5Seurat, and 10x files; supports interleaving Python and R analyses via ryp without intermediate writes to disk.

Memory-efficient

Uses ~2× lower peak memory usage than Scanpy by tabulating which cells pass QC, instead of subsetting to them.

User-friendly

Features sensible defaults, strict type-checking, and solution-focused error messages.

Performance · 10M cells · Parse Biosciences PBMC
192 CPUs, 755 GB RAM
Basic workflow
from brisc import SingleCell


sc = SingleCell('data.h5ad')\
  .qc()\
  .hvg(batch_column='sample')\
  .normalize()\
  .pca()\
  .neighbors()\
  .shared_neighbors()\
  .cluster(resolution=[0.25, 0.5, 1, 1.5, 2])\
  .pacmap()
Label transfer
from brisc import SingleCell


sc_ref = SingleCell('data_ref.h5ad').qc()
sc_query = SingleCell('data_query.h5ad').qc()
sc_ref, sc_query = sc_ref.hvg(sc_query)
sc_ref = sc_ref.normalize()
sc_query = sc_query.normalize()
sc_ref, sc_query = sc_ref.pca(sc_query)
sc_ref, sc_query = sc_ref.harmonize(sc_query)
sc_query = sc_query.label_transfer_from(
  sc_ref, 'cell_type')
Pseudobulk differential expression
from brisc import SingleCell


pb = SingleCell('data.h5ad')\
  .qc()\
  .pseudobulk('sample', 'cell_type')
de = pb\
  .qc('condition')\
  .library_size()\
  .DE('~ condition + sex + pmi',
      group='condition',
      categorical_columns=['condition', 'sex'])