Skip to content

Commit

Permalink
print which FASTQ is wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
nh13 committed Nov 28, 2022
1 parent 3f798a7 commit 17fe73a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/demux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,11 +431,12 @@ where
ensure!(!zipped_reads.is_empty(), "Bug: no records found");
let first_read_name =
zipped_reads[0].head().splitn(2, |c| *c == b' ').next().unwrap_or(b"");
for read in &zipped_reads {
for (idx, read) in zipped_reads.iter().enumerate() {
let cur_read_name = read.head().splitn(2, |c| *c == b' ').next().unwrap_or(b"");
ensure!(
first_read_name == cur_read_name,
"Read names did not match: {:?} != {:?}",
"Read names did not match in the 1st versus {}th FASTQ: {:?} != {:?}",
idx + 1,
String::from_utf8_lossy(first_read_name),
String::from_utf8_lossy(cur_read_name)
);
Expand Down

0 comments on commit 17fe73a

Please sign in to comment.