I want to watch files appear in a specified directory (eg /data/*.fq.gz) using a channel and process these until a certain file pattern appears (eg /data/*.hello.txt). I've looked at the watchDir documentation, but as mentioned this will never finish. Whilst searching I've found the conditional loop in the Nextflow patterns repo (
https://nextflow-io.github.io/patterns/index.html#_feedback_loop). However i don't seem to find a way to implement this in DSL2 in an elegant fashion. Has anybody done such a setup using the .until function? Or any other way to achieve RT data analysis?
Dami