Repository navigation
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2176 +/- ##
==========================================
- Coverage 71.42% 71.19% -0.23%
==========================================
Files 92 95 +3
Lines 11286 11322 +36
==========================================
Hits 8061 8061
- Misses 3225 3261 +36
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2176 +/- ##
==========================================
- Coverage 71.80% 71.64% -0.16%
==========================================
Files 97 100 +3
Lines 11522 11578 +56
==========================================
+ Hits 8273 8295 +22
- Misses 3249 3283 +34
|
| import numpy as np | ||
|
|
||
|
|
||
| def pearson_residuals_hvg_scatter( |
There was a problem hiding this comment.
I would remove the scatter suffix.
| def pearson_residuals_hvg_scatter( | ||
| adata: AnnData, | ||
| marker_names=None, | ||
| gene_name_key: Optional[str] = None, |
There was a problem hiding this comment.
please replace to var_names . In general, check the signature of already existing functions in order to harmonize arguments name.
| x: str = 'means', | ||
| y: str = 'residual_variances', | ||
| hvg_key: str = 'highly_variable', | ||
| kwargs_sc_pl_scatter: dict = dict(), |
There was a problem hiding this comment.
can this just be called kwargs and in the docstrings specify that this is passed to sc.pl.scatter. ?
| def clean_helper_fields(ad): | ||
| del ad.var['hvg_marker_status'] | ||
| if 'hvg_marker_status_colors' in ad.uns.keys(): | ||
| del ad.uns['hvg_marker_status_colors'] |
There was a problem hiding this comment.
could you elaborate what this is for?
|
@jlause do you plan on tackling these to get this in? |
Hi @giovp @ivirshup, (also CCing @dkobak)
as we discussed at #1715 and in scverse/scanpy-tutorials#43, I prepared a function
pearson_residuals_hvg_scatter()that wrapssc.pl.scatter()to reproduce the "gene selection plot" from the tutorial. It can be used as a sanity check for both the HVG selection and the appropriateness of the used Pearson residual null model (as explained also in the tutorial notebook).I also added a feature to show known marker genes on the plot, change plot aesthetics and which fields are used for plotting.
Looking forward to your thoughts on this one :)
Best,
Jan
PS: I prepared this PR on an independent branch from #1715 - hope that is the correct way in this situation!