How to unzip and run a process on every output file?

Hello!

I need to handle zip file where 2 .fastq files are stored. I have a process to unzip and one process which will handle the 2 fastq but I don’t know how to return the two files form the first process. It looks like this:

process proc_unzip {

 input:
   tuple val(id), path(zipfile)
 output:
    tuple val(id), env(fastq_files)

  script:
  """
  mkdir extracted
  unzip ${zipfile} -d extracted/
  fastq_files="$(find extracted/ -iname '*.fastq')"
  """

}

How can I return the list of compressed files?

You specify the output files with a glob pattern:

output:
tuple val(id), path("extracted/*.fastq"), emit: fastq
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.