SCX
Single-cell format conversion, designed for reproducible benchmarks
SCX converts single-cell datasets between formats. It reads the count matrix as a stream of cell chunks and writes it out in another layout, so memory is bounded by the chunk size rather than the dataset. The engine is written in Rust and has three front ends that share its conversion semantics and defaults:
Install:
cargo install scx-cliStart with:
scx convert in.h5seurat out.h5adInstall:
pip install scx-picklerickStart with:
import picklerick as pk
pk.convert("in.h5seurat", "out.h5ad")Install (builds the engine from source, so it needs Rust’s cargo, CMake and a C/C++ compiler):
pak::pak("btraven00/scx/r/picklerick")Start with:
library(picklerick)
convert("in.h5seurat", "out.h5ad")Formats
| Format | Read | Write |
|---|---|---|
AnnData .h5ad |
✓ | ✓ |
| AnnData Zarr (v2, v3; directory) | ✓ | ✓ (v3) |
MuData .h5mu (one modality per conversion, picked with --assay) |
✓ | |
Seurat .h5seurat (dgCMatrix or BPCells-backed) |
✓ | ✓ |
| BPCells matrix directory | ✓ | ✓ X only |
10x HDF5 (Cell Ranger .h5) |
✓ | |
MatrixMarket .mtx[.gz] / 10x MEX directory |
✓ | |
Parquet, local or S3/GCS/HTTP (CLI built with --features net) |
✓ | |
Seurat .rds / .rda (counts and meta.data; v3/v4 Assay, v5 Assay5) |
✓ | |
bixverse binary sparse store, v3 and v4 (CLI built with --features bixverse) |
✓ |
Any readable format converts to any writable one: everything goes through a single internal representation. The input format is detected from the content; the output format from the extension (.h5ad, .h5seurat, .zarr, .bpcells).
Where to go next
- Convert between formats: the same conversion from the command line, Python and R, side by side.
- Stream a matrix in Python: process a matrix chunk by chunk, and read only the cells you select.
- Reading single-cell files in R: every format into a
SingleCellExperiment, aSeuratobject or a lazyDelayedMatrix. - Reference: command line, Python, R.