From 4007932baa5c57ae2407489152b4046a3923a28c Mon Sep 17 00:00:00 2001 From: "Diego Alvarez S." Date: Thu, 31 Oct 2024 23:46:32 -0300 Subject: [PATCH] Add busco error strategy --- conf/base.config | 2 ++ subworkflows/local/bin_qc.nf | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/conf/base.config b/conf/base.config index 9be49eaa..128fa9f9 100644 --- a/conf/base.config +++ b/conf/base.config @@ -156,9 +156,11 @@ process { withName: MAG_DEPTHS { memory = { 16.GB * task.attempt } } + //BUSCO can fail when there are no hits withName: BUSCO { cpus = { 8 * task.attempt } memory = { 20.GB * task.attempt } + errorStrategy = { task.exitStatus in (130..145) ? 'retry' : task.exitStatus == 1 ? 'ignore' : 'finish' } } withName: MAXBIN2 { errorStrategy = { task.exitStatus in [1, 255] ? 'ignore' : 'retry' } diff --git a/subworkflows/local/bin_qc.nf b/subworkflows/local/bin_qc.nf index b87e7998..b2f78e7b 100644 --- a/subworkflows/local/bin_qc.nf +++ b/subworkflows/local/bin_qc.nf @@ -20,7 +20,7 @@ workflow BIN_QC { ch_bins // [ [ meta] , fasta ], input bins (mandatory) ch_checkm_db // [ db ], presupplied CheckM database (optional) ch_checkm2_db // [ [meta] , db ], presupplied CheckM2 database (optional) - ch_busco_db // [ db ], presupplied BUSCO database (optional) + ch_busco_db // [ [meta] , db ], presupplied BUSCO database (optional) ch_gunc_db // [ db ], presupplied GUNC database (optional) main: @@ -57,8 +57,7 @@ workflow BIN_QC { else { // Set BUSCO database to empty to allow for --auto-lineage ch_db_for_busco = Channel - .of([]) - .map { _empty_db -> [[lineage: ''], []] } + .of([[lineage: ''], []]) .collect() }