Skip to content

Commit

Permalink
[bugfix] only check read structures for sample barcodes if demultiple…
Browse files Browse the repository at this point in the history
…xing (#35)
  • Loading branch information
nh13 authored Jan 11, 2023
1 parent ffbb98b commit caa9c61
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/lib/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,13 @@ pub fn run(opts: Opts) -> Result<()> {
&opts.output_dir.to_string_lossy()
);
ensure!(!opts.read_structures.is_empty(), "At least one read structure must be specified");
ensure!(
opts.sample_barcode_in_fastq_header
|| opts.read_structures.iter().any(|s| s.sample_barcodes().count() > 0),
"No sample barcodes found in read structures"
);
if !is_no_demux {
ensure!(
opts.sample_barcode_in_fastq_header
|| opts.read_structures.iter().any(|s| s.sample_barcodes().count() > 0),
"No sample barcodes found in read structures"
);
}
ensure!(
opts.read_structures.iter().any(|s| s.templates().count() > 0),
"No templates found in read structures"
Expand Down

0 comments on commit caa9c61

Please sign in to comment.