Skip to content

emit chimeric stats on PE#81

Merged
Psy-Fer merged 2 commits into
mainfrom
fix/pe-chimeric-stats
Jun 5, 2026
Merged

emit chimeric stats on PE#81
Psy-Fer merged 2 commits into
mainfrom
fix/pe-chimeric-stats

Conversation

@Psy-Fer
Copy link
Copy Markdown
Collaborator

@Psy-Fer Psy-Fer commented Jun 1, 2026

fix: count PE chimeric reads in Log.final.out

Summary

Log.final.out's "Number of chimeric reads" was always 0 for paired-end runs regardless
of --chimSegmentMin, because stats.record_chimeric() was never called in the PE
alignment loop.

The SE path correctly calls it whenever chimeric alignments are found. The PE path
collected and wrote chimeric output (junction file, WithinBAM supplementary records) but
skipped the stats call entirely.

Change

src/lib.rs — three lines added after the PE stats block, mirroring the SE pattern:

if params.chim_segment_min > 0 && !pe_chimeric.is_empty() {
    stats.record_chimeric();
}

pe_chimeric is the Vec<ChimericAlignment> returned from align_paired_read. It is
checked before the move into AlignmentBatchResults so no clone is needed.

Test plan

  • cargo test — 434 tests passing, 0 failures
  • cargo clippy --all-targets — 0 warnings
  • cargo fmt --check — clean
  • SE/PE benchmarks unchanged: SE 8604/8926 (96.4%), PE 8390/8390 both-mapped

@Psy-Fer Psy-Fer enabled auto-merge (squash) June 5, 2026 11:26
@Psy-Fer Psy-Fer merged commit 8e8ea70 into main Jun 5, 2026
10 checks passed
@Psy-Fer Psy-Fer deleted the fix/pe-chimeric-stats branch June 5, 2026 11:33
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