diff --git a/classes/msa_treealign.yml b/classes/msa_treealign.yml index eb5af36..99ce992 100644 --- a/classes/msa_treealign.yml +++ b/classes/msa_treealign.yml @@ -52,6 +52,8 @@ components: - famsa/align - magus/align - tcoffee/align + - tcoffee/regressive + - upp/align testdata: - - "[ id:'test' ]" - "file(params.modules_testdata_base_path + 'genomics/eukaryotes/anemonia_sulcata/seatoxin-ref.aln', checkIfExists: true)" diff --git a/subworkflows/mirpedrol/msa_treealign/main.nf b/subworkflows/mirpedrol/msa_treealign/main.nf index a150661..976a53a 100644 --- a/subworkflows/mirpedrol/msa_treealign/main.nf +++ b/subworkflows/mirpedrol/msa_treealign/main.nf @@ -2,6 +2,8 @@ include { CLUSTALO_ALIGN } from '../../../modules/nf-core/clustalo/align/main' include { FAMSA_ALIGN } from '../../../modules/nf-core/famsa/align/main' include { MAGUS_ALIGN } from '../../../modules/nf-core/magus/align/main' include { TCOFFEE_ALIGN } from '../../../modules/nf-core/tcoffee/align/main' +include { TCOFFEE_REGRESSIVE } from '../../../modules/nf-core/tcoffee/regressive/main' +include { UPP_ALIGN } from '../../../modules/nf-core/upp/align/main' workflow MSA_TREEALIGN { @@ -25,6 +27,10 @@ workflow MSA_TREEALIGN { return [ meta, fasta ] tcoffee_align: tool == "tcoffee_align" return [ meta, fasta ] + tcoffee_regressive: tool == "tcoffee_regressive" + return [ meta, fasta ] + upp_align: tool == "upp_align" + return [ meta, fasta ] } .set { ch_fasta_branch } ch_tree @@ -38,6 +44,10 @@ workflow MSA_TREEALIGN { return [ meta, tree ] tcoffee_align: tool == "tcoffee_align" return [ meta, tree ] + tcoffee_regressive: tool == "tcoffee_regressive" + return [ meta, tree ] + upp_align: tool == "upp_align" + return [ meta, tree ] } .set { ch_tree_branch } @@ -57,6 +67,14 @@ workflow MSA_TREEALIGN { ch_out_alignment = ch_out_alignment.mix(TCOFFEE_ALIGN.out.alignment) ch_out_versions = ch_out_versions.mix(TCOFFEE_ALIGN.out.versions) + TCOFFEE_REGRESSIVE( ch_fasta_branch.tcoffee_regressive, ch_tree_branch.tcoffee_regressive, [[], [], []], [] ) + ch_out_alignment = ch_out_alignment.mix(TCOFFEE_REGRESSIVE.out.alignment) + ch_out_versions = ch_out_versions.mix(TCOFFEE_REGRESSIVE.out.versions) + + UPP_ALIGN( ch_fasta_branch.upp_align, ch_tree_branch.upp_align, [] ) + ch_out_alignment = ch_out_alignment.mix(UPP_ALIGN.out.alignment) + ch_out_versions = ch_out_versions.mix(UPP_ALIGN.out.versions) + emit: diff --git a/subworkflows/mirpedrol/msa_treealign/meta.yml b/subworkflows/mirpedrol/msa_treealign/meta.yml index 7056d1e..828b526 100644 --- a/subworkflows/mirpedrol/msa_treealign/meta.yml +++ b/subworkflows/mirpedrol/msa_treealign/meta.yml @@ -11,6 +11,10 @@ components: git_remote: "https://github.com/nf-core/modules.git" - tcoffee/align: git_remote: "https://github.com/nf-core/modules.git" + - tcoffee/regressive: + git_remote: "https://github.com/nf-core/modules.git" + - upp/align: + git_remote: "https://github.com/nf-core/modules.git" input: - ch_fasta: diff --git a/subworkflows/mirpedrol/msa_treealign/msa_treealign.diff b/subworkflows/mirpedrol/msa_treealign/msa_treealign.diff new file mode 100644 index 0000000..76684c8 --- /dev/null +++ b/subworkflows/mirpedrol/msa_treealign/msa_treealign.diff @@ -0,0 +1,19 @@ +Changes in component 'mirpedrol/msa_treealign' +'subworkflows/mirpedrol/msa_treealign/.nf-test.log' was created +'subworkflows/mirpedrol/msa_treealign/meta.yml' is unchanged +'subworkflows/mirpedrol/msa_treealign/main.nf' is unchanged +'subworkflows/mirpedrol/msa_treealign/tests/main.nf.test.snap' was created +'subworkflows/mirpedrol/msa_treealign/tests/nextflow.config' was created +Changes in 'msa_treealign/tests/main.nf.test': +--- subworkflows/mirpedrol/msa_treealign/tests/main.nf.test ++++ subworkflows/mirpedrol/msa_treealign/tests/main.nf.test +@@ -111,6 +111,7 @@ + } + + test("upp/align") { ++ config "./nextflow.config" + + when { + workflow { + +************************************************************ diff --git a/subworkflows/mirpedrol/msa_treealign/tests/main.nf.test b/subworkflows/mirpedrol/msa_treealign/tests/main.nf.test index 80a9d23..df781f6 100644 --- a/subworkflows/mirpedrol/msa_treealign/tests/main.nf.test +++ b/subworkflows/mirpedrol/msa_treealign/tests/main.nf.test @@ -11,6 +11,8 @@ nextflow_workflow { tag "subworkflows/../../modules/nf-core/famsa/align" tag "subworkflows/../../modules/nf-core/magus/align" tag "subworkflows/../../modules/nf-core/tcoffee/align" + tag "subworkflows/../../modules/nf-core/tcoffee/regressive" + tag "subworkflows/../../modules/nf-core/upp/align" test("clustalo/align") { @@ -89,5 +91,44 @@ nextflow_workflow { } } + test("tcoffee/regressive") { + + when { + workflow { + """ + input[0] = Channel.of( [[ id:'test' ], file(params.modules_testdata_base_path + 'genomics/eukaryotes/anemonia_sulcata/seatoxin-ref.aln', checkIfExists: true), 'tcoffee_regressive'] ) + input[1] = Channel.of( [[ id:'test' ], file(params.modules_testdata_base_path + 'genomics/eukaryotes/anemonia_sulcata/seatoxin-ref.dnd', checkIfExists: true), 'tcoffee_regressive'] ) + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot(workflow.out).match("tcoffee/regressive") }, + ) + } + } + + test("upp/align") { + config "./nextflow.config" + + when { + workflow { + """ + input[0] = Channel.of( [[ id:'test' ], file(params.modules_testdata_base_path + 'genomics/eukaryotes/anemonia_sulcata/seatoxin-ref.aln', checkIfExists: true), 'upp_align'] ) + input[1] = Channel.of( [[ id:'test' ], file(params.modules_testdata_base_path + 'genomics/eukaryotes/anemonia_sulcata/seatoxin-ref.dnd', checkIfExists: true), 'upp_align'] ) + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot(workflow.out).match("upp/align") }, + ) + } + } + } \ No newline at end of file diff --git a/subworkflows/mirpedrol/msa_treealign/tests/main.nf.test.snap b/subworkflows/mirpedrol/msa_treealign/tests/main.nf.test.snap index 76afd48..048f03e 100644 --- a/subworkflows/mirpedrol/msa_treealign/tests/main.nf.test.snap +++ b/subworkflows/mirpedrol/msa_treealign/tests/main.nf.test.snap @@ -44,7 +44,7 @@ ] ], "1": [ - "versions.yml:md5,dc23c65f66a62f337556459f11efb7b3" + "versions.yml:md5,a1ee55248052d51e7dea2c7ae59d27d7" ], "alignment": [ [ @@ -55,7 +55,7 @@ ] ], "versions": [ - "versions.yml:md5,dc23c65f66a62f337556459f11efb7b3" + "versions.yml:md5,a1ee55248052d51e7dea2c7ae59d27d7" ] } ], @@ -65,6 +65,40 @@ }, "timestamp": "2025-08-01T14:08:10.972913645" }, + "tcoffee/regressive": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.aln:md5,a399645e1b14b858ccc9aef57ce3d9f8" + ] + + ], + "1": [ + "versions.yml:md5,167b47da97b1e1b8f168aa85495245b4" + ], + "alignment": [ + [ + { + "id": "test" + }, + "test.aln:md5,a399645e1b14b858ccc9aef57ce3d9f8" + ] + ], + "versions": [ + "versions.yml:md5,167b47da97b1e1b8f168aa85495245b4" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.10.0" + }, + "timestamp": "2025-11-26T14:48:00.884458852" + }, "magus/align": { "content": [ { @@ -130,5 +164,38 @@ "nextflow": "25.04.6" }, "timestamp": "2025-08-01T14:09:48.216260207" + }, + "upp/align": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.aln:md5,a543b6c4d215628c0307111268496557" + ] + ], + "1": [ + "versions.yml:md5,480e12b84ba1a750dc9e347a0ee77d1b" + ], + "alignment": [ + [ + { + "id": "test" + }, + "test.aln:md5,a543b6c4d215628c0307111268496557" + ] + ], + "versions": [ + "versions.yml:md5,480e12b84ba1a750dc9e347a0ee77d1b" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.10.0" + }, + "timestamp": "2025-11-26T14:48:08.969096652" } -} \ No newline at end of file +} diff --git a/subworkflows/mirpedrol/msa_treealign/tests/nextflow.config b/subworkflows/mirpedrol/msa_treealign/tests/nextflow.config new file mode 100644 index 0000000..30ae1f4 --- /dev/null +++ b/subworkflows/mirpedrol/msa_treealign/tests/nextflow.config @@ -0,0 +1,7 @@ +process { + + withName: "UPP_ALIGN" { + ext.args = { "-m amino" } + } + +}