From d1bf81825d2828ce849f8e509674d0df2e873c6e Mon Sep 17 00:00:00 2001 From: Graeme Grimes Date: Wed, 24 Nov 2021 16:53:18 +0000 Subject: [PATCH] Create process_tuple_io_fastp.nf --- .../scripts/process/process_tuple_io_fastp.nf | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 files/scripts/process/process_tuple_io_fastp.nf diff --git a/files/scripts/process/process_tuple_io_fastp.nf b/files/scripts/process/process_tuple_io_fastp.nf new file mode 100644 index 00000000..ce6aa8ba --- /dev/null +++ b/files/scripts/process/process_tuple_io_fastp.nf @@ -0,0 +1,26 @@ +//process_tuple_io_fastp.nf +nextflow.enable.dsl=2 + +process FASTP { + input: + tuple val(sample_id), path(reads) + + output: + tuple val(sample_id), path("*FP*.fq.gz") + + script: + """ + fastp \ + -i ${reads[0]} \ + -I ${reads[1]} \ + -o ${sample_id}_FP_R1.fq.gz \ + -O ${sample_id}_FP_R2.fq.gz + """ +} + +reads_ch = Channel.fromFilePairs('data/yeast/reads/ref1_{1,2}.fq.gz') + +workflow { + FASTP(reads_ch) + FASTP.out.view() +}