diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d8dd8c7..1cd12f4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: uses: adamrtalbot/detect-nf-test-changes@de3c3c8e113031b4f15a3c1104b5f135e8346997 # v0.0.6 with: head: ${{ github.sha }} - base: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }} + base: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || 'origin/main' }} n_parents: 0 - name: Select subworkflows diff --git a/classes/msa_guidetree.yml b/classes/msa_guidetree.yml index 489f563..c95f1f4 100644 --- a/classes/msa_guidetree.yml +++ b/classes/msa_guidetree.yml @@ -43,6 +43,7 @@ components: - clustalo/guidetree - famsa/guidetree - magus/guidetree + - mafft/guidetree testdata: - - "[ id:'test' ]" - "file(params.modules_testdata_base_path + 'genomics/eukaryotes/anemonia_sulcata/seatoxin-ref.aln', checkIfExists: true)" diff --git a/subworkflows/mirpedrol/msa_guidetree/main.nf b/subworkflows/mirpedrol/msa_guidetree/main.nf index 594308f..cb046d3 100644 --- a/subworkflows/mirpedrol/msa_guidetree/main.nf +++ b/subworkflows/mirpedrol/msa_guidetree/main.nf @@ -1,6 +1,7 @@ include { CLUSTALO_GUIDETREE } from '../../../modules/nf-core/clustalo/guidetree/main' include { FAMSA_GUIDETREE } from '../../../modules/nf-core/famsa/guidetree/main' include { MAGUS_GUIDETREE } from '../../../modules/nf-core/magus/guidetree/main' +include { MAFFT_GUIDETREE } from '../../../modules/nf-core/mafft/guidetree/main' workflow MSA_GUIDETREE { @@ -21,6 +22,8 @@ workflow MSA_GUIDETREE { return [ meta, fasta ] magus_guidetree: tool == "magus_guidetree" return [ meta, fasta ] + mafft_guidetree: tool == "mafft_guidetree" + return [ meta, fasta ] } .set { ch_fasta_branch } @@ -36,6 +39,10 @@ workflow MSA_GUIDETREE { ch_out_tree = ch_out_tree.mix(MAGUS_GUIDETREE.out.tree) ch_out_versions = ch_out_versions.mix(MAGUS_GUIDETREE.out.versions) + MAFFT_GUIDETREE( ch_fasta_branch.mafft_guidetree ) + ch_out_tree = ch_out_tree.mix(MAFFT_GUIDETREE.out.tree) + ch_out_versions = ch_out_versions.mix(MAFFT_GUIDETREE.out.versions) + emit: diff --git a/subworkflows/mirpedrol/msa_guidetree/meta.yml b/subworkflows/mirpedrol/msa_guidetree/meta.yml index 1fa9b2a..63ca584 100644 --- a/subworkflows/mirpedrol/msa_guidetree/meta.yml +++ b/subworkflows/mirpedrol/msa_guidetree/meta.yml @@ -9,6 +9,8 @@ components: git_remote: "https://github.com/nf-core/modules.git" - magus/guidetree: git_remote: "https://github.com/nf-core/modules.git" + - mafft/guidetree: + git_remote: "https://github.com/nf-core/modules.git" input: - ch_fasta: diff --git a/subworkflows/mirpedrol/msa_guidetree/tests/main.nf.test b/subworkflows/mirpedrol/msa_guidetree/tests/main.nf.test index 20ca74a..b5a4cb2 100644 --- a/subworkflows/mirpedrol/msa_guidetree/tests/main.nf.test +++ b/subworkflows/mirpedrol/msa_guidetree/tests/main.nf.test @@ -10,6 +10,7 @@ nextflow_workflow { tag "subworkflows/../../modules/nf-core/clustalo/guidetree" tag "subworkflows/../../modules/nf-core/famsa/guidetree" tag "subworkflows/../../modules/nf-core/magus/guidetree" + tag "subworkflows/../../modules/nf-core/mafft/guidetree" test("clustalo/guidetree") { @@ -66,7 +67,24 @@ nextflow_workflow { { assert path(workflow.out.tree[0][1]).getText().contains("1sh1") }, { assert path(workflow.out.tree[0][1]).getText().contains("1apf") }, { assert path(workflow.out.tree[0][1]).getText().contains("1ahl") }, - { assert snapshot(workflow.out.versions).match("magus/guidetree") }, + ) + } + } + + test("mafft/guidetree") { + + when { + workflow { + """ + input[0] = Channel.of( [[ id:'test' ], file(params.modules_testdata_base_path + 'genomics/eukaryotes/anemonia_sulcata/seatoxin-ref.aln', checkIfExists: true), 'mafft_guidetree'] ) + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot(workflow.out).match("mafft/guidetree") }, ) } } diff --git a/subworkflows/mirpedrol/msa_guidetree/tests/main.nf.test.snap b/subworkflows/mirpedrol/msa_guidetree/tests/main.nf.test.snap index be8ab65..2885656 100644 --- a/subworkflows/mirpedrol/msa_guidetree/tests/main.nf.test.snap +++ b/subworkflows/mirpedrol/msa_guidetree/tests/main.nf.test.snap @@ -32,6 +32,39 @@ }, "timestamp": "2025-08-01T12:21:33.436132015" }, + "mafft/guidetree": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.dnd:md5,f3510ecc52655e1827658396aec90b24" + ] + ], + "1": [ + "versions.yml:md5,995c0bd161578e9d638264659f5e55b5" + ], + "tree": [ + [ + { + "id": "test" + }, + "test.dnd:md5,f3510ecc52655e1827658396aec90b24" + ] + ], + "versions": [ + "versions.yml:md5,995c0bd161578e9d638264659f5e55b5" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.10.0" + }, + "timestamp": "2025-11-26T14:46:56.709060689" + }, "clustalo/guidetree": { "content": [ { @@ -77,4 +110,4 @@ }, "timestamp": "2025-08-19T13:46:43.306273138" } -} +} \ No newline at end of file