Skip to content

Fix die_test crash on isoforms unexpressed in both compared groups (2.1.3) - #48

Merged
YalanBi merged 1 commit into
masterfrom
fix/die-test-zero-rows-issue-29
Aug 5, 2026
Merged

Fix die_test crash on isoforms unexpressed in both compared groups (2.1.3)#48
YalanBi merged 1 commit into
masterfrom
fix/die-test-zero-rows-issue-29

Conversation

@YalanBi

@YalanBi YalanBi commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fixes Issues with Differential Isoform Expression Test #29: die_test crashed with ValueError: expected frequencies has a zero element when a gene's isoform list included isoforms only covered in samples outside the two groups being compared, producing all-zero rows that made the contingency table singular. Such isoforms are now dropped before the test, with returned transcript indices remapped correctly.

Test plan

  • Added regression test reproducing the exact crash from the issue, confirmed it fails without the fix and passes with it
  • Full test suite passes (23/23) in a fresh clone
  • black --check and flake8 clean
  • python -m build + twine check pass
  • CI green across the full matrix

Isoforms only covered in samples outside the two groups being tested
produced all-zero rows, which made chi2_contingency's expected-frequency
table singular. Drop them before the test.
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@YalanBi YalanBi added the bug Something isn't working label Aug 5, 2026
@YalanBi YalanBi self-assigned this Aug 5, 2026
@YalanBi
YalanBi merged commit a925528 into master Aug 5, 2026
20 checks passed
@YalanBi
YalanBi deleted the fix/die-test-zero-rows-issue-29 branch August 5, 2026 19:20
@YalanBi YalanBi changed the title Fix die_test crash on isoforms unexpressed in both compared groups Fix die_test crash on isoforms unexpressed in both compared groups (2.1.3) Aug 5, 2026
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.

Issues with Differential Isoform Expression Test

1 participant