From 76cdd46f3f8a77fb5023fb5a39c4ab99925b8b56 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Thu, 3 Mar 2022 16:35:19 +0100 Subject: [PATCH] Add meta to MALT/RUN (#1372) * Add meta to MALT/RUN * Update modules/malt/run/main.nf --- modules/malt/run/main.nf | 11 ++++++----- modules/malt/run/meta.yml | 5 +++++ tests/modules/malt/run/main.nf | 6 +++++- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/modules/malt/run/main.nf b/modules/malt/run/main.nf index 99657305..61c02ec1 100644 --- a/modules/malt/run/main.nf +++ b/modules/malt/run/main.nf @@ -1,4 +1,5 @@ process MALT_RUN { + tag "$meta.id" label 'process_high' conda (params.enable_conda ? "bioconda::malt=0.53" : null) @@ -7,15 +8,15 @@ process MALT_RUN { 'quay.io/biocontainers/malt:0.53--hdfd78af_0' }" input: - path fastqs + tuple val(meta), path(fastqs) val mode path index output: - path "*.rma6" , emit: rma6 - path "*.{tab,text,sam}", optional:true, emit: alignments - path "*.log" , emit: log - path "versions.yml" , emit: versions + tuple val(meta), path("*.rma6") , emit: rma6 + tuple val(meta), path("*.{tab,text,sam}"), optional:true, emit: alignments + tuple val(meta), path("*.log") , emit: log + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when diff --git a/modules/malt/run/meta.yml b/modules/malt/run/meta.yml index 7bd79290..ae4277a8 100644 --- a/modules/malt/run/meta.yml +++ b/modules/malt/run/meta.yml @@ -19,6 +19,11 @@ tools: licence: ["GPL v3"] input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - fastqs: type: file description: Input FASTQ files diff --git a/tests/modules/malt/run/main.nf b/tests/modules/malt/run/main.nf index 292a3fcf..d92dee71 100644 --- a/tests/modules/malt/run/main.nf +++ b/tests/modules/malt/run/main.nf @@ -12,10 +12,14 @@ workflow test_malt_run { gff = file(params.test_data['sarscov2']['genome']['genome_gff3'], checkIfExists: true) seq_type = "DNA" map_db = file("https://software-ab.informatik.uni-tuebingen.de/download/megan6/megan-nucl-Jan2021.db.zip", checkIfExists: true) - input = file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] mode = "BlastN" UNZIP ( map_db ) MALT_BUILD ( fastas, seq_type, gff, UNZIP.out.unzipped_archive ) MALT_RUN ( input, mode, MALT_BUILD.out.index ) } +