From db50d0e982297945560be7b28e58cf2a10b74cb4 Mon Sep 17 00:00:00 2001 From: Rich <107657876+Birkinshaw@users.noreply.github.com> Date: Fri, 21 Nov 2025 16:54:02 +1100 Subject: [PATCH 1/8] change process configurations seperated Alphafold2 tasks (CountUniqueSequences, Multimer_Feature, and Multimer_Inference) to have individual resource limits for CPU, memory, queue. Also include a retry function to allow for increasing memory if it fails on those codes --- nextflow.config | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/nextflow.config b/nextflow.config index 8c6777d..132676a 100644 --- a/nextflow.config +++ b/nextflow.config @@ -21,12 +21,27 @@ profiles { conda.enabled = true cleanup = false process { - withLabel:Alphafold2 { - module = 'alphafold/2.3.2' + withName: 'CountUniqueSequences' { + cpus = 2 + memory = { 4.GB + 10.GB * task.attempt } + queue = 'regular' + errorStrategy = { task.exitStatus in 137..140 ? 'retry' : 'terminate' } + maxRetries = 5 + } + withName: 'Multimer_Feature' { + cpus = 8 + memory = { 40.GB + 10.GB * task.attempt } + queue = 'regular' + errorStrategy = { task.exitStatus in 137..140 ? 'retry' : 'terminate' } + maxRetries = 5 + } + withName: 'Multimer_Inference' { cpus = 10 - memory = '100 GB' - } - + memory = { 80.GB + 20.GB * task.attempt } + queue = 'gpuq' + errorStrategy = { task.exitStatus in 137..140 ? 'retry' : 'terminate' } + maxRetries = 5 + } } } debug { From 93439c646ad2d1b34de8854e4f4307058298ef04 Mon Sep 17 00:00:00 2001 From: Rich <107657876+Birkinshaw@users.noreply.github.com> Date: Sat, 22 Nov 2025 10:44:13 +1100 Subject: [PATCH 2/8] Modify error strategy and max retries for processes fix so the pipeline doesn't exit on other error messages --- nextflow.config | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/nextflow.config b/nextflow.config index 132676a..0847975 100644 --- a/nextflow.config +++ b/nextflow.config @@ -25,22 +25,37 @@ profiles { cpus = 2 memory = { 4.GB + 10.GB * task.attempt } queue = 'regular' - errorStrategy = { task.exitStatus in 137..140 ? 'retry' : 'terminate' } - maxRetries = 5 - } + errorStrategy = { + if (task.exitStatus in 137..140) return 'retry' + else return 'ignore' + } + maxRetries = 3 + } + } + + process { withName: 'Multimer_Feature' { cpus = 8 - memory = { 40.GB + 10.GB * task.attempt } + memory = { 40.GB + 20.GB * task.attempt } queue = 'regular' - errorStrategy = { task.exitStatus in 137..140 ? 'retry' : 'terminate' } - maxRetries = 5 + errorStrategy = { + if (task.exitStatus in 137..140) return 'retry' + else return 'ignore' + } + maxRetries = 4 } + } + + process { withName: 'Multimer_Inference' { cpus = 10 memory = { 80.GB + 20.GB * task.attempt } queue = 'gpuq' - errorStrategy = { task.exitStatus in 137..140 ? 'retry' : 'terminate' } - maxRetries = 5 + errorStrategy = { + if (task.exitStatus in 137..140) return 'retry' + else return 'ignore' + } + maxRetries = 4 } } } From 0afb0ca4b4ec93e60d49898e6b098a7f4efc7a1d Mon Sep 17 00:00:00 2001 From: Rich <107657876+Birkinshaw@users.noreply.github.com> Date: Sat, 22 Nov 2025 10:48:49 +1100 Subject: [PATCH 3/8] Increase memory allocation for CountUniqueSequences --- nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextflow.config b/nextflow.config index 0847975..2ece62a 100644 --- a/nextflow.config +++ b/nextflow.config @@ -23,7 +23,7 @@ profiles { process { withName: 'CountUniqueSequences' { cpus = 2 - memory = { 4.GB + 10.GB * task.attempt } + memory = { 14.GB + 10.GB * task.attempt } queue = 'regular' errorStrategy = { if (task.exitStatus in 137..140) return 'retry' From b639b6e2bcaa6c66467f89a87bb19889b0c9cd0c Mon Sep 17 00:00:00 2001 From: Rich <107657876+Birkinshaw@users.noreply.github.com> Date: Sat, 22 Nov 2025 11:08:17 +1100 Subject: [PATCH 4/8] Increase CPU allocation for CountUniqueSequences --- nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextflow.config b/nextflow.config index 2ece62a..943bbb3 100644 --- a/nextflow.config +++ b/nextflow.config @@ -22,7 +22,7 @@ profiles { cleanup = false process { withName: 'CountUniqueSequences' { - cpus = 2 + cpus = 4 memory = { 14.GB + 10.GB * task.attempt } queue = 'regular' errorStrategy = { From 46eccabdbacae14b21414957b13f943859f2848d Mon Sep 17 00:00:00 2001 From: Rich <107657876+Birkinshaw@users.noreply.github.com> Date: Sat, 22 Nov 2025 11:09:51 +1100 Subject: [PATCH 5/8] Update nextflow.config --- nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextflow.config b/nextflow.config index 943bbb3..786ded8 100644 --- a/nextflow.config +++ b/nextflow.config @@ -23,7 +23,7 @@ profiles { process { withName: 'CountUniqueSequences' { cpus = 4 - memory = { 14.GB + 10.GB * task.attempt } + memory = { 4.GB + 4.GB * task.attempt } queue = 'regular' errorStrategy = { if (task.exitStatus in 137..140) return 'retry' From 2225457027c1e6ae3c084e14c5a7ce70271f6f50 Mon Sep 17 00:00:00 2001 From: Rich <107657876+Birkinshaw@users.noreply.github.com> Date: Sat, 22 Nov 2025 11:11:32 +1100 Subject: [PATCH 6/8] Increase CPU allocation for Multimer_Inference process --- nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextflow.config b/nextflow.config index 786ded8..ae1ad0d 100644 --- a/nextflow.config +++ b/nextflow.config @@ -48,7 +48,7 @@ profiles { process { withName: 'Multimer_Inference' { - cpus = 10 + cpus = 14 memory = { 80.GB + 20.GB * task.attempt } queue = 'gpuq' errorStrategy = { From 02b64b28f092b14c5ecf78fa3fe300a7a43c952f Mon Sep 17 00:00:00 2001 From: Rich <107657876+Birkinshaw@users.noreply.github.com> Date: Fri, 5 Dec 2025 13:44:03 +1100 Subject: [PATCH 7/8] Configure Alphafold2 process in nextflow.config Added process configuration for Alphafold2 with specific module. Also added appropriate time limits for jobs --- nextflow.config | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nextflow.config b/nextflow.config index ae1ad0d..6cc01dd 100644 --- a/nextflow.config +++ b/nextflow.config @@ -20,11 +20,19 @@ profiles { milton{ conda.enabled = true cleanup = false + + process { + withLabel:Alphafold2 { + module = 'alphafold/2.3.2' + } + } + process { withName: 'CountUniqueSequences' { cpus = 4 memory = { 4.GB + 4.GB * task.attempt } queue = 'regular' + time = '10.m' errorStrategy = { if (task.exitStatus in 137..140) return 'retry' else return 'ignore' @@ -32,12 +40,13 @@ profiles { maxRetries = 3 } } - + process { withName: 'Multimer_Feature' { cpus = 8 memory = { 40.GB + 20.GB * task.attempt } queue = 'regular' + time = '5.h' errorStrategy = { if (task.exitStatus in 137..140) return 'retry' else return 'ignore' @@ -51,6 +60,7 @@ profiles { cpus = 14 memory = { 80.GB + 20.GB * task.attempt } queue = 'gpuq' + time = '5.h' errorStrategy = { if (task.exitStatus in 137..140) return 'retry' else return 'ignore' From ee8aae2314274ca37fd7f257f41c2e70fe4a84f4 Mon Sep 17 00:00:00 2001 From: Rich <107657876+Birkinshaw@users.noreply.github.com> Date: Tue, 20 Jan 2026 15:31:35 +1100 Subject: [PATCH 8/8] Change publishDir mode from 'copy' to 'move' suggest moving to save on space --- modules/alphafold.nf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/alphafold.nf b/modules/alphafold.nf index 86d55ab..43418a5 100644 --- a/modules/alphafold.nf +++ b/modules/alphafold.nf @@ -23,8 +23,8 @@ process ALPHAFOLD_Feature{ tag "${fasta}" errorStrategy 'ignore' - publishDir "${params.outdir}/", mode: 'copy', pattern: "${fasta}/*.pkl" - publishDir "${params.outdir}", mode: 'copy', pattern: "${fasta}/msas/*" + publishDir "${params.outdir}/", mode: 'move', pattern: "${fasta}/*.pkl" + publishDir "${params.outdir}", mode: 'move', pattern: "${fasta}/msas/*" input: tuple val(fasta),path(fasta_file),val(preset) @@ -53,10 +53,10 @@ process ALPHAFOLD_Inference{ label 'Alphafold2' tag "${fasta}" - publishDir "${params.outdir}/", mode: 'copy', pattern: "${fasta}/*.pdb" - publishDir "${params.outdir}/", mode: 'copy', pattern: "${fasta}/*.json" - publishDir "${params.outdir}/", mode: 'copy', pattern: "${fasta}/*.pkl" - publishDir "${params.outdir}", mode: 'copy', pattern: "${fasta}/plots/*.pdf" + publishDir "${params.outdir}/", mode: 'move', pattern: "${fasta}/*.pdb" + publishDir "${params.outdir}/", mode: 'move', pattern: "${fasta}/*.json" + publishDir "${params.outdir}/", mode: 'move', pattern: "${fasta}/*.pkl" + publishDir "${params.outdir}", mode: 'move', pattern: "${fasta}/plots/*.pdf" output: path("${fasta}/*.pdb")