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 varm["replaced"] as a numpy array #307

Merged
merged 2 commits into from
Sep 4, 2024
Merged

Conversation

BorisMuzellec
Copy link
Collaborator

@BorisMuzellec BorisMuzellec commented Sep 3, 2024

Reference Issue or PRs

Fixes #306

What does your PR implement? Be specific.

Starting from v0.10.9, anndata no longer supports pandas DataFrames or Series in varm fields.

This caused a bug when refit_cooks was set to True, but no genes were replaced, as a varm["replaced"] was set as pandas Series filled with False.

This PR fixes this issue by replacing the Series with a numpy array.

It also solves a second deprecation issue arising in vst_fit, in which a design matrix was uselessly set with MultiIndexcolumns, which are no longer supported by anndata.

Note: in the case were genes are replaced, varm["replaced"] is automatically defined as an array.

@BorisMuzellec BorisMuzellec marked this pull request as ready for review September 3, 2024 15:49
Copy link
Collaborator

@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.

LGTM, thanks. Is this the only place where there is this issue ?

@BorisMuzellec
Copy link
Collaborator Author

Thanks @umarteauowkin! Yes, it seems like it's the only place

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] DeseqDataSet.refit() fails with latest anndata release 0.10.9
2 participants