Skip to content

Commit

Permalink
[FIX] better reporting of pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
alpae committed Nov 29, 2023
1 parent 0b8d63d commit 6ea0659
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
27 changes: 17 additions & 10 deletions FastOMA_light.nf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import groovy.json.JsonBuilder;

// NXF_WRAPPER_STAGE_FILE_THRESHOLD='50000'

Expand Down Expand Up @@ -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()

Expand All @@ -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()


Expand Down Expand Up @@ -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" )
}


5 changes: 3 additions & 2 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
}

0 comments on commit 6ea0659

Please sign in to comment.