Skip to content

Commit 6b38fd8

Browse files
Arvindiyerclaude
andcommitted
docs: extend introduction tutorial with new plotting functions, bump to 0.3.0
The introduction tutorial only demonstrated obs_exp_scatter and ridge_plot_ed. Added sections (executed against the bundled LUAD data) for significance_heatmap, oncoprint, oncoprint_pair, and ridge_plot_ed_compare (the last using an illustrative second selectX run since the bundled data is a single cohort -- real usage would compare two cohorts/timepoints). Bumps version to 0.3.0 for this round's jax-backend removal (a breaking change to null_model_parallel's public API), estimate_p_val's parameter rename, and the new features. NEWS.md has the full changelog. CITATION.cff's version/date-released are left as-is -- those describe an actual tagged release, not yet cut. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g7ADBXHN2yWDkf2NPyNm3
1 parent fe67c4d commit 6b38fd8

5 files changed

Lines changed: 286 additions & 46 deletions

File tree

‎NEWS.md‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,50 @@ Initial feature-complete Python port of the [SelectSim R package](https://github
5555
documentation, and uv migration) was developed with the assistance of
5656
Claude Code (Anthropic), directed and verified by Arvind Iyer throughout;
5757
see `git log` for detailed commit history.
58+
59+
# SelectSim (Python) 0.3.0
60+
61+
* **Performance**: the default numpy null-model backend
62+
(`null_model_parallel`, `store="memory"` or `"zarr"`) no longer loops
63+
over genes in Python to pick each row's top-k residual columns;
64+
it now uses the same vectorized double-argsort rank trick the (now
65+
removed) jax backend used, with no per-gene Python loop. Benchmarked
66+
as bit-identical to the old implementation (full R-parity test suite
67+
still passes) and consistently faster, especially at higher `n_cores`.
68+
* **Performance**: `store="zarr"` null-model runs now chunk the on-disk
69+
Zarr array to match the internal write-batch size instead of
70+
defaulting to one chunk per permutation; writing in batches of 200
71+
(the default) previously forced 200 separate compress/write calls per
72+
batch. Benchmarked at ~2.5x faster zarr writes in isolation.
73+
* **Performance**: `estimate_p_val`'s `gene_names: List[str]` parameter
74+
is now `gene_index: Dict[str, int]` -- callers looking up many pairs
75+
(as `estimate_pairwise_p` does, used when `estimate_pairwise=True`)
76+
now build the name-to-index mapping once instead of doing an O(n_genes)
77+
list scan per gene per pair.
78+
* **Removed**: the jax null-model backend (`backend="jax"` on
79+
`null_model_parallel`, the `selectsim[fast]` extra). Benchmarked
80+
against the numpy backend on real LUAD-sized data on CPU (no GPU):
81+
jax was consistently 5-10x *slower*, dominated by per-call JIT
82+
dispatch overhead that this workload's array sizes never amortize.
83+
If GPU-backed acceleration is needed in the future, it should be
84+
re-evaluated against the current (vectorized) numpy backend on
85+
representative GPU hardware, not reintroduced by default.
86+
* **Fixed**: `significance_heatmap` was implemented and tested but never
87+
exported from the top-level `selectsim` package (only reachable via
88+
`selectsim.plotting.significance_heatmap`); it's now `ss.significance_heatmap`.
89+
* Added `null_model_parallel`/`selectX` `store="auto"`: estimates the
90+
null model's memory footprint from cohort size and `n_permut` and
91+
picks `"memory"` or `"zarr"` automatically against a detected (or
92+
configured, `memory_budget_gb`) RAM budget, so one call scales safely
93+
across machines without the caller needing to know cohort dimensions
94+
up front.
95+
* Added `oncoprint` and `oncoprint_pair`: new (not present in the R
96+
package) multi-gene and two-gene co-mutation visualizations comparing
97+
the observed alteration pattern to a retained null-model simulation,
98+
with a per-sample TMB track.
99+
* Extended the `introduction` tutorial notebook with `significance_heatmap`,
100+
`oncoprint`, `oncoprint_pair`, and `ridge_plot_ed_compare` (previously
101+
only `obs_exp_scatter` and `ridge_plot_ed` were demonstrated).
102+
* This round of work was developed with the assistance of Claude Code
103+
(Anthropic), directed and verified by Arvind Iyer throughout; see
104+
`git log` for detailed commit history.

‎docs/source/conf.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
project = 'SelectSim'
1414
copyright = '2026, Arvind Iyer, Marco Mina, Miljan Petrovic, Giovanni Ciriello'
1515
author = 'Arvind Iyer, Marco Mina, Miljan Petrovic, Giovanni Ciriello'
16-
release = '0.2.0'
16+
release = '0.3.0'
1717

1818
# -- General configuration ---------------------------------------------------
1919
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

‎docs/source/tutorials/introduction.ipynb‎

Lines changed: 236 additions & 43 deletions
Large diffs are not rendered by default.

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "selectsim"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
description = "A python package that implements the SelectSim algorithm"
55
authors = [
66
{ name = "Arvind Iyer", email = "ayalurarvind@gmail.com" },

‎selectsim/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
open_zarr_store
6767
)
6868

69-
__version__ = "0.2.0"
69+
__version__ = "0.3.0"
7070

7171
__all__ = [
7272
# Main function

0 commit comments

Comments
 (0)