From 1a148c5d4985d89c3a2449e6a01680b9160e5487 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Tue, 24 Jan 2023 10:48:23 +0100 Subject: [PATCH] Remove double If and format for readability --- subworkflows/local/db_check.nf | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/subworkflows/local/db_check.nf b/subworkflows/local/db_check.nf index 203ee4e..f5cdf2c 100644 --- a/subworkflows/local/db_check.nf +++ b/subworkflows/local/db_check.nf @@ -41,7 +41,17 @@ workflow DB_CHECK { //Filter the channel to run untar on DBs of tools actually using ch_input_untar = ch_dbs_for_untar.untar.dump() - .filter { params.run_bracken && it[0]['tool'] == 'bracken' || params.run_centrifuge && it[0]['tool'] == 'centrifuge' || || params.run_diamond && it[0]['tool'] == 'diamond' || params.run_kaiju && it[0]['tool'] == 'kaiju' || params.run_kraken2 && it[0]['tool'] == 'kraken2' || params.run_krakenuniq && it [0]['tool'] == 'krakenuniq' || params.run_malt && it[0]['tool'] == 'malt' || params.run_metaphlan3 && it[0]['tool'] == 'metaphlan3' || params.run_motus && it[0]['tool'] == 'motus' } + .filter { + params.run_bracken && it[0]['tool'] == 'bracken' || + params.run_centrifuge && it[0]['tool'] == 'centrifuge' || + params.run_diamond && it[0]['tool'] == 'diamond' || + params.run_kaiju && it[0]['tool'] == 'kaiju' || + params.run_kraken2 && it[0]['tool'] == 'kraken2' || + params.run_krakenuniq && it [0]['tool'] == 'krakenuniq' || + params.run_malt && it[0]['tool'] == 'malt' || + params.run_metaphlan3 && it[0]['tool'] == 'metaphlan3' || + params.run_motus && it[0]['tool'] == 'motus' + } UNTAR (ch_input_untar) ch_versions = ch_versions.mix(UNTAR.out.versions.first()) ch_final_dbs = ch_dbs_for_untar.skip.mix( UNTAR.out.untar )