Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] only check read structures for sample barcodes if demultiple… #35

Merged
merged 2 commits into from
Jan 11, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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