Skip to content

SimPlex v2d: recalibration knobs and princeps 2026 profiles - #21

Merged
bnemoz merged 1 commit into
mainfrom
simplex-v2d-recalibration
Nov 18, 2026
Merged

bnemoz merged 1 commit into
mainfrom
simplex-v2d-recalibration

Conversation

@bnemoz

@bnemoz bnemoz commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

New SimPlex generator settings and profiles, calibrated to 23 princeps 2026 reactions. Every new setting defaults to off, so v2c output is unchanged.

Generator settings

  • Read depth. reads_per_molecule_dispersion draws reads per molecule from a negative binomial (PCR jackpots). reads_per_molecule_mean_light sets light-chain depth separately. umi_sub_rate adds UMI errors.
  • Junk molecules. junk_rate and junk_length add non-Ig library molecules with valid barcodes.
  • Read structure. barcode_sub_rate, tso_sub_rate, tso_indel_rate and tso_g_run_probs add barcode and TSO errors.
  • Constant region. constant_region and heavy_isotype_mix add a constant-region prefix up to the primer (simplex/_constant.py).
  • Input. input_filter selects one donor and kind per reaction. sample_clone_alpha samples real clonal lineages, and clone_id is carried into the truth tables.
  • Truth. truth.py excludes junk molecules from the resident components.

New module simplex/fidelity.py. It scores contig sequences against the truth: exact share and edits per 100 nt. It also measures whether clonal siblings in the same well and barcode are kept apart or merged into one contig. It is separate from the frozen pairing scorer.

Profiles

  • PRINCEPS_2026_FAMILY: memory and naive, each at P10, P50 and P90 of Ig UMIs per barcode.
  • PRINCEPS_2026_FULL_MEMORY_P50: memory median with all the settings above.

The report, calibration targets and scripts are in ~/work/PairPlex/diagnosis/simplex_v2d/ (SIMPLEX_V2D.md).

Known limitation

Pairing precision is not yet calibrated. The simulation's precision is several times higher than a model-free estimate on real data. Don't use these profiles to choose between per-well and pooled pairing, or to set confidence thresholds, until that is resolved.

Tests

New knob tests are in simplex/tests/test_v2_knobs.py. The full SimPlex suite passed (91 tests) on the branch base, before main moved to its current head. The branch merges cleanly with current main, which has no simplex/ changes since.

🤖 Generated with Claude Code

All new settings default to off; v2c output is unchanged.

- routing: negative binomial reads per molecule (reads_per_molecule_dispersion),
  separate light depth (reads_per_molecule_mean_light), UMI substitution errors
- molecules: non-Ig junk molecules (junk_rate, junk_length)
- reads: barcode/TSO substitution errors, TSO indels, TSO G-run length distribution
- cells: input_filter, clonal sampling of real lineages (sample_clone_alpha,
  clone_id carried into truth), constant-region prefix (_constant.py, heavy_isotype_mix)
- truth: exclude junk molecules from resident components
- fidelity.py: contig fidelity against truth and clonal-sibling over-collapse
- profiles: PRINCEPS_2026_FAMILY (memory/naive x P10/P50/P90) and
  PRINCEPS_2026_FULL_MEMORY_P50
- tests for the new knobs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bnemoz
bnemoz merged commit 7677098 into main Nov 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant