diff --git a/modules/gunzip/main.nf b/modules/gunzip/main.nf index aec4569f..564fa99d 100644 --- a/modules/gunzip/main.nf +++ b/modules/gunzip/main.nf @@ -9,7 +9,7 @@ process GUNZIP { label 'process_low' publishDir "${params.outdir}", mode: params.publish_dir_mode, - saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) } + saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } conda (params.enable_conda ? "conda-forge::sed=4.7" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { @@ -19,14 +19,14 @@ process GUNZIP { } input: - path archive + tuple val(meta), path(archive) output: - path "$gunzip", emit: gunzip - path "versions.yml" , emit: versions + tuple val(meta), path("$gunzip"), emit: gunzip + path "versions.yml" , emit: versions script: - gunzip = archive.toString() - '.gz' + gunzip = archive.toString() - '.gz' """ gunzip \\ -f \\ diff --git a/modules/gunzip/meta.yml b/modules/gunzip/meta.yml index 3482f0d2..ea1f1546 100644 --- a/modules/gunzip/meta.yml +++ b/modules/gunzip/meta.yml @@ -10,6 +10,11 @@ tools: documentation: https://www.gnu.org/software/gzip/manual/gzip.html licence: ['GPL-3.0-or-later'] input: + - meta: + type: map + description: | + Optional groovy Map containing meta information + e.g. [ id:'test', single_end:false ] - archive: type: file description: File to be compressed/uncompressed @@ -26,3 +31,4 @@ output: authors: - "@joseespinosa" - "@drpatelh" + - "@jfy133" diff --git a/tests/modules/gunzip/main.nf b/tests/modules/gunzip/main.nf index 5a24e742..0c23a8cd 100644 --- a/tests/modules/gunzip/main.nf +++ b/tests/modules/gunzip/main.nf @@ -5,7 +5,9 @@ nextflow.enable.dsl = 2 include { GUNZIP } from '../../../modules/gunzip/main.nf' addParams( options: [:] ) workflow test_gunzip { - input = file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + input = [ [], + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] GUNZIP ( input ) }