-
Notifications
You must be signed in to change notification settings - Fork 602
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
Add check for number of normalized dispersions #2231
Conversation
In sc.pp.highly_variable_genes() when flavor='cell_ranger' and n_top_genes is set check that enough normalized dispersions have been calculated and if not raise a warning and set n_top_genes to the number of calculated dispersions. Fixes scverse#2230
Codecov Report
@@ Coverage Diff @@
## master #2231 +/- ##
==========================================
+ Coverage 71.82% 71.85% +0.02%
==========================================
Files 98 98
Lines 11539 11542 +3
==========================================
+ Hits 8288 8293 +5
+ Misses 3251 3249 -2
|
Just noticed this is almost an exact duplicate of #1985 (check the issues but not PRs 🤦🏻 ). Feel free to close this if you want to keep the older one open. |
@lazappi you are now the chosen one :) Think that using the size attribute like in https://github.com/scverse/scanpy/pull/1985/files is maybe nicer and more explicit. Could you maybe add a quick test which covers this case? Thank you very much! |
Made the |
* upstream/master: Add link to scverse Discourse for README badge (scverse#2240) [pre-commit.ci] pre-commit autoupdate (scverse#2232)
Sorry, I forgot about this. Not sure why the CI was falling. The only errors I get locally were due to problems with matching images. |
@lazappi no worries! The scanpy CI has always been a little bit flaky and sometimes failures are not the faults of people submitting pull requests. If it fails again, we can dig deeper. |
It looks like the same |
@ivirshup this one should be good to go now, right? Do you require release notes for such small things or do you manually add those later? |
@Zethson, have you reviewed? |
And yes, should get a bug fix release note. |
* origin/fix-2230: [pre-commit.ci] pre-commit autoupdate (scverse#2271) Update CellRank's metion in the ecosystem (scverse#2269) fix typo in log1p parameters (scverse#2273) Fix error formatting (scverse#2263) Fix tests (scverse#2274)
* origin/fix-2230: Fix using custom layer with highly_variable_genes (scverse#2302) [pre-commit.ci] pre-commit autoupdate (scverse#2303) [pre-commit.ci] pre-commit autoupdate (scverse#2289)
* Add check for number of normalized dispersions In sc.pp.highly_variable_genes() when flavor='cell_ranger' and n_top_genes is set check that enough normalized dispersions have been calculated and if not raise a warning and set n_top_genes to the number of calculated dispersions. Fixes scverse#2230 * Use .size instead of len() * Add test for n_top_genes warning * Add release note * Remove blank line Co-authored-by: Isaac Virshup <ivirshup@gmail.com>
* Backport PR #2414: matplotlib 3.7 compat * fix scrublet * Update visium default plot for matplotlib 3.7 * Update hashsolo docstrings * skip plotting test that changed on mpl 3.7 if mpl < 3.7 is installed * Fix hashsolo docs (again) * update anndata-dev tests to install anndata test deps * Temporarily set warnings as errors to False for doc builds * Release notes * Fix using custom layer with highly_variable_genes (#2302) * Fix using custom layer with highly_variable_genes * Add tests * Add release note * Move release note to correct section * Format release notes * Add check for number of normalized dispersions (#2231) * Add check for number of normalized dispersions In sc.pp.highly_variable_genes() when flavor='cell_ranger' and n_top_genes is set check that enough normalized dispersions have been calculated and if not raise a warning and set n_top_genes to the number of calculated dispersions. Fixes #2230 * Use .size instead of len() * Add test for n_top_genes warning * Add release note * Remove blank line Co-authored-by: Isaac Virshup <ivirshup@gmail.com> --------- Co-authored-by: Isaac Virshup <ivirshup@gmail.com> Co-authored-by: adamgayoso <adamgayoso@users.noreply.github.com> Co-authored-by: Dries Schaumont <5946712+DriesSchaumont@users.noreply.github.com> Co-authored-by: Luke Zappia <lazappi@users.noreply.github.com>
In
sc.pp.highly_variable_genes()
whenflavor='cell_ranger'
andn_top_genes
is set check that enough normalized dispersions have been calculated and if not raise a warning and setn_top_genes
to the number of calculated dispersions.Fixes #2230