Commit 5dacc67
fix: differential abundance and aggregated posterior computations (#3789)
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)
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ori Kronfeld <ori.kronfeld@weizmann.ac.il>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: claude <claude@users.noreply.github.com>1 parent db0900c commit 5dacc67
2 files changed
Lines changed: 21 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
| 404 | + | |
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
| 409 | + | |
| 410 | + | |
410 | 411 | | |
411 | 412 | | |
412 | 413 | | |
| |||
421 | 422 | | |
422 | 423 | | |
423 | 424 | | |
| 425 | + | |
424 | 426 | | |
425 | 427 | | |
426 | 428 | | |
| |||
434 | 436 | | |
435 | 437 | | |
436 | 438 | | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
437 | 442 | | |
438 | | - | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
439 | 446 | | |
440 | 447 | | |
441 | 448 | | |
| |||
451 | 458 | | |
452 | 459 | | |
453 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
454 | 465 | | |
455 | | - | |
456 | | - | |
| 466 | + | |
457 | 467 | | |
458 | 468 | | |
459 | 469 | | |
460 | 470 | | |
461 | | - | |
| 471 | + | |
462 | 472 | | |
463 | 473 | | |
464 | 474 | | |
| |||
476 | 486 | | |
477 | 487 | | |
478 | 488 | | |
479 | | - | |
480 | | - | |
481 | | - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| |||
0 commit comments