I’ve this structure:
|-- combine.nf
|-- first
| |-- a.txt
| |-- b.txt
| `-- c.txt
|-- second
| |-- A.txt
| `-- B.txt
And combine.nf
is
#!/usr/bin/env nextflow
process sayHello {
input:
path first
path second
output:
stdout
script:
"""
echo 'Hello couple (${first}, ${second})'
"""
}
workflow {
def files_first = Channel.fromPath("first/*.txt")
def files_second = Channel.fromPath("second/*.txt")
sayHello(files_first, files_second) | view { it }
}
The sayHello
process is only called for two pairs (the size of the smallest directory in fact):
Hello couple (a.txt, A.txt)
Hello couple (b.txt, B.txt)
How to process all possible pairs? Thanks in advance
PS: this question is generic, in my case one of the directory contains only one file.