Entering edit mode
24 months ago
Eliveri
▴
350
I have a DSL2 Nextflow workflow. I would like to use just the outputs named "paired.fq.gz" ( index 0 and 2 in the tuple) in downstream processes.
Is there a way to filter or select a subset of the process outputs?
process trimreads {
input:
tuple val(pair_id), path(reads)
output:
set pair_id, path("trimmed_${pair_id}_R{1,2}_paired.fq.gz"),
path("trimmed_${pair_id}_R{1,2}_unpaired.fq.gz")
script:
"""
#!/usr/bin/env bash
trimmomatic ...
"""
}
workflow {
...
trimmed_reads_ch = trimreads(read_pairs_ch)
// selected_trimmed_reads_ch = filter trimmed_reads_ch?
fastqc_ch = fastqc(...)
How about declaring multiple output channels? You can even name them to easily reuse them later: