Skip to content

ARyaskov/kira-scg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kira-scg

kira-scg is a Rust CLI for preprocessing single-cell RNA-seq count matrices.

It currently covers:

  • loading 10x MTX bundles via kira-scio
  • QC metrics for cells and genes
  • cell/gene filtering
  • optional normalization (log1p after library-size scaling)
  • optional HVG selection (scanpy or kira mode)
  • optional PCA
  • optional AnnData .h5ad export

Requirements

  • Rust toolchain with rustc >= 1.95
  • HDF5/OpenBLAS system prerequisites depending on platform

Input

kira-scg expects a 10x-style directory. kira-scio resolves plain or gzipped files and supports prefixed file names.

Required dataset members:

  • matrix.mtx or matrix.mtx.gz
  • features.tsv or features.tsv.gz (fallback: genes.tsv / genes.tsv.gz)
  • barcodes.tsv or barcodes.tsv.gz

Commands

load

Reads input and writes load summary JSON.

kira-scg load --input /path/to/10x_dir --out stage1.json

Options:

  • --threads <N>: set Rayon global thread pool size (feature threads)

qc

Runs QC/filtering pipeline and writes summary JSON.

kira-scg qc \
  --input /path/to/10x_dir \
  --out qc.json \
  --min-genes 200 \
  --min-cells 3 \
  --max-mt 0.2 \
  --normalize \
  --scale-factor 10000 \
  --hvg-mode scanpy \
  --hvg-top 2000 \
  --hvg-bins 20 \
  --pca \
  --pca-components 50 \
  --pca-oversample 10 \
  --pca-power-iters 1 \
  --export-h5ad output.h5ad

Notes:

  • HVG is only executed when --normalize is enabled.
  • PCA requires HVG; running PCA without normalization/HVG returns an error.
  • --threads <N> is supported here too.

Runtime notes

  • Set KIRA_STATS=1 to print per-stage timings.
  • Matrix is stored internally as CSC (u32 indices, f32 values).
  • Load summary reports discovered matrix/features/barcodes paths.

About

Rust CLI for preprocessing single-cell RNA-seq count matrices.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages