Skip to content

Commit 3f0377e

Browse files
pinin4fjordsclaude
andcommitted
refactor(stats): drop redundant n_for_mapq conditional in PE caller
n_for_mapq is usize, so `if n > 0 { n } else { 0 }` is identical to passing n_for_mapq directly to record_alignment. Match the SE caller shape: the variable already carries the right count from the PE TooManyLoci return site, and record_alignment routes via max_multimaps. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0ab80c5 commit 3f0377e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,8 +1454,7 @@ fn align_reads_paired_end<W: AlignmentWriter + ?Sized>(
14541454
.collect();
14551455

14561456
if results.is_empty() {
1457-
let n_for_stats = if n_for_mapq > 0 { n_for_mapq } else { 0 };
1458-
stats.record_alignment(n_for_stats, max_multimaps);
1457+
stats.record_alignment(n_for_mapq, max_multimaps);
14591458
stats.record_unmapped_reason(
14601459
unmapped_reason.unwrap_or(crate::stats::UnmappedReason::Other),
14611460
);

0 commit comments

Comments
 (0)