Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions classes/msa_alignment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
14 changes: 14 additions & 0 deletions subworkflows/mirpedrol/msa_alignment/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 }

Expand Down Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions subworkflows/mirpedrol/msa_alignment/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
39 changes: 38 additions & 1 deletion subworkflows/mirpedrol/msa_alignment/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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") },
)
}
}
Expand Down Expand Up @@ -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") },
)
}
}


}
70 changes: 68 additions & 2 deletions subworkflows/mirpedrol/msa_alignment/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
]
],
"1": [
"versions.yml:md5,c74ca8b91c442fc4ea29219ee1b724fd"
"versions.yml:md5,662446ba7a24e755a11692e9302e4895"
],
"alignment": [
[
Expand All @@ -55,7 +55,7 @@
]
],
"versions": [
"versions.yml:md5,c74ca8b91c442fc4ea29219ee1b724fd"
"versions.yml:md5,662446ba7a24e755a11692e9302e4895"
]
}
],
Expand All @@ -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": [
{
Expand Down Expand Up @@ -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"
}
}
3 changes: 3 additions & 0 deletions subworkflows/mirpedrol/msa_alignment/tests/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ process {
withName: 'MSA_ALIGNMENT:TCOFFEE_ALIGN'{
ext.args = { "-output fasta_aln" }
}
withName: "MSA_ALIGNMENT:UPP_ALIGN" {
ext.args = { "-m amino" }
}
}
Loading