Skip to content

v0.2.0 — Pathway-level analysis, hardened and packaged

Latest

Choose a tag to compare

@princello princello released this 07 Jul 18:49
· 1 commit to main since this release

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 crossplatform extra, so the AnnData/scanpy code paths are actually exercised.

🐛 Bug fixes

  • GSEA empty result: competitive_test, self_contained_test, and gsea_preranked crashed with KeyError: '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 uses set_xticklabels, compatible with matplotlib ≥3.5.
  • Python 3.9 CLI: ncountr de failed with "No such command 'de'" under Click 8.1 (newest on 3.9), which doesn't strip the _cmd suffix. The command name is now pinned explicitly.

📦 Packaging

  • Version is single-sourced from pyproject.toml (read at runtime via importlib.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