From 2213011b9c3f3e82d13df2518504f1cf98708118 Mon Sep 17 00:00:00 2001 From: ziadbkh Date: Wed, 3 Jun 2026 11:47:26 +1000 Subject: [PATCH 1/4] optional mmseqs output --- main.nf | 49 +++++++++++++++++++++++++++++++------------- nextflow.config | 2 +- nextflow_schema.json | 6 ++++++ workflows/wisps.nf | 34 ++++++++---------------------- 4 files changed, 51 insertions(+), 40 deletions(-) diff --git a/main.nf b/main.nf index 4ff48dd..6b9f766 100644 --- a/main.nf +++ b/main.nf @@ -77,23 +77,41 @@ workflow WF_WISPS { params.colabfold_batch_size, params.interaction_neighbours, params.pool, - params.pool_size, - params.iptm_threshold + params.pool_size ) ch_versions = ch_versions.mix(WISPS.out.versions) emit: - colabfold_predictions = WISPS.out.colabfold_predictions - boltz_predictions = WISPS.out.boltz_predictions - af3_predictions = WISPS.out.af3_predictions multiqc_report = WISPS.out.multiqc_report versions = WISPS.out.versions collated_versions = WISPS.out.collated_versions ipsae_report = WISPS.out.ipsae_report - msa_a3m = WISPS.out.msa_a3m - msa_json = WISPS.out.msa_json - msa_yaml = WISPS.out.msa_yaml - msa_csv = WISPS.out.msa_csv + msa_a3m = WISPS.out.msa_a3m.map{['a3m': it[1]]} + msa_json = WISPS.out.msa_json.map{['json': it[1]]} + msa_yaml = WISPS.out.msa_yaml.map{['yaml': it[1]]} + msa_csv = WISPS.out.msa_csv.map{['csv': it[1]]} + colabfold_predictions = WISPS.out.colabfold_scores + .join(WISPS.out.colabfold_pdb) + .map { ['score': params.iptm_threshold > 0 ? new groovy.json.JsonSlurper().parseText(it[1].text).iptm : null, + 'pdb': it[2], + 'confidence': it[1]] } + .filter{params.iptm_threshold == 0 || it.score >= params.iptm_threshold} + + boltz_predictions = WISPS.out.boltz_pae + .join(WISPS.out.boltz_cif) + .join(WISPS.out.boltz_confidence) + .map { ['confidence': it[3], + 'cif': it[2], + 'pae': it[1], + 'score': params.iptm_threshold > 0 ? new groovy.json.JsonSlurper().parseText(it[3].text).iptm : null] } + .filter{params.iptm_threshold == 0 || it.score >= params.iptm_threshold} + + af3_predictions = WISPS.out.alphafold3_confidence + .join(WISPS.out.alphafold3_cif) + .map { ['confidence': it[1], + 'cif': it[2], + 'score': params.iptm_threshold > 0 ? new groovy.json.JsonSlurper().parseText(it[1].text).iptm : null] } + .filter{params.iptm_threshold == 0 || it.score >= params.iptm_threshold} } /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -143,6 +161,7 @@ workflow { msa_json = WF_WISPS.out.msa_json.ifEmpty([]) msa_yaml = WF_WISPS.out.msa_yaml.ifEmpty([]) msa_csv = WF_WISPS.out.msa_csv.ifEmpty([]) + } output { @@ -175,16 +194,18 @@ output { path "ipsae/" } msa_a3m { - path "mmseqs/" + path "mmseqs/a3m/" } msa_json { - path "mmseqs/" + path "mmseqs/json/" } msa_yaml { - path 'mmseqs/' + path "mmseqs/yaml/" + enabled params.save_mmseqs_out } - msa_csv { - path 'mmseqs/' + msa_csv { + path "mmseqs/csv/" + enabled params.save_mmseqs_out } } diff --git a/nextflow.config b/nextflow.config index c717e89..92ebdd9 100644 --- a/nextflow.config +++ b/nextflow.config @@ -23,7 +23,7 @@ params { tools = "boltz,colabfold" db = null iptm_threshold = 0.6 - + save_mmseqs_out = true ipsae_pae_cutoff = 10 ipsae_dist_cutoff = 10 diff --git a/nextflow_schema.json b/nextflow_schema.json index 4eafbfa..7237a78 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -94,6 +94,12 @@ "description": "Use spire DB for search", "fa_icon": "fas fa-folder-open" }, + "save_mmseqs_out": { + "type": "boolean", + "default": true, + "description": "Save the output of mmseqs in the output directory. (disable if you want to reduce storage foot print)", + "fa_icon": "fas fa-microchip" + }, "email": { "type": "string", "description": "Email address for completion summary.", diff --git a/workflows/wisps.nf b/workflows/wisps.nf index 0518647..5ae2771 100644 --- a/workflows/wisps.nf +++ b/workflows/wisps.nf @@ -79,8 +79,7 @@ workflow WISPS { interaction_neighbours pool pool_size - iptm_threshold - + main: ch_multiqc_files = Channel.empty() ch_confidence_scores = Channel.empty() @@ -783,28 +782,13 @@ workflow WISPS { msa_json = MMSEQS_COLABFOLDSEARCH.out.json msa_yaml = MMSEQS_COLABFOLDSEARCH.out.yaml msa_csv = MMSEQS_COLABFOLDSEARCH.out.msa_csv - - colabfold_predictions = ch_colabfold_scores - .join(ch_colabfold_pdb) - .map { ['score': iptm_threshold > 0 ? new groovy.json.JsonSlurper().parseText(it[1].text).iptm : null, - 'pdb': it[2], - 'confidence': it[1]] } - .filter{iptm_threshold == 0 || it.score >= iptm_threshold} - - boltz_predictions = ch_boltz_pae - .join(ch_boltz_cif) - .join(ch_boltz_confidence) - .map { ['confidence': it[3], - 'cif': it[2], - 'pae': it[1], - 'score': iptm_threshold > 0 ? new groovy.json.JsonSlurper().parseText(it[3].text).iptm : null] } - .filter{iptm_threshold == 0 || it.score >= iptm_threshold} - - af3_predictions = ch_alphafold3_confidence - .join(ch_alphafold3_cif) - .map { ['confidence': it[1], - 'cif': it[2], - 'score': iptm_threshold > 0 ? new groovy.json.JsonSlurper().parseText(it[1].text).iptm : null] } - .filter{iptm_threshold == 0 || it.score >= iptm_threshold} + colabfold_scores = ch_colabfold_scores + colabfold_pdb = ch_colabfold_pdb + boltz_pae = ch_boltz_pae + boltz_cif = ch_boltz_cif + boltz_confidence = ch_boltz_confidence + alphafold3_confidence = ch_alphafold3_confidence + alphafold3_cif = ch_alphafold3_cif + } From cf16287079a574dcbfbc842ddc5e90a02306e952 Mon Sep 17 00:00:00 2001 From: ziadbkh Date: Wed, 3 Jun 2026 12:07:36 +1000 Subject: [PATCH 2/4] custom publishing mode --- nextflow.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nextflow.config b/nextflow.config index 92ebdd9..59256c0 100644 --- a/nextflow.config +++ b/nextflow.config @@ -22,7 +22,7 @@ params { colabfold_num_recycles = 3 tools = "boltz,colabfold" db = null - iptm_threshold = 0.6 + iptm_threshold = 0 save_mmseqs_out = true ipsae_pae_cutoff = 10 ipsae_dist_cutoff = 10 @@ -78,7 +78,7 @@ params { } outputDir = params.outdir - +workflow.output.mode = params.publish_dir_mode // Load base.config by default for all pipelines includeConfig 'conf/base.config' From ec06fdadad985ab3abc31435096911cd84cb85f1 Mon Sep 17 00:00:00 2001 From: ziadbkh Date: Wed, 3 Jun 2026 21:39:55 +1000 Subject: [PATCH 3/4] fixing channels for outputs --- main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.nf b/main.nf index 6b9f766..dc8bca9 100644 --- a/main.nf +++ b/main.nf @@ -157,7 +157,7 @@ workflow { multiqc_report = WF_WISPS.out.multiqc_report // channel: /path/to/multiqc_report.html //collated_versions = WF_WISPS.out.collated_versions ipsae_report = WF_WISPS.out.ipsae_report - msa_a3m = WF_WISPS.out.msa_a3m.map{it[1]} + msa_a3m = WF_WISPS.out.msa_a3m.ifEmpty([]) msa_json = WF_WISPS.out.msa_json.ifEmpty([]) msa_yaml = WF_WISPS.out.msa_yaml.ifEmpty([]) msa_csv = WF_WISPS.out.msa_csv.ifEmpty([]) From 90ab174e1e54735637d65bf080af233aed22dfcf Mon Sep 17 00:00:00 2001 From: ziadbkh Date: Wed, 3 Jun 2026 22:00:27 +1000 Subject: [PATCH 4/4] update optional channels --- main.nf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.nf b/main.nf index dc8bca9..e8eae7d 100644 --- a/main.nf +++ b/main.nf @@ -195,9 +195,11 @@ output { } msa_a3m { path "mmseqs/a3m/" + enabled params.save_mmseqs_out } msa_json { path "mmseqs/json/" + enabled params.save_mmseqs_out } msa_yaml { path "mmseqs/yaml/"