Skip to content

Raise a clear error when a da_nhoods design has no residual degrees of freedom - #1077

Open
Zethson wants to merge 1 commit into
mainfrom
fix/milo-no-residual-df
Open

Raise a clear error when a da_nhoods design has no residual degrees of freedom#1077
Zethson wants to merge 1 commit into
mainfrom
fix/milo-no-residual-df

Conversation

@Zethson

@Zethson Zethson commented Aug 13, 2026

Copy link
Copy Markdown
Member

Closes #1075.

With one sample per condition, edgeR's estimateDisp sets the dispersion to NA and glmQLFit then fails with missing value where TRUE/FALSE needed, which gives no hint about the actual problem.
da_nhoods now checks that the design leaves residual degrees of freedom and raises a ValueError pointing at the missing replication, for all three solvers.

@codecov-commenter

codecov-commenter commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.47%. Comparing base (0c429c5) to head (974e7c1).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/pertpy/tools/_milo.py 81.81% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1077   +/-   ##
=======================================
  Coverage   79.46%   79.47%           
=======================================
  Files          53       53           
  Lines        7545     7556   +11     
=======================================
+ Hits         5996     6005    +9     
- Misses       1549     1551    +2     
Files with missing lines Coverage Δ
src/pertpy/tools/_milo.py 78.42% <81.81%> (+0.17%) ⬆️

... 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.

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.

milo.da_nhoods() has encountered an error

2 participants