Skip to content

Commit a7a00a4

Browse files
rob-pclaude
andcommitted
docs(map): correct decoy_thresh comment (strict domination, ties keep transcript)
The doc comment described `best_decoy >= decoy_thresh * best_valid` (drop on tie), but the code uses strict `<` (`best_valid < decoy_thresh * best_decoy`): a fragment is assigned to a decoy only when the decoy is *strictly* better, so at the default decoy_thresh=1.0 a decoy that merely ties the best transcript does NOT dominate and the transcript is kept. This matches C++ salmon's `bestScore < decoyThresh * bestDecoyScore`. Comment-only. Investigated + reverted an experimental C++ --denyDecoyOrphans flag: testing showed C++ already applies this exact strict-domination rule (so a faithful mirror is a no-op), and a blunt "drop any orphan co-occurring with a decoy" variant over-dropped (90.9% vs Rust default 93.7%). The real C++/Rust residual is seeding (Rust surfaces dominating genome pairs C++ does not), not decoy policy. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B7JMur5DmDpECddErpi2JS
1 parent 4908cd1 commit a7a00a4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

crates/salmon-map/src/score.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ pub struct ScoreConfig {
7878
pub score_exp: f64,
7979
/// drop mappings whose weight falls below this
8080
pub min_aln_prob: f64,
81-
/// drop the read if `best_decoy >= decoy_thresh * best_valid`
81+
/// drop the read only when a decoy is *strictly* better than the best
82+
/// transcript: `best_valid < decoy_thresh * best_decoy` (so at the default
83+
/// `decoy_thresh = 1.0` a decoy that merely ties the transcript does **not**
84+
/// dominate — the transcript is kept). Matches C++ salmon's
85+
/// `bestScore < decoyThresh * bestDecoyScore`.
8286
pub decoy_thresh: f64,
8387
/// keep only the best-scoring mappings (each weight `1.0`)
8488
pub hard_filter: bool,

0 commit comments

Comments
 (0)