From 58e5c6aecefbff55b8f29bb542b908da0bd293f7 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Mon, 2 May 2022 11:55:43 +0200 Subject: [PATCH] Make variables consistent --- modules/diamond/blastp/main.nf | 6 +++--- modules/diamond/blastp/meta.yml | 4 ++-- modules/diamond/blastx/main.nf | 6 +++--- modules/diamond/blastx/meta.yml | 2 +- tests/modules/diamond/blastp/main.nf | 8 ++++---- tests/modules/diamond/blastx/main.nf | 8 ++++---- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/modules/diamond/blastp/main.nf b/modules/diamond/blastp/main.nf index 6b750145..0d78e230 100644 --- a/modules/diamond/blastp/main.nf +++ b/modules/diamond/blastp/main.nf @@ -10,7 +10,7 @@ process DIAMOND_BLASTP { input: tuple val(meta), path(fasta) path db - val outext + val out_ext val blast_columns output: @@ -30,7 +30,7 @@ process DIAMOND_BLASTP { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def columns = blast_columns ? "${blast_columns}" : '' - switch ( outext ) { + switch ( out_ext ) { case "blast": outfmt = 0; break case "xml": outfmt = 5; break case "txt": outfmt = 6; break @@ -49,7 +49,7 @@ process DIAMOND_BLASTP { --query $fasta \\ --outfmt ${outfmt} ${columns} \\ $args \\ - --out ${prefix}.${outext} + --out ${prefix}.${out_ext} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/diamond/blastp/meta.yml b/modules/diamond/blastp/meta.yml index 0bc12889..3aa81e53 100644 --- a/modules/diamond/blastp/meta.yml +++ b/modules/diamond/blastp/meta.yml @@ -28,7 +28,7 @@ input: type: directory description: Directory containing the protein blast database pattern: "*" - - outext: + - out_ext: type: string description: | Specify the type of output file to be generated. `blast` corresponds to @@ -40,7 +40,7 @@ input: type: string description: | Optional space separated list of DIAMOND tabular BLAST output keywords - used for in conjunction with the 'txt' outext option (--outfmt 6). See + used for in conjunction with the 'txt' out_ext option (--outfmt 6). See DIAMOND documnetation for more information. output: diff --git a/modules/diamond/blastx/main.nf b/modules/diamond/blastx/main.nf index bb630e32..ef641435 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -10,7 +10,7 @@ process DIAMOND_BLASTX { input: tuple val(meta), path(fasta) path db - val outext + val out_ext val blast_columns output: @@ -30,7 +30,7 @@ process DIAMOND_BLASTX { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def columns = blast_columns ? "${blast_columns}" : '' - switch ( outext ) { + switch ( out_ext ) { case "blast": outfmt = 0; break case "xml": outfmt = 5; break case "txt": outfmt = 6; break @@ -49,7 +49,7 @@ process DIAMOND_BLASTX { --query $fasta \\ --outfmt ${outfmt} ${columns} \\ $args \\ - --out ${prefix}.${outext} + --out ${prefix}.${out_ext} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/diamond/blastx/meta.yml b/modules/diamond/blastx/meta.yml index 64645d34..2dcd7bc6 100644 --- a/modules/diamond/blastx/meta.yml +++ b/modules/diamond/blastx/meta.yml @@ -28,7 +28,7 @@ input: type: directory description: Directory containing the nucelotide blast database pattern: "*" - - outext: + - out_ext: type: string description: | Specify the type of output file to be generated. `blast` corresponds to diff --git a/tests/modules/diamond/blastp/main.nf b/tests/modules/diamond/blastp/main.nf index e90599f0..ff669233 100644 --- a/tests/modules/diamond/blastp/main.nf +++ b/tests/modules/diamond/blastp/main.nf @@ -9,20 +9,20 @@ workflow test_diamond_blastp { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] - outext = 'txt' + out_ext = 'txt' blast_columns = 'qseqid qlen' DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) + DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) } workflow test_diamond_blastp_daa { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] - outext = 'daa' + out_ext = 'daa' blast_columns = [] DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) + DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) } diff --git a/tests/modules/diamond/blastx/main.nf b/tests/modules/diamond/blastx/main.nf index 8f244528..bb1b55a8 100644 --- a/tests/modules/diamond/blastx/main.nf +++ b/tests/modules/diamond/blastx/main.nf @@ -9,20 +9,20 @@ workflow test_diamond_blastx { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] - outext = 'txt' + out_ext = 'txt' blast_columns = 'qseqid qlen' DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) + DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) } workflow test_diamond_blastx_daa { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] - outext = 'daa' + out_ext = 'daa' blast_columns = [] DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) + DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) }