From 09eaf8f62781c3d54ec02e3db266a16358fa178d Mon Sep 17 00:00:00 2001 From: simonleandergrimm Date: Mon, 9 Dec 2024 23:32:14 +0000 Subject: [PATCH] Adding filtlong to the Cleaning step. --- subworkflows/local/clean/main.nf | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/subworkflows/local/clean/main.nf b/subworkflows/local/clean/main.nf index 9f1e638e..4436b5a7 100644 --- a/subworkflows/local/clean/main.nf +++ b/subworkflows/local/clean/main.nf @@ -7,7 +7,11 @@ ***************************/ include { QC } from "../../../subworkflows/local/qc" -include { FASTP } from "../../../modules/local/fastp" +if (params.ont) { + include { FILTLONG as FILTER_READS } from "../../../modules/local/filtlong" +} else { + include { FASTP as FILTER_READS } from "../../../modules/local/fastp" +} /*********** | WORKFLOW | @@ -22,9 +26,13 @@ workflow CLEAN { stage_label single_end main: - fastp_ch = FASTP(reads_ch, adapter_path, single_end) - qc_ch = QC(fastp_ch.reads, fastqc_cpus, fastqc_mem, stage_label, single_end) + if (params.ont) { + filter_ch = FILTER_READS(reads_ch) + } else { + filter_ch = FILTER_READS(reads_ch, adapter_path, single_end) + } + qc_ch = QC(filter_ch.reads, fastqc_cpus, fastqc_mem, stage_label, single_end) emit: - reads = fastp_ch.reads + reads = filter_ch.reads qc = qc_ch.qc } \ No newline at end of file