There is a process output like this: path “work_subdir/*.fasta” where work_subdir is unavoidable.
And workflow output like this: output { ch_out { path { 'result_subdir' } }
How to avoid work_subdir in the results and achieve this structure results/result_subdir/*.fasta
instead of results/result_subdir/work_subdir/*.fasta ?
Thanks for the fast answer! I feel that the direction is right, but my knowledge of nextflow is not enough to implement this correctly I currently made it to the setup below, but it emits a list of files with entire paths that still include work_subdir that still makes it to results/result_subdir folder.
output:
path ("work_subdir"), emit: dir
publish:
ch_out = PROCESS.out.dir.flatMap { dir -> dir.listFiles() }