Skip to content

Conversation

@BorisMuzellec
Copy link
Collaborator

@BorisMuzellec BorisMuzellec commented Feb 2, 2024

Reference Issue or PRs

Fixes #231

What does your PR implement? Be specific.

Implement a "local" option for the trend curve using scikit-misc's loess implementation.

A few issues to work on:

  • scikit-misc loess objects are unpicklable. As a result, using a "local" curve fit makes the DeseqDataSet object unpicklable.

  • On some platforms (Ubuntu in particular), loess will cause a segmentation fault, which is not possible to catch using python try ... except .... As a workaround, loess is run in a separate process, to avoid the main process crashing in case of a segfault. This is a bit cumbersome, because the child process cannot communicate the fitted loess object to the main, as it is unpicklable. The current solution is to

    1. Launch loess in a child process
    2. Look at the child process' error code
    3. If the child process terminated correctly, run loess in the main process

@BorisMuzellec BorisMuzellec changed the title ENH implement local fit for trend curve (WIP) ENH implement local fit for trend curve Feb 16, 2024
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.

[BUG] Negative coefficients in the trend curve

2 participants