Skip to content

[BUG] Negative coefficients in the trend curve #231

@BorisMuzellec

Description

@BorisMuzellec

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions