Skip to content

Commit

Permalink
Fix "Mismatching read pair!" error when the read name matches but the… (
Browse files Browse the repository at this point in the history
#28)

* Fix "Mismatching read pair!" error when the read name matches but the header does not (e.g. due to read number being in the comment section)
Co-authored-by: tfenne <[email protected]>
  • Loading branch information
nh13 authored Jun 6, 2023
1 parent 806ce2e commit 2f1bd06
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,11 +502,12 @@ fn process_paired_reads(
progress.record();
progress.record();
}
assert!(
read1.head() == read2.head(),
assert_eq!(
read1.id_bytes(),
read2.id_bytes(),
"Mismatching read pair! R1: {} R2: {}",
std::str::from_utf8(read1.head()).unwrap(),
std::str::from_utf8(read2.head()).unwrap()
read1.id().unwrap(),
read2.id().unwrap()
);
// NB: if the output is to be colored, always call read_match on read2, regardless of
// whether or not read1 had a match, so that read2 is always colored. If the output
Expand Down

0 comments on commit 2f1bd06

Please sign in to comment.