diff --git a/conf/base.config b/conf/base.config index d0e3599cb..5ec53c006 100644 --- a/conf/base.config +++ b/conf/base.config @@ -95,9 +95,15 @@ process { errorStrategy = { task.exitStatus in [1] ? 'retry' : 'finish' } } + // other process specific exit statuses + withName: nuclear_contamination { + errorStrategy = { task.exitStatus in [134] ? 'ignore' : 'retry' } + } + withName: multiqc { errorStrategy = { task.exitStatus in [143,137] ? 'retry' : 'ignore' } } + } params { diff --git a/main.nf b/main.nf index 0831b7a97..b4f92d6a6 100644 --- a/main.nf +++ b/main.nf @@ -584,7 +584,6 @@ if (params.input && (has_extension(params.input, "tsv"))) tsv_path = params.inpu ch_input_sample = Channel.empty() if (tsv_path) { - tsv_file = file(tsv_path) if (!tsv_file.exists()) exit 1, "[nf-core/eager] error: input TSV file could not be found. Does the file exist or in the right place? You gave the path: ${params.input}" @@ -2609,9 +2608,6 @@ process sex_deterrmine { tag "${samplename}" publishDir "${params.outdir}/nuclear_contamination", mode:"copy" - // ANGSD Xcontamination will exit with status 134 when the number of SNPs is too low - validExitStatus 0,134 - when: params.run_nuclear_contamination @@ -3058,11 +3054,13 @@ workflow.onComplete { log.info "[nf-core/eager] Sent summary e-mail to $email_address (sendmail)" } catch (all) { // Catch failures and try with plaintext - def mail_cmd = [ 'mail', '-s', subject, '--content-type=text', email_address ] - if ( mqc_report.size() <= params.max_multiqc_email_size.toBytes() ) { + def mail_cmd = [ 'mail', '-s', subject, '--content-type=text/html', email_address ] + if (mqc_report == NULL) { + log.warn "[nf-core/eager] Could not attach MultiQC report to summary email" + } else if ( mqc_report.size() <= params.max_multiqc_email_size.toBytes() ) { mail_cmd += [ '-A', mqc_report ] } - mail_cmd.execute() << email_txt + mail_cmd.execute() << email_html log.info "[nf-core/eager] Sent summary e-mail to $email_address (mail)" } }