Why a file format
An AnnData lives in memory, so peak memory scales with the number of cells.
A cytome file lives on disk, and PIASO
reads it in chunks — peak memory is set by the batch size instead.
The calls are nearly identical:
import cytome, piaso
cytome.from_10x_h5("filtered_feature_bc_matrix.h5", "sample.cytome")ds = cytome.open("sample.cytome")
piaso.pp.calculateCellMetrics(ds, modality="RNA")piaso.tl.infog(ds, modality="RNA", n_top_genes=3000, save_layer=True)piaso.tl.runSVD(ds, modality="RNA", layer="infog", n_components=50, key_added="X_svd")Results are written back onto the file, so reopening gives them all back with no recomputation and no export step.
| AnnData | cytome | |
|---|---|---|
| Matrix location | memory | disk, read in chunks |
| Peak memory | scales with cells | set by batch size |
| Good for | up to ~10⁵ cells | 10⁶+ cells, repeated analyses |
| Results | in the object | persisted on the file |
For a 10k-cell dataset either is fine and AnnData is simpler. The cytome path is what lets the same code run when the dataset is a hundred times larger.