Skip to content

docs: refresh DE docstring pseudobulk examples#996

Merged
Zethson merged 3 commits into
mainfrom
fix/de-docstring-pseudobulk-examples
May 25, 2026
Merged

docs: refresh DE docstring pseudobulk examples#996
Zethson merged 3 commits into
mainfrom
fix/de-docstring-pseudobulk-examples

Conversation

@Zethson
Copy link
Copy Markdown
Member

@Zethson Zethson commented May 25, 2026

Summary

Two small docs-only changes tied together by issue #615:

  1. DE docstring examples: refresh the Examples blocks in pertpy/tools/_differential_gene_expression/_base.py (5 occurrences across EdgeR/PyDESeq2 plot and compare_groups docstrings) so they use the current PseudobulkSpace.compute(...) signature. The previous examples passed the long-removed min_cells=10/min_counts=1000 kwargs, so anyone copy-pasting them hit TypeError: compute() got an unexpected keyword argument 'min_cells'. Reported by @mschilli87 in Improve DE tutorial #615.
  2. Intersphinx: add decoupler to docs/conf.py's intersphinx_mapping so MyST cross-references like {func} ~decoupler.op.collectri `` (introduced in the companion tutorials PR de: clarify model choice, design matrices, and result interpretation pertpy-tutorials#60) resolve to decoupler's docs.

The example code in EdgeR/PyDESeq2 docstrings still called
PseudobulkSpace.compute() with the long-removed `min_cells` and
`min_counts` parameters, so anyone copy-pasting the example hit a
TypeError. Replace each example with the current
PseudobulkSpace.compute(target_col=..., groups_col=..., layer_key=...,
mode=...) call that actually runs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the bug Something isn't working label May 25, 2026
Lets MyST/sphinx cross-references like {func}`~decoupler.op.collectri`
in the DE tutorial resolve to decoupler's docs instead of dropping to
plain text. decoupler publishes its objects.inv at decoupler.readthedocs.io
(not decoupler-py.readthedocs.io, which has an empty inventory).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…sweep

Points docs/tutorials/notebooks at scverse/pertpy-tutorials@7ae61d5
(merge commit of scverse/pertpy-tutorials#60), which contains the
companion DE narrative additions and the intersphinx sweep that
consumes the new decoupler entry added to docs/conf.py in this PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Zethson Zethson merged commit f9a36ce into main May 25, 2026
15 of 16 checks passed
@Zethson Zethson deleted the fix/de-docstring-pseudobulk-examples branch May 25, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve DE tutorial

1 participant