From bd3bfe0817246082525ab93707976676b1fe208b Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Mon, 2 May 2022 12:41:24 +0200 Subject: [PATCH] Add warn of default being used --- modules/diamond/blastp/main.nf | 5 +++++ modules/diamond/blastx/main.nf | 5 +++++ tests/modules/diamond/blastx/main.nf | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/diamond/blastp/main.nf b/modules/diamond/blastp/main.nf index fc77ee7b..033186ea 100644 --- a/modules/diamond/blastp/main.nf +++ b/modules/diamond/blastp/main.nf @@ -38,6 +38,11 @@ process DIAMOND_BLASTP { case "sam": outfmt = 101; break case "tsv": outfmt = 102; break case "paf": outfmt = 103; break + default: + outfmt = '6'; + out_ext = 'txt'; + log.warn("Unknown output file format provided (${out_ext}): selecting DIAMOND default of tabular BLAST output (txt)"); + break } """ DB=`find -L ./ -name "*.dmnd" | sed 's/.dmnd//'` diff --git a/modules/diamond/blastx/main.nf b/modules/diamond/blastx/main.nf index 3479eedb..d3272279 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -38,6 +38,11 @@ process DIAMOND_BLASTX { case "sam": outfmt = 101; break case "tsv": outfmt = 102; break case "paf": outfmt = 103; break + default: + outfmt = '6'; + out_ext = 'txt'; + log.warn("Unknown output file format provided (${out_ext}): selecting DIAMOND default of tabular BLAST output (txt)"); + break } """ DB=`find -L ./ -name "*.dmnd" | sed 's/.dmnd//'` diff --git a/tests/modules/diamond/blastx/main.nf b/tests/modules/diamond/blastx/main.nf index bb1b55a8..847a64b1 100644 --- a/tests/modules/diamond/blastx/main.nf +++ b/tests/modules/diamond/blastx/main.nf @@ -9,7 +9,7 @@ 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) ] - out_ext = 'txt' + out_ext = 'tfdfdt' blast_columns = 'qseqid qlen' DIAMOND_MAKEDB ( db )