diff --git a/modules/samtools/faidx/main.nf b/modules/samtools/faidx/main.nf index c53373a9..d8308b03 100644 --- a/modules/samtools/faidx/main.nf +++ b/modules/samtools/faidx/main.nf @@ -8,11 +8,11 @@ process SAMTOOLS_FAIDX { 'quay.io/biocontainers/samtools:1.14--hb421002_0' }" input: - path fasta + tuple val(meta), path(fasta) output: - path "*.fai" , emit: fai - path "versions.yml", emit: versions + tuple val(meta), path ("*.fai") , emit: fai + path "versions.yml" , emit: versions script: def args = task.ext.args ?: '' diff --git a/modules/samtools/faidx/meta.yml b/modules/samtools/faidx/meta.yml index 16c0b334..bae97a39 100644 --- a/modules/samtools/faidx/meta.yml +++ b/modules/samtools/faidx/meta.yml @@ -14,11 +14,21 @@ tools: doi: 10.1093/bioinformatics/btp352 licence: ['MIT'] input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - fasta: type: file description: FASTA file pattern: "*.{fa,fasta}" output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - fai: type: file description: FASTA index file diff --git a/tests/modules/samtools/faidx/main.nf b/tests/modules/samtools/faidx/main.nf index bc47c847..bc4dc5e3 100644 --- a/tests/modules/samtools/faidx/main.nf +++ b/tests/modules/samtools/faidx/main.nf @@ -5,7 +5,9 @@ nextflow.enable.dsl = 2 include { SAMTOOLS_FAIDX } from '../../../../modules/samtools/faidx/main.nf' workflow test_samtools_faidx { - fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - SAMTOOLS_FAIDX ( fasta ) + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + + SAMTOOLS_FAIDX ( input ) } diff --git a/tests/modules/samtools/faidx/test.yml b/tests/modules/samtools/faidx/test.yml index f0224f34..dc2184ee 100644 --- a/tests/modules/samtools/faidx/test.yml +++ b/tests/modules/samtools/faidx/test.yml @@ -1,8 +1,10 @@ -- name: samtools faidx test workflow - command: nextflow run ./tests/modules/samtools/faidx -entry test_samtools_faidx -c ./tests/config/nextflow.config -c ./tests/modules/samtools/faidx/nextflow.config +- name: samtools faidx test_samtools_faidx + command: nextflow run tests/modules/samtools/faidx -entry test_samtools_faidx -c tests/config/nextflow.config tags: - samtools - samtools/faidx files: - path: output/samtools/genome.fasta.fai md5sum: 9da2a56e2853dc8c0b86a9e7229c9fe5 + - path: output/samtools/versions.yml + md5sum: d56671a7c8f8058944d3d536c3058f7f