From fb0230358f0ac4e2fb530202735cd0a1f0e86ed3 Mon Sep 17 00:00:00 2001 From: Sarah Griffiths Date: Wed, 8 Sep 2021 13:42:51 +0000 Subject: [PATCH] Update fastqingress.nf to give error message if no fastq files --- lib/fastqingress.nf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/fastqingress.nf b/lib/fastqingress.nf index 30713a7..ee5f21e 100644 --- a/lib/fastqingress.nf +++ b/lib/fastqingress.nf @@ -1,4 +1,3 @@ - process checkSampleSheet { label "artic" cpus 1 @@ -166,5 +165,11 @@ def fastq_ingress(input_folder, output_folder, samples, sanitize) } // resolve whether we have demultiplexed data or single sample data = resolve_barcode_structure(input_folder, sample_sheet) + // return error if data empty after processing + if (data == null) { + println("") + println("Error: `--fastq` Unable to find FASTQ files or BARCODE folders in the provided --fastq path") + exit 1 + } return data }