Hi Elisabeth,
I'd create a channel to read in the myFolder.tar.gz file (or *.tar.gz files). After this, NF handles the IO and path locations are referenced with variables inside the workflow, i.e., there's no need to know where the decompressed folder is in the work directory.
So your workflow would be: -
Process 1 should receive a path from the channel as an input (e.g. input: path myfolder) then use that in the script (e.g. `tar -xf ${myfolder} -C ./unzipped_dir`), then output that folder for the next process (e.g. output: path 'unzipped_dir', emit: unzipdir, type: dir)
Process 2 receives the input from process 1 (e.g. input: path unzipdir) and runs some code on that location (e.g. `myscript ${unzipdir}`) and outputs some result (e.g. output: path 'result.csv' emit: p2result).
Process 3 receives the input from process 1 and process 2 (e.g. input: path unzipdir path p2result)
etc.
The workflow could then be defined as something like main: process1(ch_inputs) process2(process1.out.unzipdir) process3(process1.out.unzipdir, process2.out.p2result)
Hope this helps!
Combiz