Repository navigation
Separate Mixscape min_cells from min_de_genes to match Seurat - #1189
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1189 +/- ##
==========================================
+ Coverage 74.06% 74.12% +0.05%
==========================================
Files 57 57
Lines 8895 8895
==========================================
+ Hits 6588 6593 +5
+ Misses 2307 2302 -5
🚀 New features to boost your workflow:
|
kkkklck
marked this pull request as ready for review
November 2, 2026 07:52
Zethson
enabled auto-merge (squash)
November 2, 2026 10:33
Zethson
disabled auto-merge
November 2, 2026 10:43
Zethson
added a commit
to scverse/rapids-singlecell
that referenced
this pull request
Nov 2, 2026
* Add min_cells to Mixscape instead of reusing min_de_genes Mixscape collapsed a target gene to NP when fewer than `min_de_genes` cells stayed classified as perturbed, a typo inherited from Seurat's RunMixscape and fixed there in satijalab/seurat#10299 and in pertpy in scverse/pertpy#1189. The cell threshold is now its own `min_cells` parameter, default 5 like Seurat, so results only change for calls that set a non-default `min_de_genes`. * Reference the PR in the release note
Zethson
added a commit
that referenced
this pull request
Nov 3, 2026
Adds the changelog for 1.5.0 and bumps the release drafter templates. The version itself comes from the git tag via hatch-vcs. The v1.5.0 section gains the guide assignment rework (#1172, #1173), the Mixscape min_cells fix (#1189), the Python 3.13 requirement and the CI and template PRs (#1165, #1184, #1185, #1190), and its two Maintenance blocks are merged in the 1.4.0 section order.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LLM usage
PR Checklist
Description of changes
Mixscape.mixscape()currently usesmin_de_genesfor two independent thresholds:The current Seurat reference implementation separates these concepts as
min.de.genesandmin.cells. Seurat fixed the same coupling in satijalab/seurat#10299 in February 2026.This PR adds
min_cells=5toMixscape.mixscape()and uses it for the cell-count safeguard while leavingmin_de_genesresponsible only for the DE-gene threshold. The default is 5, matching Seurat, so default behavior is unchanged.A regression test deliberately sets
min_de_genesandmin_cellsto different values and verifies that changing one no longer changes the semantics of the other.Technical details
The behavioral change is limited to calls that explicitly use a non-default
min_de_genesvalue. Previously, for example,min_de_genes=10also implicitly required at least 10 cells to remain classified as perturbed. After this change, the cell threshold is controlled independently throughmin_cells.Validation completed:
ruff checkpassesruff formatpassesThe remaining
Pre-commit checksfailure is unrelated to this PR:mypycurrently fails while parsingPyQt6/QtGui.pyiwith 16 syntax errors. The same failure is present on the currentmainbranch scheduled Test workflow at commit9b5c53b.Additional context
Reference fix in Seurat: satijalab/seurat#10299.