Repository navigation
Add perturb_fraction / random_state to make_neighbor_perturbation - #39
Merged
Merged
Conversation
Perturb only a seeded random fraction of cells before re-aggregation; the remaining rows are reverted to their original expression before renormalisation. Defaults (1.0, 0) keep the previous behaviour. Distilled from 0f5b68a on the rebuttal branch (library change only). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #39 +/- ##
==========================================
+ Coverage 90.10% 90.17% +0.07%
==========================================
Files 10 10
Lines 1394 1405 +11
==========================================
+ Hits 1256 1267 +11
Misses 138 138 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
dbdimitrov
added a commit
to PMBio/cellina-reproducibility
that referenced
this pull request
Sep 30, 2026
Rerun the slide-232 node-perturbation fraction sweep with cellina feat/perturb-fraction (PR PMBio/cellina#39) over fractions 0.1, 0.25, 0.5, 0.75, 1.0 (0.0 and 0.05 dropped), 5 cell types x 5 seeds, and regenerate the per-cell-type summary tables and figure. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Summary
make_neighbor_perturbation(and_make_perturbed_expression/_node_perturbation) gainperturb_fraction=1.0andrandom_state=0.round(perturb_fraction * n_cells)cells keeps the shift; the rest are reverted to their original expression after clipping and before renormalisation. Out-of-range values raiseValueError.test_node_perturbation_fractionintests/test_cellina.py(fraction 1.0 == old, 0.0 == unchanged, 0.5 changes half the rows deterministically, invalid range raises).Distilled from
0f5b68aon therebuttalbranch (only thesrc/cellina/_spatial_utils.pyhunks; theanalysis/scripts are not included). Required by the node-fraction dose-response sweep in cellina-reproducibility PR #59.🤖 Generated with Claude Code