Add times_seen_threshold slider to dashboard and set default=1 in evaluate notebooks#236
Merged
Merged
Conversation
…#235) - Add mo.ui.slider for times_seen_threshold (default 1, range 0–20) to dashboard.py; wire it into Param Correlation and Replicate Scatter tabs to filter mutations unseen in any condition before correlation is computed. - Set times_seen_threshold=1 in scv2-spike evaluate.ipynb at all three call sites: mut_param_dataset_correlation, combine_replicate_muts, and split_apply_combine_muts. - Set times_seen_threshold=1 in simulation evaluate.ipynb at both call sites: split_apply_combine_muts and mut_param_dataset_correlation. - Set beta0_ridge=0.0 in scv2-spike config.yaml for production run. Co-Authored-By: Claude Sonnet 4.6 <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
times_seen_thresholdslider (default 1, range 0–20) toexperiments/dashboard.py. The slider appears in both the Param Correlation and Replicate Scatter tabs and is wired intomc.mut_param_dataset_correlation(times_seen_threshold=...)andmc.split_apply_combine_muts(..., times_seen_threshold=...).times_seen_threshold=1at all three call sites inexperiments/scv2-spike/notebooks/evaluate.ipynb(mut_param_dataset_correlation,combine_replicate_muts,split_apply_combine_muts).times_seen_threshold=1at both call sites inexperiments/simulation/notebooks/evaluate.ipynb(split_apply_combine_muts,mut_param_dataset_correlation).beta0_ridge: 0.0inexperiments/scv2-spike/config/config.yamlfor the production run.Motivation
Mutations whose reference-condition
times_seen == 0in one replicate land at exactlyβ = 0(zero-initialized, no data to drive the estimate), producing prominent horizontal/vertical stripes in replicate-scatter panels that artificially deflate correlation estimates.threshold=1removes these — it is the weakest filter that excludes zero-evidence mutations. Settingthreshold=0on the slider exactly reproduces pre-change behavior.Backward compatibility
CSV outputs (
library_replicate_correlation.csv,mutations_df.csv,collection_muts.csv) will have fewer rows after re-running the pipeline — the removed rows are exactly those withmin(times_seen_*) == 0. Downstream consumers (manuscript_figures.ipynb) should be re-run; changing correlation values are expected and indicate the filter is working.Test plan
ruff check .andblack --check .pass (confirmed locally)fit_collection.pkl; verify slider renders in both tabs, threshold=0 reproduces old behavior, threshold=1 eliminates β=0 stripesCloses #235
🤖 Generated with Claude Code