Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH implement local fit for trend curve #234

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft

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
1 participant