Describe the bug
test_zero_inflated() (from test_edge_cases.py) is currently failing due to coefficients in the trend curve being negative. This causes negative fitted_dispersions causing, in turn, bugs when taking the log.
To Reproduce
Run test_zero_inflated() (from test_edge_cases.py)
Expected behavior
When this happens, DESeq2 raises a warning and runs a local trend fit, which is not implemented in pydeseq2 yet. The ideal solution would be to implement a python equivalent of localDispersionFit and run it whenever the parametric fit fails.
Additional context
Link to the relevant DESeq2 R code.
Describe the bug
test_zero_inflated()(fromtest_edge_cases.py) is currently failing due to coefficients in the trend curve being negative. This causes negativefitted_dispersionscausing, in turn, bugs when taking the log.To Reproduce
Run
test_zero_inflated()(fromtest_edge_cases.py)Expected behavior
When this happens, DESeq2 raises a warning and runs a local trend fit, which is not implemented in pydeseq2 yet. The ideal solution would be to implement a python equivalent of
localDispersionFitand run it whenever the parametric fit fails.Additional context
Link to the relevant DESeq2 R code.