From 6ea0659e7ffa2305173e6fb841e6074b01f9bcd8 Mon Sep 17 00:00:00 2001 From: Adrian Altenhoff Date: Wed, 29 Nov 2023 12:03:28 +0100 Subject: [PATCH] [FIX] better reporting of pipeline --- FastOMA_light.nf | 27 +++++++++++++++++---------- nextflow.config | 5 +++-- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/FastOMA_light.nf b/FastOMA_light.nf index 78ae58c..e8c28a2 100644 --- a/FastOMA_light.nf +++ b/FastOMA_light.nf @@ -1,3 +1,4 @@ +import groovy.json.JsonBuilder; // NXF_WRAPPER_STAGE_FILE_THRESHOLD='50000' @@ -99,6 +100,8 @@ if (params.help) { --help Display this message --debug_enabled Store addtional information that might be helpful to debug in case of a problem with FastOMA. + --report Produce nextflow report and timeline and store in in + $params.statdir """.stripIndent() @@ -118,13 +121,14 @@ log.info """ Parameters: input_folder ${params.input_folder} - proteome folder ${params.proteome} + proteome folder ${params.proteome_folder} species_tree ${params.species_tree} - splice_folder ${params.splice_folder} (optional) + splice_folder ${params.splice_folder} omamer_db ${params.omamer_db} - hogmap_in ${params.hogmap_in} (optional) + hogmap_in ${params.hogmap_in} debug_enabled ${params.debug_enabled} + report ${params.report} """.stripIndent() @@ -302,11 +306,14 @@ workflow { } -//workflow.onComplete { -// println "Completed at : $workflow.complete" -// println "Duration : $workflow.duration" -// println "Output in : $params.output_folder" -// println "Nextflow report : $params.statsdir" -// println ( workflow.success ? "Done!" : "Oops .. something went wrong" ) -//} +workflow.onComplete { + def String report = ( params.report ? "\nNextflow report : ${params.statsdir}" : ""); + println "" + println "Completed at : $workflow.complete" + println "Duration : $workflow.duration" + println "Processes : $workflow.workflowStats.succeedCount (success), $workflow.workflowStats.failedCount (failed)" + println "Output in : $params.output_folder" + report + println ( workflow.success ? "Done!" : "Oops .. something went wrong" ) +} + diff --git a/nextflow.config b/nextflow.config index d9a0320..0e2720d 100644 --- a/nextflow.config +++ b/nextflow.config @@ -14,6 +14,7 @@ params { omamer_db = "https://omabrowser.org/All/Primates-v2.0.0.h5" debug_enabled = false help = false + report = false output_folder = "Output" statsdir = "${params.output_folder}/stats" @@ -69,10 +70,10 @@ profiles { } timeline { - enabled = true + enabled = params.report file = "${params.statsdir}/timeline.html" } report { - enabled = false + enabled = params.report file = "${params.statsdir}/report.html" } \ No newline at end of file