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
Layers support for PCA and regress_out #2588
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2588 +/- ##
=======================================
Coverage 72.12% 72.12%
=======================================
Files 104 104
Lines 11688 11688
=======================================
Hits 8430 8430
Misses 3258 3258
|
scanpy/tests/test_pca.py
Outdated
assert np.allclose(X_pca.uns["pca"]["variance"], layer_pca.uns["pca"]["variance"]) | ||
assert np.allclose( | ||
X_pca.uns["pca"]["variance_ratio"], layer_pca.uns["pca"]["variance_ratio"] | ||
) | ||
assert np.allclose(X_pca.obsm['X_pca'], layer_pca.obsm['X_pca']) | ||
assert np.allclose(X_pca.varm['PCs'], layer_pca.varm['PCs']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be exactly equal, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also maybe checkout scanpy.testing._helpers.check_rep_results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two very minor changes:
- Could the layer be recorded in the parameters saved to
uns
? - Could you please add a release note?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
This PR adds
.layers
support for PCA and regress_out.