Zero-pad proximity score violin plots - #105
Open
maxkarlsson wants to merge 3 commits into
Open
Conversation
Complete the extracted proximity table so every component has a value for every presented marker pair, filling missing log2_ratio and join_count_z scores with 0. Co-authored-by: max.karlsson <max.karlsson@pixelgen.com>
maxkarlsson
marked this pull request as ready for review
September 4, 2026 15:38
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4733ed4. Configure here.
This reverts commit 4733ed4.
Show every component in the per-marker proximity violin plots, filling scores that were removed by proximity filtering with 0 instead of dropping the component from the marker's violin. Co-authored-by: max.karlsson <max.karlsson@pixelgen.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.

Description
The per-marker proximity violin plots dropped any cell whose proximity score for that marker was removed by the isotype-background filtering, so each marker's violin was drawn from a different subset of cells. The violins now show every cell for every marker that is plotted, with the filtered-out scores set to 0.
The padding happens in the visualization only.
es_data$proximityis unchanged, so no colocalization pairs are added globally.complete_proximity_scores()collects the components before theonly_selffilter, so a cell is represented even when all of its self-proximity scores were filtered out, and it fillsjoin_count_zas well aslog2_ratio.component_proximity_per_marker()uses that completion in place of filtering to self-comparisons.An earlier commit on this branch completed the proximity table globally during ingestion; that commit is reverted here.
The comparison below uses the package test data, where 22 of 48 cells have a surviving
CD18score:CD18 proximity violins before and after zero-padding
Type of change
How Has This Been Tested?
Ran the full
testthatsuite locally (R 4.6.1, pixelatorR 0.21.0) — no failures. Added an exact-structure test forcomplete_proximity_scores()covering self-pair and all-pair completion, and regenerated the expected plot data forcomponent_proximity_per_marker().lintr::lint_package()reports no lints.PR checklist:
To show artifacts inline, enable in settings.