Skip to content

Commit

Permalink
Tweak resources and fix in toulligQC (#5)
Browse files Browse the repository at this point in the history
Tweak resources
Handle space in toulligQC report title
  • Loading branch information
dialvarezs authored Sep 12, 2024
1 parent b517f60 commit cfbf856
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
13 changes: 9 additions & 4 deletions subworkflows/quality_check.nf
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ process fastQC {
label 'fastqc'
tag { name }
publishDir "${params.output_dir}/qc/fastqc", mode: 'copy'
cpus { 4 * task.attempt }
memory { 8.GB * task.attempt }
errorStrategy 'retry'
cpus { task.attempt == 1 ? 4 : 8 }
memory { 4.GB * (Math.pow(2, task.attempt - 1)) }
errorStrategy { task.exitStatus in 137..140 ? 'retry' : 'finish' }
maxRetries 3

when:
Expand All @@ -42,7 +42,8 @@ process fastQC {
fastqc \
${reads} \
-o fastqc_${name} \
-t ${task.cpus} --memory ${task.memory.toGiga()}GB
-t ${task.cpus} \
--memory ${task.memory.toMega() / task.cpus}
"""
}

Expand All @@ -52,6 +53,9 @@ process nanoPlot {
tag { name }
publishDir "${params.output_dir}/qc/nanoplot", mode: 'copy'
cpus 4
memory { 8.GB * task.attempt }
errorStrategy { task.exitStatus in 137..140 ? 'retry' : 'finish' }
maxRetries 3

when:
'nanoplot' in params.qc_tools
Expand Down Expand Up @@ -79,6 +83,7 @@ process nanoq {
tag { name }
publishDir "${params.output_dir}/qc/nanoq", mode: 'copy'
cpus 1
memory 2.GB

when:
'nanoq' in params.qc_tools
Expand Down
6 changes: 4 additions & 2 deletions subworkflows/reports.nf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ process multiQC {
process toulligQC {
label 'toulligqc'
publishDir "${params.output_dir}/reports/toulligqc", mode: 'copy'
memory 4.GB
memory { 8.GB * task.attempt }
errorStrategy { task.exitStatus in 137..140 ? 'retry' : 'finish' }
maxRetries 3

when:
'toulligqc' in params.qc_tools
Expand All @@ -64,7 +66,7 @@ process toulligQC {
script:
if (params.experiment_name) {
report_filename = "${slugify(params.experiment_name)}_toulligqc.html"
name_opt = "--report-name ${params.experiment_name}"
name_opt = "--report-name '${params.experiment_name}'"
} else {
report_filename = "toulligqc.html"
name_opt = ''
Expand Down

0 comments on commit cfbf856

Please sign in to comment.