Expand description
The single cell data layer: the bixverse binary sparse format, its
streaming readers and writers, and ingestion from h5ad, 10x h5 (feature
h5) and MTX.
§Feature flags
analysis(enabled by default) — Plotting helpers and synthetic data generators. Pulls inbixverse-core, and with itfaer, SIMD and nearest neighbour search. Switch it off for a reader that only needs the store formats.h5— The h5ad and 10x h5 readers and writers. Pulls in HDF5.hdf5-static— Compile the bundled HDF5 C library from source. Leave it off to link an external libhdf5 found viaHDF5_DIRor pkg-config, which is what the R package does on Windows:hdf5-metno-srcnames its output with the host toolchain’s convention, so an msvc host targeting gnu emitslibhdf5and the link fails.hdf5-filters— Compile the LZF (32000) and Blosc (32001) filters into the HDF5 build, so h5ad files written byhdf5pluginwith those codecs can be read. Both register throughH5Zregisterand never touch the HDF5 plugin path, which for ahdf5-metno-srcbuild points at a long gone cargoOUT_DIR. Blosc vendors c-blosc plus lz4, zlib and zstd, all built withcc. Snappy is left out on purpose. It is C++, and the R package links this staticlib without the C++ runtime. Filters outside these two (standalone zstd, bitshuffle, lz4, blosc2) raiseScDataErrors::UnsupportedH5Filter. Blosc with snappy passes that check, since the codec sits in the chunk header, and fails inH5Dreadwith c-blosc naming the missing compressor.parquet— Write the h5ad obs / var dataframes and the 10x barcodes and features to Parquet, for DuckDB to ingest withread_parquet. Pulls inparquetwithout arrow.
Modules§
- archive_
io - Cold-storage archive of the cell-based binary.
- bin_
merge_ io - Helpers for multi-file binary file merging. This is used to combine multiple SingleCells experiments on the R side. It enables the user to combine and merge several experiments.
- data_io
- Contains the streaming engine for bixverse single cell application. This has the structures for cells/spots and genes ready, plus various utilities, writers and readers.
- errors
- Errors raised by
bixverse-sc-data. - gene_
file_ io - Builds the gene-based (CSC) binary from the cell-based (CSR) one.
- h5_
10x_ adt_ io - Helper functions to specifically extract ADT counts from the h5 file. Can be theoretically used for other modalities, but it does return dense data!
- h5_
10x_ io - 10x CellRanger v2/v3 h5 ingestion. Streams the gene-expression modality to the bixverse binarised format. Other modalities (e.g. Antibody Capture) are filtered out here.
- h5_
10x_ multifile_ io - Multi-10x loading: scan multiple 10x CellRanger h5 files, apply global gene
QC, and write all cells into a single binary file. Mirrors the h5ad and mtx
multi-loader designs and reuses the 10x layout helpers from
h5_10x_io. - h5_
chunked - Parallel reads of gzip-compressed 1-D HDF5 datasets.
- h5_
filters - Filter pipeline checks for HDF5 inputs.
- h5ad_io
- Contains the h5ad-related parts to do read in data from h5ad files and transform them into the binarised files for usage in bixverse-rs.
- h5ad_
multifile_ io - Multi-h5ad loading: scan multiple h5ad files, apply global gene QC, and write all cells into a single binary file.
- in_
memory_ io - An in-memory
SingleCellReadingstore overCompressedSparseData2. - mtx_io
- Matrix Market (.mtx) ingestion into the bixverse cell store.
- mtx_
multifile_ io - Multi-mtx loading: scan multiple mtx files, apply global gene QC, and write all cells into a single binary file. Mirrors the h5ad multi-loader design.
- obs_
var_ io - Parquet export of the cell and feature metadata: the h5ad
obs/vardataframes and the 10x barcodes and features. DuckDB ingests the file withread_parquet, which replaces reading every column into R. - plotting
- Helpers to extract genes for plotting. Can densify raw and normalised counts, do Z-score normalisation for groups and caclulate proportion of cells.
- prelude
- Re-exports for
use crate::prelude::*: the sparse prelude (plus the core prelude underanalysis) and the single cell data layer. - r_
obj_ io - Contains the R-based reading in of data (for example for Seurat type files) to transform the counts into the binary Rust-based files.
- sc_
synthetic_ data - Contains helpers for the generation of synthetic data for testing algorithms. Has the option to create single cell-like data with defined cell types, optional batch effects and different cell abundance distributions per given sample, plus a DIALOGUE fixture carrying a planted multicellular programme.
- sc_
traits - Contains traits and their implementations, specifically designed for the single cell workflows in this crate.
- v4_io
- The v4 chunk encoding and the v3 -> v4 converters.
Constants§
- CELL_
BATCH_ SIZE - How many cells to read in per given batch - global constant
- SC_
FILE_ VERSION - Version of the single cell files writers emit: delta bit-packed chunks with the normalised layer recomputed on read.
- SC_
FILE_ VERSION_ V3 - Previous file version: absolute
u32indices, normalised layer stored. Readers still open it;v4_io::upgrade_store_to_v4converts it. - VERSION
- Version of this crate.