Skip to content

Commit 916403a

Browse files
authored
Merge pull request #399 from jfy133/tsv-input
Fixing email stuff
2 parents 5acd944 + d46dd5f commit 916403a

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

main.nf

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def helpMessage() {
212212
--max_cpus Maximum number of CPUs to use for each step of the pipeline. Should be in form e.g. Default: '${params.max_cpus}'
213213
--email Set this parameter to your e-mail address to get a summary e-mail with details of the run sent to you when the workflow exits
214214
--plaintext_email Receive plain text emails rather than HTML
215-
--maxMultiqcEmailFileSize Threshold size for MultiQC report to be attached in notification email. If file generated by pipeline exceeds the threshold, it will not be attached (Default: 25MB)
215+
--max_multiqc_email_size Threshold size for MultiQC report to be attached in notification email. If file generated by pipeline exceeds the threshold, it will not be attached (Default: 25MB)
216216
217217
For a full list and more information of available parameters, consider the documentation (https://github.com/nf-core/eager/).
218218
""".stripIndent()
@@ -2634,7 +2634,7 @@ process multiqc {
26342634
file workflow_summary from ch_workflow_summary.collectFile(name: "workflow_summary_mqc.yaml")
26352635

26362636
output:
2637-
file "*multiqc_report.html" into multiqc_report
2637+
file "*multiqc_report.html" into ch_multiqc_report
26382638
file "*_data"
26392639

26402640
script:
@@ -2725,7 +2725,11 @@ workflow.onComplete {
27252725
log.info "[nf-core/eager] Sent summary e-mail to $email_address (sendmail)"
27262726
} catch (all) {
27272727
// Catch failures and try with plaintext
2728-
[ 'mail', '-s', subject, email_address ].execute() << email_txt
2728+
if ( mqc_report.size() <= params.max_multiqc_email_size.toBytes() ) {
2729+
[ 'mail', '-s', subject, email_address, '-A', mqc_report ].execute() << email_txt
2730+
} else {
2731+
[ 'mail', '-s', subject, email_address ].execute() << email_txt
2732+
}
27292733
log.info "[nf-core/eager] Sent summary e-mail to $email_address (mail)"
27302734
}
27312735
}

0 commit comments

Comments
 (0)