From c0689fac784acc0d1a342f0566ec701da0212646 Mon Sep 17 00:00:00 2001 From: RobJY Date: Tue, 7 May 2024 17:04:58 -0400 Subject: [PATCH] bug fix for issue #28: sort and not recurse image_directory --- subworkflows/local/utils_nfcore_mcmicro_pipeline/main.nf | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/subworkflows/local/utils_nfcore_mcmicro_pipeline/main.nf b/subworkflows/local/utils_nfcore_mcmicro_pipeline/main.nf index 21cd0e1..c061f25 100644 --- a/subworkflows/local/utils_nfcore_mcmicro_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_mcmicro_pipeline/main.nf @@ -325,11 +325,10 @@ def make_ashlar_input_sample( samplesheet_row ) { } else { // TODO: remove this option or allow it to grab all files when no column in the samplesheet? def image_dir = samplesheet_row[index_sample_image_directory] - image_dir.eachFileRecurse (FileType.FILES) { - if(it.toString().endsWith(".ome.tif")){ - cycle_images << file(it) - } + image_dir.eachFileMatch (FileType.FILES, ~/^.*\.ome.tif$/) { + cycle_images << file(it) } + cycle_images.sort() } return [[id:samplesheet_row[index_sample_sample]], cycle_images]