Skip to content

fix: differential abundance and aggregated posterior computations#3789

Merged
ori-kron-wis merged 26 commits into
mainfrom
alex-ap-fix
May 13, 2026
Merged

fix: differential abundance and aggregated posterior computations#3789
ori-kron-wis merged 26 commits into
mainfrom
alex-ap-fix

Conversation

@lordy5
Copy link
Copy Markdown
Collaborator

@lordy5 lordy5 commented Apr 22, 2026

Fixes:

  • Use the original anndata for aggregated posterior computation, not the subset of the anndata. All cells in a sample should be considered when computing the aggregated posterior (up to num_cells_posterior)
  • Update the tests accordingly
  • Correctly pass scales into torch distributions, not variances. get_latent_representation returns variances, not scales, while the aggregated posterior code previously expected scales, and so accidentally passed variances into torch distributions (Normal and Student's T expect scales instead)

@lordy5 lordy5 changed the title Fixes to differential abundance and aggregated posterior fix: differential abundance and aggregated posterior computations Apr 22, 2026
ori-kron-wis and others added 10 commits April 22, 2026 04:01
<!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.15.8 →
v0.15.9](astral-sh/ruff-pre-commit@v0.15.8...v0.15.9)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…a upgrade (#3776)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Added a page in the user guide to explain the new differential abundance
method, similar to the existing page for differential expression.

---------

Co-authored-by: Ori Kronfeld <ori.kronfeld@weizmann.ac.il>
<!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.15.9 →
v0.15.10](astral-sh/ruff-pre-commit@v0.15.9...v0.15.10)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
also remove local_mode=True from updated ray version autotune tests.
close #3782
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.53%. Comparing base (db0900c) to head (4391365).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3789      +/-   ##
==========================================
+ Coverage   88.52%   88.53%   +0.01%     
==========================================
  Files         237      237              
  Lines       23823    23827       +4     
==========================================
+ Hits        21090    21096       +6     
+ Misses       2733     2731       -2     
Flag Coverage Δ
integration 72.61% <100.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
src/scvi/model/base/_vaemixin.py 96.99% <100.00%> (+0.09%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lordy5 lordy5 requested a review from canergen April 22, 2026 13:50
@lordy5 lordy5 added the on-merge: backport to 1.4.x on-merge: backport to 1.4.x label Apr 24, 2026
@lordy5 lordy5 marked this pull request as ready for review April 24, 2026 08:48
Co-authored-by: claude <claude@users.noreply.github.com>
@ori-kron-wis ori-kron-wis self-requested a review April 30, 2026 13:34
@ori-kron-wis
Copy link
Copy Markdown
Collaborator

@lordy5, please remove the redundant .vscode or .claude

@ori-kron-wis ori-kron-wis merged commit 5dacc67 into main May 13, 2026
21 of 22 checks passed
ori-kron-wis pushed a commit that referenced this pull request May 13, 2026
…gregated posterior computations) (#3813)

Backport PR #3789: fix: differential abundance and aggregated posterior
computations

Co-authored-by: Alexander Becker <beckera@berkeley.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

on-merge: backport to 1.4.x on-merge: backport to 1.4.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants