From a425a322f294f49f0588123a555533e292bacfc7 Mon Sep 17 00:00:00 2001 From: "Moritz E. Beber" Date: Fri, 18 Mar 2022 20:50:18 +0100 Subject: [PATCH] refactor: make metaphlan3 run in workflow --- nextflow.config | 3 +++ subworkflows/local/input_check.nf | 6 +++--- workflows/taxprofiler.nf | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/nextflow.config b/nextflow.config index 7be36a6..9f3b103 100644 --- a/nextflow.config +++ b/nextflow.config @@ -71,6 +71,9 @@ params { // kraken2 run_kraken2 = false + + // metaphlan3 + run_metaphlan3 = false } // Load base.config by default for all pipelines diff --git a/subworkflows/local/input_check.nf b/subworkflows/local/input_check.nf index ec404c2..e8669b3 100644 --- a/subworkflows/local/input_check.nf +++ b/subworkflows/local/input_check.nf @@ -31,9 +31,9 @@ workflow INPUT_CHECK { .set { fasta } emit: - fastq // channel: [ val(meta), [ reads ] ] - nanopore // channel: [ val(meta), [ reads ] ] - fasta // channel: [ val(meta), fasta ] + fastq = fastq ?: [] // channel: [ val(meta), [ reads ] ] + nanopore = nanopore ?: [] // channel: [ val(meta), [ reads ] ] + fasta = fasta ?: [] // channel: [ val(meta), fasta ] versions = SAMPLESHEET_CHECK.out.versions // channel: [ versions.yml ] } diff --git a/workflows/taxprofiler.nf b/workflows/taxprofiler.nf index a61580c..99a1685 100644 --- a/workflows/taxprofiler.nf +++ b/workflows/taxprofiler.nf @@ -165,9 +165,10 @@ workflow TAXPROFILER { } ch_input_for_metaphlan3 = ch_input_for_profiling.metaphlan3 + .dump(tag: "input_metaphlan3") .multiMap { it -> - reads: [ it[0] + it[2], it[1] ] + reads: [it[0] + it[2], it[1][0]] db: it[3] }