You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Convert: MTX and 10x MTX folders, import and export (streaming) #24
A bare .mtx file, with optional --obs-names-file / --var-names-file.
Orientation: 10x/STARsolo are genes × cells (transposed on read); --transpose / --no-transpose override.
Make it streaming.formats/sparse._read_mtx currently builds a Python list of every entry — unusable for large files. Replace with:
pass 1: stream the file (gzip as a stream), count nnz per output row → indptr
pass 2: scatter entries into preallocated on-disk indices/data, buffered in chunks
sort indices within rows only if the file isn't already ordered
The same reader should back adata import sparse, which benefits too.
Export
h5ad → 10x v3 folder with gzipped files: extend formats/sparse.export_mtx and write barcodes.tsv.gz / features.tsv.gz from obs / var. --layer picks the matrix.
Tests
Fixtures for Cell Ranger 2, Cell Ranger 3, STARsolo (incl. velocyto) and a bare mtx.
Compare with scanpy.read_10x_mtx / read_mtx (integration marker).
Perf guard bounding reads/writes for the two-pass import.
Activity
adata convertto and from h5ad/zarr #20