Skip to content

feat: add configurable columns to PAGA plots - #4325

Open
AtomicGlance wants to merge 2 commits into
scverse:mainfrom
AtomicGlance:feat/paga-ncols
Open

feat: add configurable columns to PAGA plots#4325
AtomicGlance wants to merge 2 commits into
scverse:mainfrom
AtomicGlance:feat/paga-ncols

Conversation

@AtomicGlance

Copy link
Copy Markdown

Summary

  • Add an ncols parameter to sc.pl.paga for wrapping multiple color panels into a grid.
  • Preserve the existing single-row layout when ncols=None.
  • Keep colorbars aligned with grid panels and validate invalid column counts.
  • Add regression coverage and a release-note fragment.

Closes #1203

Tests

  • pytest -q tests/plotting/legacy/test_paga.py -k paga_ncols -o filterwarnings=: 8 passed
  • Ruff, Python byte-compilation, and git diff --check pass.
  • The rest of test_paga.py passes 24 tests; one unrelated test needs to download the existing pbmc3k fixture, which is blocked in this environment.

Signed-off-by: AtomicGlance <amiralimoradniaei@gmail.com>
@AtomicGlance

Copy link
Copy Markdown
Author

The code and focused tests are in place. One repository metadata check is failing only because this fork PR cannot add the required no milestone label without upstream permissions. Could a maintainer add that label or assign a milestone?

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.17%. Comparing base (84b6b1b) to head (b6c4457).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4325      +/-   ##
==========================================
+ Coverage   80.14%   80.17%   +0.02%     
==========================================
  Files         133      133              
  Lines       13478    13497      +19     
==========================================
+ Hits        10802    10821      +19     
  Misses       2676     2676              
Flag Coverage Δ
hatch-test.low-vers 77.87% <42.85%> (-0.06%) ⬇️
hatch-test.pre 80.04% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/scanpy/plotting/legacy/_tools/paga.py 65.53% <100.00%> (+1.14%) ⬆️

Signed-off-by: AtomicGlance <amiralimoradniaei@gmail.com>
@AtomicGlance

Copy link
Copy Markdown
Author

Thanks for flagging this. I added coverage for invalid ncols values, the ncols plus pre-supplied ax error, and a custom colorbar axis, then pushed b6c4457. The focused PAGA tests now pass 11 cases; Codecov should rerun on the new commit.

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.

sc.pl.paga: TypeError: paga() got an unexpected keyword argument 'ncols'

1 participant