diff --git a/modules/gffread/main.nf b/modules/gffread/main.nf index 6c5aecbc..6b0dd666 100644 --- a/modules/gffread/main.nf +++ b/modules/gffread/main.nf @@ -27,8 +27,12 @@ process GFFREAD { script: def software = getSoftwareName(task.process) + def prefix = options.suffix ? "${gff.baseName}${options.suffix}" : "${gff.baseName}" """ - gffread $gff $options.args -o ${gff.baseName}.gtf + gffread \\ + $gff \\ + $options.args \\ + -o ${prefix}.gtf echo \$(gffread --version 2>&1) > ${software}.version.txt """ } diff --git a/modules/gffread/meta.yml b/modules/gffread/meta.yml index 63d281f5..af2abb6e 100644 --- a/modules/gffread/meta.yml +++ b/modules/gffread/meta.yml @@ -14,26 +14,16 @@ tools: licence: ['MIT'] input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - gff: type: file - description: A GFF file in either the GFF3 or GFF2 format. - patter: "*.gff" + description: A reference file in either the GFF3, GFF2 or GTF format. + pattern: "*.{gff, gtf}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - gtf: type: file description: GTF file resulting from the conversion of the GFF input file - pattern: "*.gtf" + pattern: "*.{gtf}" - version: type: file description: File containing software version diff --git a/tests/modules/gffread/main.nf b/tests/modules/gffread/main.nf index e7b5441a..87e95275 100644 --- a/tests/modules/gffread/main.nf +++ b/tests/modules/gffread/main.nf @@ -2,7 +2,7 @@ nextflow.enable.dsl = 2 -include { GFFREAD } from '../../../modules/gffread/main.nf' addParams( options: [:] ) +include { GFFREAD } from '../../../modules/gffread/main.nf' addParams( options: [suffix: '.out'] ) workflow test_gffread { input = file(params.test_data['sarscov2']['genome']['genome_gff3'], checkIfExists: true) diff --git a/tests/modules/gffread/test.yml b/tests/modules/gffread/test.yml index 21a7bb6a..48096f1e 100644 --- a/tests/modules/gffread/test.yml +++ b/tests/modules/gffread/test.yml @@ -3,5 +3,5 @@ tags: - gffread files: - - path: ./output/gffread/genome.gtf - md5sum: f184f856b7fe3e159d21b052b5dd3954 + - path: ./output/gffread/genome.out.gtf + md5sum: fcbf5744ed806e47768bc456fa043263