diff --git a/classes/msa_alignment.yml b/classes/msa_alignment.yml index 4629db1..70f00b0 100644 --- a/classes/msa_alignment.yml +++ b/classes/msa_alignment.yml @@ -47,6 +47,8 @@ components: - magus/align - muscle5/super5 - tcoffee/align # Needs an argument to return the alignment in fasta + - 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_alignment/main.nf b/subworkflows/mirpedrol/msa_alignment/main.nf index 0f21560..f340871 100644 --- a/subworkflows/mirpedrol/msa_alignment/main.nf +++ b/subworkflows/mirpedrol/msa_alignment/main.nf @@ -5,6 +5,8 @@ include { LEARNMSA_ALIGN } from '../../../modules/nf-core/learnmsa/align/main' include { MAGUS_ALIGN } from '../../../modules/nf-core/magus/align/main' include { MUSCLE5_SUPER5 } from '../../../modules/nf-core/muscle5/super5/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_ALIGNMENT { @@ -33,6 +35,10 @@ workflow MSA_ALIGNMENT { 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 } @@ -64,6 +70,14 @@ workflow MSA_ALIGNMENT { 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_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_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_alignment/meta.yml b/subworkflows/mirpedrol/msa_alignment/meta.yml index 4f5d7f3..9cc186d 100644 --- a/subworkflows/mirpedrol/msa_alignment/meta.yml +++ b/subworkflows/mirpedrol/msa_alignment/meta.yml @@ -17,6 +17,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_alignment/tests/main.nf.test b/subworkflows/mirpedrol/msa_alignment/tests/main.nf.test index 720acb7..a4a28ab 100644 --- a/subworkflows/mirpedrol/msa_alignment/tests/main.nf.test +++ b/subworkflows/mirpedrol/msa_alignment/tests/main.nf.test @@ -14,6 +14,8 @@ nextflow_workflow { tag "subworkflows/../../modules/nf-core/magus/align" tag "subworkflows/../../modules/nf-core/muscle5/super5" tag "subworkflows/../../modules/nf-core/tcoffee/align" + tag "subworkflows/../../modules/nf-core/tcoffee/regressive" + tag "subworkflows/../../modules/nf-core/upp/align" config './nextflow.config' @@ -108,7 +110,6 @@ nextflow_workflow { { assert path(workflow.out.alignment[0][1]).getText().contains("1sh1") }, { assert path(workflow.out.alignment[0][1]).getText().contains("1apf") }, { assert path(workflow.out.alignment[0][1]).getText().contains("1ahl") }, - { assert snapshot(workflow.out.versions).match("magus/align") }, ) } } @@ -149,5 +150,41 @@ 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'] ) + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot(workflow.out).match("tcoffee/regressive") }, + ) + } + } + + test("upp/align") { + + 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'] ) + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot(workflow.out).match("upp/align") }, + ) + } + } + } \ No newline at end of file diff --git a/subworkflows/mirpedrol/msa_alignment/tests/main.nf.test.snap b/subworkflows/mirpedrol/msa_alignment/tests/main.nf.test.snap index 7ec9c2a..4d6ea80 100644 --- a/subworkflows/mirpedrol/msa_alignment/tests/main.nf.test.snap +++ b/subworkflows/mirpedrol/msa_alignment/tests/main.nf.test.snap @@ -44,7 +44,7 @@ ] ], "1": [ - "versions.yml:md5,c74ca8b91c442fc4ea29219ee1b724fd" + "versions.yml:md5,662446ba7a24e755a11692e9302e4895" ], "alignment": [ [ @@ -55,7 +55,7 @@ ] ], "versions": [ - "versions.yml:md5,c74ca8b91c442fc4ea29219ee1b724fd" + "versions.yml:md5,662446ba7a24e755a11692e9302e4895" ] } ], @@ -65,6 +65,39 @@ }, "timestamp": "2025-07-31T13:38:19.076634506" }, + "tcoffee/regressive": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.aln:md5,a399645e1b14b858ccc9aef57ce3d9f8" + ] + ], + "1": [ + "versions.yml:md5,919b5de419f7e8355773808305cc9da5" + ], + "alignment": [ + [ + { + "id": "test" + }, + "test.aln:md5,a399645e1b14b858ccc9aef57ce3d9f8" + ] + ], + "versions": [ + "versions.yml:md5,919b5de419f7e8355773808305cc9da5" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.10.0" + }, + "timestamp": "2025-11-26T14:51:10.271917631" + }, "learnmsa/align - stub": { "content": [ { @@ -208,5 +241,38 @@ "nextflow": "25.04.6" }, "timestamp": "2025-08-01T07:27:07.276478754" + }, + "upp/align": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.aln:md5,a543b6c4d215628c0307111268496557" + ] + ], + "1": [ + "versions.yml:md5,2c5ca42adf5dc958969926ab31eedb2a" + ], + "alignment": [ + [ + { + "id": "test" + }, + "test.aln:md5,a543b6c4d215628c0307111268496557" + ] + ], + "versions": [ + "versions.yml:md5,2c5ca42adf5dc958969926ab31eedb2a" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.10.0" + }, + "timestamp": "2025-11-26T14:51:18.37628695" } } diff --git a/subworkflows/mirpedrol/msa_alignment/tests/nextflow.config b/subworkflows/mirpedrol/msa_alignment/tests/nextflow.config index 466c2bc..ac2a9a9 100644 --- a/subworkflows/mirpedrol/msa_alignment/tests/nextflow.config +++ b/subworkflows/mirpedrol/msa_alignment/tests/nextflow.config @@ -5,4 +5,7 @@ process { withName: 'MSA_ALIGNMENT:TCOFFEE_ALIGN'{ ext.args = { "-output fasta_aln" } } + withName: "MSA_ALIGNMENT:UPP_ALIGN" { + ext.args = { "-m amino" } + } }