Skip to content

Replace lets-plot workarounds with native ggrust features - #76

Merged
Zaf4 merged 13 commits into
devfrom
claude/ggrust-phase4-092a17
Nov 6, 2026
Merged

Zaf4 merged 13 commits into
devfrom
claude/ggrust-phase4-092a17

Conversation

@Zaf4

@Zaf4 Zaf4 commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Replaces cellestial's lets-plot-era workarounds with native ggrust features (see ggrust's cellestial_workarounds.md), in four phases.

Changes

  1. Basics: ggrust goes from 0.3 to 0.6. Grid figures are read through grid.figures. UMAP arrows are now set in the theme (element_line(arrow=...)), which removes the _TIP_FRACTION hack.
  2. Dendrograms: dotplot, stacked_violin and the aggregated heatmap use scale_*_dendro. The per-cell heatmap keeps its hand-drawn tree.
  3. Brackets: statistics now come from stat_compare_means. Gate tests compare it against the old scipy code.
  4. annotated_heatmap: now a single ggside plot instead of a gggrid. Each track has its own fill scale and legend, and tracks zoom with the heatmap. New track_titles option, hidden by default.

Breaking (see CHANGELOG)

  • arrow_axis returns a theme. plot= and **geom_kwargs are removed, and linetype= is now its own parameter.
  • dendrogram_kwargs is removed. Dendrogram color and size now come from the theme's y-axis tick lines (axis_ticks_y).
  • setup_html is removed (ggrust 0.6 dropped LetsPlot).
  • bracket: small groups (n < 50) use the exact Wilcoxon test. "student" now means Welch's t-test. alternative, label_format, the prefix options and custom thresholds are removed; hide_ns remains.
  • annotated_heatmap returns one PlotSpec instead of a grid.

Tests

847 tests pass, plus 10 browser tests.

Not done

  • The outputs in notebooks/annotated_heatmap.ipynb haven't been re-run.
  • The README bracket image still shows the old labels.

🤖 Generated with Claude Code

Zaf4 and others added 12 commits November 6, 2026 00:47
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
arrow_axis and axis_type="arrow" now use element_line(arrow=, extent=) on
axis_line_x/axis_line_y instead of geom_path/geom_segment layers, dropping
the _TIP_FRACTION workaround. arrow_axis returns a theme: plot= and
**geom_kwargs are removed, linetype= is explicit. Sizes scale by 2.2 to
keep the former line width.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dotplot, stacked_violin, matrixplot and heatmap(aggregate=True) order and
draw the group tree with scale_y_dendro + guide_axis_dendro from scanpy's
linkage. dendrogram_color/size style the y tick line the tree is drawn with;
dendrogram_kwargs is removed. The per-cell heatmap keeps its path layer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ggrust 0.6 removes the LetsPlot shim, so cellestial drops its setup_html
alias and the no-op setup call made on import in IPython.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Large groups: p-values, none/bonferroni/BH adjustment and stars agree at
label precision. Differences: exact Wilcoxon below 50 tie-free values per
group, and ggrust's 'student' is Welch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bracket now draws stat_compare_means brackets; cellestial keeps the
comparison expansion, the observation check and the bracket heights.
Removed: test='student', alternative, label='padj' and label sequences,
label_format, prefix, prefix_style, separator, threshold (use hide_ns).
Small tie-free groups now get R's exact Wilcoxon test. The gate tests
now compare bracket labels with scipy references.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Annotation tracks become geom_xsidetile/geom_ysidetile side layers, each
with its own fill scale via new_scale_fill, so they share the heatmap's
axes and zoom with it in HTML output. The group dendrogram moves into the
observation side band as two-point side-line segments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Turned track names under a left or right band made the bottom axis area as
tall as the longest name, leaving an empty strip above the legends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The legends already name each track, so the band titles are off unless
track_titles=True, and the bands take no extra axis room.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ggside bands always draw their own axis line, at the side position= names,
even without breaks. Without titles the band axis now stays on the main
axes' sides, so no line is left above the left band.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 6, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

dotplot sized its labels with size_unit="x", which rendered them at a few
pixels; it now uses the absolute size stacked_violin already uses, and the
unused size-unit mode is removed. matrixplot's square raster cells make one
y unit one column wide, so the label padding now grows with the column count
instead of clipping labels on wide plots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Zaf4
Zaf4 merged commit 46e4fb7 into dev Nov 6, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant