From caa9c613cb8966ae4aa9e4a8f70232bf204e634f Mon Sep 17 00:00:00 2001 From: Nils Homer Date: Wed, 11 Jan 2023 11:39:49 -0700 Subject: [PATCH] [bugfix] only check read structures for sample barcodes if demultiplexing (#35) --- src/lib/run.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/lib/run.rs b/src/lib/run.rs index 05855a9..7a12156 100644 --- a/src/lib/run.rs +++ b/src/lib/run.rs @@ -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"