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

MAINT turn rank deficiency exception to warning #139

Merged
merged 2 commits into from
Jun 12, 2023

Conversation

BorisMuzellec
Copy link
Collaborator

Reference Issue or PRs

Fixes #136

What does your PR implement? Be specific.

Throw a UserWarning instead of a ValueError when a DeseqDataSet is initialized with a rank-deficient design matrix.
This allows users to run design-free VST without providing a full rank design (as described in #136).

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

@BorisMuzellec LGTM except for a minor comment

pydeseq2/dds.py Outdated
Comment on lines 1045 to 1047
"The design matrix is not full rank, so the model cannot be "
"fitted. Please remove the design variables that are linear "
"combinations of others."
Copy link

Choose a reason for hiding this comment

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

This text is adapted to a valueError but not necessarily a warning. What do you think about toning down the message?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for your review! I've updated the warning.

@BorisMuzellec BorisMuzellec merged commit e36e002 into main Jun 12, 2023
@BorisMuzellec BorisMuzellec deleted the deficient_rank_warning branch June 12, 2023 08:27
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] Design matrix check prevents use of VST without design matrix
1 participant