nf-core / mcmicro

An end-to-end processing pipeline that transforms multi-channel whole-slide images into single-cell data.

Home Page:https://nf-co.re/mcmicro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

input_sample code path does not explicitly sort input image filenames

jmuhlich opened this issue · comments

Description of the bug

When using input_sample, the image directory files are collected via Groovy's File.eachFileRecurse which does not yield the results in any sorted order. The results must be collected and then sorted explicitly by filename. In addition it's probably better not to recurse and require all files are provided at the top level, as user expectations will vary on how files in subdirectories should be sorted relative to each other. This is as simple as replacing eachFileRecurse with eachFile. Or eachFileMatch could be used to perform the .ome.tif filename match as well.

Command used and terminal output

No response

Relevant files

No response

System information

No response

commented

I have a fix for this in my repo in branch issue_28 using eachFileMatch and an explicit sort as you mentioned. I'll make a PR for it once PR #29 has been merged.