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

BUG fix independent filtering #243

Merged
merged 4 commits into from
Feb 28, 2024
Merged

Conversation

BorisMuzellec
Copy link
Collaborator

@BorisMuzellec BorisMuzellec commented Feb 26, 2024

Reference Issue or PRs

Fixes #242

What does your PR implement? Be specific.

This PR fixes a bug in DeseqStats._independent_filtering caused by lowess. More precisely:

  • we remove the extra index, no longer required as the output of lowess is now 1-dimensional
  • we fix the order of the arguments, which was inverted
  • we handle the rare case in lowess where the median of residuals is 0

As this bug was not caught by the CI, we add a test case on a synthetic dataset with 50 genes, on which we compare the output of PyDESeq2 with those of the R package DESeq2. In particular, this test case fails without the above fixes.

@BorisMuzellec BorisMuzellec changed the title BUG remove extra dimension in lowess results BUG fix independent filtering Feb 26, 2024
@BorisMuzellec BorisMuzellec marked this pull request as ready for review February 26, 2024 18:27
Copy link

@umarteauowkin umarteauowkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @BorisMuzellec for this PR, looks good to me !

@BorisMuzellec BorisMuzellec merged commit 62638e8 into main Feb 28, 2024
14 checks passed
@BorisMuzellec BorisMuzellec deleted the fix_index_error_in_lowess branch February 28, 2024 08:03
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.

IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed.
2 participants