ncountr 0.2.0
This release brings pathway-level analysis to ncountr and hardens the package with a comprehensive, multi-version test suite. It also corrects the package version: 0.1.0 was the last release on PyPI, but the code already self-identified as 0.2.0 — this release reconciles that.
nCounter studies usually have small sample sizes (n=3–12) where gene-level FDR correction returns nothing significant. The headline of 0.2.0 is a set of pathway-level methods built for exactly that regime. Those analysis features landed during development (commit 9c84e3d); the work since has been test hardening, bug fixes, and packaging correctness.
✨ New analysis features
- Permutation-based GSEA (Subramanian et al.) with exact enumeration for small n (≤10 total samples), plus a pre-ranked variant —
gsea,gsea_preranked. - Competitive gene-set test (CAMERA-like): Wilcoxon rank-sum on per-gene t-statistics, in-set vs out-of-set —
competitive_test. - Self-contained permutation test on pathway-score differences —
self_contained_test. - 12 built-in MSigDB Hallmark gene sets for immune/host-response panels, plus a GMT parser for custom sets —
load_gmt/save_gmt. - Effect-size reporting: Cohen's d with bootstrap CIs and rank-biserial correlation —
effect_sizes,de(effect_size=True). - ssGSEA single-sample pathway scoring.
- New figures: GSEA enrichment plot, GSEA dot plot, and effect-size volcano.
✅ Reliability & testing
- Test suite expanded from 150 → 291 tests, now covering every module (GSEA, pathway, effect sizes, gene sets, datasets, export/AnnData, GEO download, CLI, plotting, cross-platform). Coverage ~93%.
- CI runs the full matrix on Python 3.9, 3.10, 3.11, 3.12 and installs the
crossplatformextra, so the AnnData/scanpy code paths are actually exercised.
🐛 Bug fixes
- GSEA empty result:
competitive_test,self_contained_test, andgsea_prerankedcrashed withKeyError: 'pvalue'when no gene set passed the overlap filter — common on small panels. They now return a correctly-typed empty result. - matplotlib ≥3.11: the pathway box plot crashed because
boxplot(labels=…)was removed. Now usesset_xticklabels, compatible with matplotlib ≥3.5. - Python 3.9 CLI:
ncountr defailed with "No such command 'de'" under Click 8.1 (newest on 3.9), which doesn't strip the_cmdsuffix. The command name is now pinned explicitly.
📦 Packaging
- Version is single-sourced from
pyproject.toml(read at runtime viaimportlib.metadata), resolving the 0.1.0/0.2.0 mismatch so built artifacts report the correct version. A test guards against future drift.
Full changelog: v0.1.0...v0.2.0