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 set normed_counts in sub_dds before recomputing genewise dispersions when refitting #207

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

BorisMuzellec
Copy link
Collaborator

What does your PR implement? Be specific.

In dds._refit_without_outliers, the obsm["size_factors"] of sub_dds should be the same as the original object when computing genewise dispersions.

However, since version 0.4.1, the _fit_MoM_dispersions method (called by fit_genewise_dispersions) first checks if a normed_counts layer exists, and if not, runs fit_size_factors.

This caused size factors to be overwritten in dds._refit_without_outliers.

To fix this, this PR sets the normed_counts layer in sub_dds before computing genewise dispersions.

@BorisMuzellec BorisMuzellec merged commit a583320 into main Nov 21, 2023
13 checks passed
@BorisMuzellec BorisMuzellec deleted the fix_refit branch November 21, 2023 16:26
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.

None yet

1 participant