Skip to content

shanuz v0.9.0 — reference mapping, spatial, scale, and five more milestones

Choose a tag to compare

@shanikawm shanikawm released this 26 Jul 19:43
· 73 commits to main since this release
96b2f8c

Six milestones' worth of work that had been sitting on main since 0.2.0, released in one jump: reference mapping, extra reductions, pseudobulk DE, spatial, scale, and the specialized assays — plus a breaking anchor/integration fix and the tutorial fidelity infrastructure (measured bands, staleness guards) that followed it. All of it was on main; as of this release, all of it is on PyPI.

Version jumps 0.2.0 → 0.9.0 to match the ROADMAP milestone number this release closes — a one-time coincidence, not a new versioning policy. See CHANGELOG.md for the complete, itemized list.

Highlights

Reference mapping, integration, anchors

  • find_transfer_anchors / map_query / transfer_data — label transfer via anchor projection.
  • Anchor scoring and filtering brought in line with Seurat's FindWeightsC/FindIntegrationAnchors: four-neighbour-table scoring, TopDimFeatures filtering, constant-feature dropping, exact-SVD PCA loadings.
  • Breaking: integrate_layers(method="cca"|"rpca") was running the wrong algorithm; RPCA now corrects onto the larger batch and closes most of its anchor-recall gap vs Seurat.

Extra reductions

  • run_ica, run_tsne, run_spca, glm_pca.
  • run_pca moved off sklearn's randomized SVD to an exact SVD, fixing drift in downstream reductions.

Pseudobulk DE

  • DESeq2-backed pseudobulk differential expression (find_markers(test_use="deseq2", ...)).
  • negbinom no longer runs a likelihood-ratio test against a moment-estimated dispersion.

Spatial

  • Visium loading defaults fixed: in-tissue filtering, lowres image, "slice1" image key regardless of which optional imaging package is installed.
  • Centroids now carries a radius; Segmentation polygons are closed; Moran's I uses Seurat's actual weight scheme.

Scale / out-of-core

  • LazyMatrix, a BPCells-comparable on-disk backend — five functions that used to densify an entire on-disk layer on read now stream it; object construction no longer forces materialization before analysis runs.

Specialized assays, cell hashing, Mixscape

  • Layered v5 Assay split/JoinLayers round-trips correctly; fetch_data addresses embedding columns and reads the right layer; the command log and orig.ident are populated.
  • Cell hashing (hto_demux, multiseq_demux) and Mixscape, verified against cross-species ground truth (99.81% call-concordant).

Also in this release

  • A documentation site: MkDocs + Material + mkdocstrings, published to genomicai.github.io/shanuz, generated from the same docstrings that carry the fidelity notes.
  • find_neighbors/find_clusters/run_umap graph fixes (directed KNN kept, SNN diagonal preserved, group_singletons) that closed a clustering divergence on integrated data.
  • leverage_score and sketch_data fixed to match Seurat's sketching path.
  • jack_straw null distribution rebuilt against a refit-per-replicate basis, matching ScoreJackStraw.

Install

pip install shanuz               # core
pip install "shanuz[analysis]"   # + clustering, UMAP/t-SNE, plotting, more DE tests
pip install "shanuz[all]"        # everything, incl. dev tooling

Notes

  • Python 3.12–3.13 (SPEC 0); 3.14 is blocked only by harmonypy's missing cp314 wheel.
  • 970 tests passing, 18 tutorials each checked side-by-side against real Seurat 5.5.1.