PIASO v1.1.0
Highlights
Faster gene set scoring via a new Rust backend, plus faster multi-batch GDR via ThreadPool parallelism. Backward-compatible.
What's New
Rust-Accelerated Scoring
- New
score_complete()in Rust (PyO3): fuses control gene sampling, sparse matrix multiplication, and column-wise reduction into a single pass - Releases the GIL during computation, enabling true thread-level parallelism
- LCG PRNG for deterministic control gene sampling (same seed per gene set)
- Automatically used when the Rust extension is available; falls back to Python otherwise
ThreadPoolExecutor for Multi-Batch Scoring
calculateScoreParallel_multiBatchnow processes batches concurrently usingThreadPoolExecutor(replaces sequential loop)- New
n_concurrent_batchesparameter inrunGDRParallel()for explicit control - Auto-parallelism via
_determine_parallelism(): balances inter-batch concurrency vs per-batch threads
Vectorized kNN Self-Loop Removal
_precompute_stats()kNN cleanup rewritten with numpy gather+shift- Eliminates Python list comprehension over all genes
Precomputed kNN
- New
precomputed_knnparameter inscore()— pass pre-built KDTree + indices to avoid redundant queries when scoring multiple gene sets on the same data
Build System
- Switched to maturin build backend for native Rust compilation during
pip install - Upgraded to PyO3 0.24 + numpy 0.24