Commit 0b822a6
fix(quant): include fragment-length probability in equivalence-class weights
The selective-alignment equivalence-class weights were built from the bare
coverage weight, omitting the fragment-length-distribution (FLD) term that
salmon folds into its per-fragment auxProb (logFragProb + logFragCov +
logAlignCompatProb; SalmonQuantify.cpp). The missing term flattened the
conditional weights for paralogs/isoforms whose implied insert size differs,
coarsening the range-factorized eq-classes and slightly degrading multimapping
resolution.
Two changes in processor.rs:
- Fold fld.pmf(fragment_len) into the eq-class weight (gated on pre_burnin to
match salmon's numPreAuxModelSamples; start-position term intentionally
excluded since effective length is applied separately in update_eff_lengths).
- Train the FLD weighted by each fragment's best-pair posterior confidence,
a deterministic analog of salmon's probability-weighted stochastic training,
so ambiguous multimappers no longer overdisperse the FLD on paralog-rich data.
Validation (vs C++ salmon 1.12.0):
- Polyester ground-truth (human, 193,760 txps): closes 85-97% of the per-txp
Spearman gap on easy/hard sims x VBEM/useEM.
- Real-data 36M GEUVADIS C++ parity: NumReads Pearson 0.9986 -> 0.9995,
Spearman 0.9645 -> 0.9706.
- No mapping/perf regression (mapping rate identical; wall within noise).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 9164df2 commit 0b822a6
1 file changed
Lines changed: 53 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
404 | 412 | | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
411 | 424 | | |
412 | | - | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
413 | 449 | | |
414 | | - | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
415 | 456 | | |
416 | 457 | | |
417 | 458 | | |
| |||
0 commit comments