diff --git a/modules/nf-core/mafft/align/main.nf b/modules/nf-core/mafft/align/main.nf index 650c70761390..9ac0233a30a5 100644 --- a/modules/nf-core/mafft/align/main.nf +++ b/modules/nf-core/mafft/align/main.nf @@ -18,7 +18,7 @@ process MAFFT_ALIGN { output: tuple val(meta), path("*.fas{.gz,}"), emit: fas - tuple val("${task.process}"), val("mafft"), eval("mafft --version 2>&1 | sed 's/ (.*) //g'"), topic: versions, emit: versions_mafft + tuple val("${task.process}"), val("mafft"), eval("mafft --version 2>&1 | sed 's/v//;s/ .*//'"), topic: versions, emit: versions_mafft tuple val("${task.process}"), val("pigz"), eval("pigz --version 2>&1 | sed 's/pigz //g'") , topic: versions, emit: versions_pigz when: @@ -49,14 +49,11 @@ process MAFFT_ALIGN { """ stub: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - if ("$fasta" == "${prefix}.fas" ) error "Input and output names are the same, set prefix in module configuration to disambiguate!" + if ("${fasta}" == "${prefix}.fas" ) error "Input and output names are the same, set prefix in module configuration to disambiguate!" """ - echo ${args} - - if [[ "$compress" == "true" ]]; then - echo "" | pigz -cp ${task.cpus} > ${prefix}.fas.gz + if [[ "${compress}" == "true" ]]; then + echo "" | gzip > ${prefix}.fas.gz else touch ${prefix}.fas fi diff --git a/modules/nf-core/mafft/align/meta.yml b/modules/nf-core/mafft/align/meta.yml index 0454b10546ad..b1a80802cd96 100644 --- a/modules/nf-core/mafft/align/meta.yml +++ b/modules/nf-core/mafft/align/meta.yml @@ -6,13 +6,14 @@ keywords: - multiple sequence alignment tools: - "mafft": - description: Multiple alignment program for amino acid or nucleotide sequences - based on fast Fourier transform + description: Multiple alignment program for amino acid or nucleotide + sequences based on fast Fourier transform homepage: https://mafft.cbrc.jp/alignment/software/ documentation: https://mafft.cbrc.jp/alignment/software/manual/manual.html tool_dev_url: https://mafft.cbrc.jp/alignment/software/source.html doi: "10.1093/nar/gkf436" - licence: ["BSD"] + licence: + - "BSD" identifier: biotools:MAFFT - "pigz": description: "Parallel implementation of the gzip algorithm." @@ -27,8 +28,8 @@ input: e.g. [ id:'test', single_end:false ] - fasta: type: file - description: FASTA file containing the sequences to align. May be gzipped or - uncompressed. + description: FASTA file containing the sequences to align. May be gzipped + or uncompressed. pattern: "*.{fa,fasta}{.gz,}" ontologies: - edam: http://edamontology.org/format_1919 # SEQUENCE-LIKE @@ -40,8 +41,8 @@ input: e.g. [ id:'test', single_end:false ] - add: type: file - description: FASTA file containing sequences to align to the sequences in `fasta` - using `--add`. May be gzipped or uncompressed. + description: FASTA file containing sequences to align to the sequences in + `fasta` using `--add`. May be gzipped or uncompressed. pattern: "*.{fa,fasta}{.gz,}" ontologies: - edam: http://edamontology.org/format_1919 # SEQUENCE-LIKE @@ -53,8 +54,8 @@ input: e.g. [ id:'test', single_end:false ] - addfragments: type: file - description: FASTA file containing sequences to align to the sequences in `fasta` - using `--addfragments`. May be gzipped or uncompressed. + description: FASTA file containing sequences to align to the sequences in + `fasta` using `--addfragments`. May be gzipped or uncompressed. pattern: "*.{fa,fasta}{.gz,}" ontologies: - edam: http://edamontology.org/format_1919 # SEQUENCE-LIKE @@ -66,8 +67,8 @@ input: e.g. [ id:'test', single_end:false ] - addfull: type: file - description: FASTA file containing sequences to align to the sequences in `fasta` - using `--addfull`. May be gzipped or uncompressed. + description: FASTA file containing sequences to align to the sequences in + `fasta` using `--addfull`. May be gzipped or uncompressed. pattern: "*.{fa,fasta}{.gz,}" ontologies: - edam: http://edamontology.org/format_1919 # SEQUENCE-LIKE @@ -79,8 +80,8 @@ input: e.g. [ id:'test', single_end:false ] - addprofile: type: file - description: FASTA file containing sequences to align to the sequences in `fasta` - using `--addprofile`. May be gzipped or uncompressed. + description: FASTA file containing sequences to align to the sequences in + `fasta` using `--addprofile`. May be gzipped or uncompressed. pattern: "*.{fa,fasta}{.gz,}" ontologies: - edam: http://edamontology.org/format_1919 # SEQUENCE-LIKE @@ -92,17 +93,17 @@ input: e.g. [ id:'test', single_end:false ] - addlong: type: file - description: FASTA file containing sequences to align to the sequences in `fasta` - using `--addlong`. May be gzipped or uncompressed. + description: FASTA file containing sequences to align to the sequences in + `fasta` using `--addlong`. May be gzipped or uncompressed. pattern: "*.{fa,fasta}{.gz,}" ontologies: - edam: http://edamontology.org/format_1919 # SEQUENCE-LIKE - edam: http://edamontology.org/format_1929 # FASTA - compress: type: boolean - description: Flag representing whether the output MSA should be compressed. Set - to true to enable/false to disable compression. Compression is done using pigz, - and is multithreaded. + description: Flag representing whether the output MSA should be compressed. + Set to true to enable/false to disable compression. Compression is done + using pigz, and is multithreaded. output: fas: - - meta: @@ -112,7 +113,8 @@ output: e.g. [ id:'test', single_end:false ] - "*.fas{.gz,}": type: file - description: Aligned sequences in FASTA format. May be gzipped or uncompressed. + description: Aligned sequences in FASTA format. May be gzipped or + uncompressed. pattern: "*.fas{.gz,}" ontologies: - edam: http://edamontology.org/format_2554 # ALIGNMENT FORMAT TXT @@ -125,9 +127,10 @@ output: - mafft: type: string description: The tool name - - mafft --version 2>&1 | sed 's/ (.*) //g': + - mafft --version 2>&1 | sed 's/v//;s/ .*//': type: eval - description: The tool version + description: The expression to obtain the version of the tool + versions_pigz: - - ${task.process}: type: string @@ -147,9 +150,10 @@ topics: - mafft: type: string description: The tool name - - mafft --version 2>&1 | sed 's/ (.*) //g': + - mafft --version 2>&1 | sed 's/v//;s/ .*//': type: eval - description: The tool version + description: The expression to obtain the version of the tool + - - ${task.process}: type: string description: The process name diff --git a/modules/nf-core/mafft/align/tests/main.nf.test b/modules/nf-core/mafft/align/tests/main.nf.test index ffdbf69f7fab..fc58ca218adc 100644 --- a/modules/nf-core/mafft/align/tests/main.nf.test +++ b/modules/nf-core/mafft/align/tests/main.nf.test @@ -13,7 +13,7 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/scaffolds.fasta', checkIfExists: true) ] input[1] = [[:], []] @@ -29,7 +29,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } @@ -40,7 +40,7 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/scaffolds.fasta', checkIfExists: true) ] input[1] = [[:], []] @@ -56,7 +56,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } @@ -68,10 +68,10 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] - input[1] = [[ id:'test', single_end:false ], // meta map + input[1] = [[ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/alignment/informative_sites.fas', checkIfExists: true) ] input[2] = [[:], []] @@ -86,7 +86,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } @@ -97,12 +97,12 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] input[1] = [[:], []] input[2] = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/alignment/informative_sites.fas', checkIfExists: true) ] input[3] = [[:], []] @@ -116,7 +116,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } @@ -127,12 +127,12 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] input[1] = [[:], []] input[2] = [[:], []] - input[3] = [[ id:'test', single_end:false ], // meta map + input[3] = [[ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/alignment/informative_sites.fas', checkIfExists: true) ] input[4] = [[:], []] @@ -145,7 +145,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } @@ -157,13 +157,13 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] input[1] = [[:], []] input[2] = [[:], []] input[3] = [[:], []] - input[4] = [[ id:'test', single_end:false ], // meta map + input[4] = [[ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/alignment/informative_sites.fas', checkIfExists: true) ] input[5] = [[:], []] @@ -175,7 +175,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } @@ -187,7 +187,7 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] input[1] = [[:], []] @@ -195,7 +195,7 @@ nextflow_process { input[3] = [[:], []] input[4] = [[:], []] input[5] = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/alignment/informative_sites.fas', checkIfExists: true) ] input[6] = true @@ -206,7 +206,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } @@ -218,15 +218,15 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] input[1] = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/alignment/all_sites.fas', checkIfExists: true) ] input[2] = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/alignment/informative_sites.fas', checkIfExists: true) ] input[3] = [[:], []] @@ -240,7 +240,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } @@ -254,7 +254,7 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/scaffolds.fasta', checkIfExists: true) ] input[1] = [[:], []] @@ -270,7 +270,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } @@ -284,7 +284,7 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/scaffolds.fasta', checkIfExists: true) ] input[1] = [[:], []] @@ -300,7 +300,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } diff --git a/modules/nf-core/mafft/align/tests/main.nf.test.snap b/modules/nf-core/mafft/align/tests/main.nf.test.snap index 3592efee4295..b67200060c82 100644 --- a/modules/nf-core/mafft/align/tests/main.nf.test.snap +++ b/modules/nf-core/mafft/align/tests/main.nf.test.snap @@ -2,34 +2,10 @@ "SARS-CoV-2 scaffolds fasta - uncompressed": { "content": [ { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fas:md5,23426611f4a0df532b6708f072bd445b" - ] - ], - "1": [ - [ - "MAFFT_ALIGN", - "mafft", - "v7.520 (2023/Mar/22)" - ] - ], - "2": [ - [ - "MAFFT_ALIGN", - "pigz", - "2.8" - ] - ], "fas": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.fas:md5,23426611f4a0df532b6708f072bd445b" ] @@ -38,7 +14,7 @@ [ "MAFFT_ALIGN", "mafft", - "v7.520 (2023/Mar/22)" + "7.520" ] ], "versions_pigz": [ @@ -50,43 +26,19 @@ ] } ], + "timestamp": "2026-06-19T14:28:31.167347642", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2026-01-19T10:38:43.199027303" + "nf-test": "0.9.5", + "nextflow": "26.04.3" + } }, "SARS-CoV-2 scaffolds fasta - add informative sites fasta normal": { "content": [ { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fas.gz:md5,a57a34f1c566dea114dc1b13416536d4" - ] - ], - "1": [ - [ - "MAFFT_ALIGN", - "mafft", - "v7.520 (2023/Mar/22)" - ] - ], - "2": [ - [ - "MAFFT_ALIGN", - "pigz", - "2.8" - ] - ], "fas": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.fas.gz:md5,a57a34f1c566dea114dc1b13416536d4" ] @@ -95,7 +47,7 @@ [ "MAFFT_ALIGN", "mafft", - "v7.520 (2023/Mar/22)" + "7.520" ] ], "versions_pigz": [ @@ -107,43 +59,19 @@ ] } ], + "timestamp": "2026-06-19T14:28:59.230022724", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2026-01-19T10:41:17.409844151" + "nf-test": "0.9.5", + "nextflow": "26.04.3" + } }, "SARS-CoV-2 scaffolds fasta - add informative sites fasta long": { "content": [ { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fas.gz:md5,e8868da70d1f3050a8daaee0e53b2fd9" - ] - ], - "1": [ - [ - "MAFFT_ALIGN", - "mafft", - "v7.520 (2023/Mar/22)" - ] - ], - "2": [ - [ - "MAFFT_ALIGN", - "pigz", - "2.8" - ] - ], "fas": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.fas.gz:md5,e8868da70d1f3050a8daaee0e53b2fd9" ] @@ -152,7 +80,7 @@ [ "MAFFT_ALIGN", "mafft", - "v7.520 (2023/Mar/22)" + "7.520" ] ], "versions_pigz": [ @@ -164,43 +92,19 @@ ] } ], + "timestamp": "2026-06-19T14:29:26.801447396", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2026-01-19T10:41:42.367899888" + "nf-test": "0.9.5", + "nextflow": "26.04.3" + } }, "SARS-CoV-2 scaffolds fasta - add informative sites fasta profile": { "content": [ { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fas.gz:md5,c2b5caf39beff4473878e6aa4036ad43" - ] - ], - "1": [ - [ - "MAFFT_ALIGN", - "mafft", - "v7.520 (2023/Mar/22)" - ] - ], - "2": [ - [ - "MAFFT_ALIGN", - "pigz", - "2.8" - ] - ], "fas": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.fas.gz:md5,c2b5caf39beff4473878e6aa4036ad43" ] @@ -209,7 +113,7 @@ [ "MAFFT_ALIGN", "mafft", - "v7.520 (2023/Mar/22)" + "7.520" ] ], "versions_pigz": [ @@ -221,43 +125,19 @@ ] } ], + "timestamp": "2026-06-19T14:29:19.996880067", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2026-01-19T10:41:35.856674659" + "nf-test": "0.9.5", + "nextflow": "26.04.3" + } }, "SARS-CoV-2 scaffolds fasta - add informative sites fasta fragments": { "content": [ { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fas.gz:md5,aed7f866c3a20dc9d2f2b4ad73515961" - ] - ], - "1": [ - [ - "MAFFT_ALIGN", - "mafft", - "v7.520 (2023/Mar/22)" - ] - ], - "2": [ - [ - "MAFFT_ALIGN", - "pigz", - "2.8" - ] - ], "fas": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.fas.gz:md5,aed7f866c3a20dc9d2f2b4ad73515961" ] @@ -266,7 +146,7 @@ [ "MAFFT_ALIGN", "mafft", - "v7.520 (2023/Mar/22)" + "7.520" ] ], "versions_pigz": [ @@ -278,43 +158,19 @@ ] } ], + "timestamp": "2026-06-19T14:29:06.311696498", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2026-01-19T10:41:23.565101965" + "nf-test": "0.9.5", + "nextflow": "26.04.3" + } }, "SARS-CoV-2 scaffolds fasta - add informative sites all sites fasta multiple": { "content": [ { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fas.gz:md5,aed7f866c3a20dc9d2f2b4ad73515961" - ] - ], - "1": [ - [ - "MAFFT_ALIGN", - "mafft", - "v7.520 (2023/Mar/22)" - ] - ], - "2": [ - [ - "MAFFT_ALIGN", - "pigz", - "2.8" - ] - ], "fas": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.fas.gz:md5,aed7f866c3a20dc9d2f2b4ad73515961" ] @@ -323,7 +179,7 @@ [ "MAFFT_ALIGN", "mafft", - "v7.520 (2023/Mar/22)" + "7.520" ] ], "versions_pigz": [ @@ -335,43 +191,19 @@ ] } ], + "timestamp": "2026-06-19T14:29:33.960634135", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2026-01-19T10:41:53.973021544" + "nf-test": "0.9.5", + "nextflow": "26.04.3" + } }, "SARS-CoV-2 scaffolds fasta - add informative sites fasta full": { "content": [ { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fas.gz:md5,611cb0a65195a282f110f7f56e310c66" - ] - ], - "1": [ - [ - "MAFFT_ALIGN", - "mafft", - "v7.520 (2023/Mar/22)" - ] - ], - "2": [ - [ - "MAFFT_ALIGN", - "pigz", - "2.8" - ] - ], "fas": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.fas.gz:md5,611cb0a65195a282f110f7f56e310c66" ] @@ -380,7 +212,7 @@ [ "MAFFT_ALIGN", "mafft", - "v7.520 (2023/Mar/22)" + "7.520" ] ], "versions_pigz": [ @@ -392,43 +224,19 @@ ] } ], + "timestamp": "2026-06-19T14:29:13.350316417", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2026-01-19T10:41:29.771305276" + "nf-test": "0.9.5", + "nextflow": "26.04.3" + } }, "SARS-CoV-2 scaffolds fasta - compressed": { "content": [ { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fas.gz:md5,23426611f4a0df532b6708f072bd445b" - ] - ], - "1": [ - [ - "MAFFT_ALIGN", - "mafft", - "v7.520 (2023/Mar/22)" - ] - ], - "2": [ - [ - "MAFFT_ALIGN", - "pigz", - "2.8" - ] - ], "fas": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.fas.gz:md5,23426611f4a0df532b6708f072bd445b" ] @@ -437,7 +245,7 @@ [ "MAFFT_ALIGN", "mafft", - "v7.520 (2023/Mar/22)" + "7.520" ] ], "versions_pigz": [ @@ -449,43 +257,19 @@ ] } ], + "timestamp": "2026-06-19T14:28:52.545723982", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2026-01-19T10:41:11.129811996" + "nf-test": "0.9.5", + "nextflow": "26.04.3" + } }, "SARS-CoV-2 scaffolds fasta - uncompressed - stub": { "content": [ { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fas:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - "MAFFT_ALIGN", - "mafft", - "v7.520 (2023/Mar/22)" - ] - ], - "2": [ - [ - "MAFFT_ALIGN", - "pigz", - "2.8" - ] - ], "fas": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.fas:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -494,7 +278,7 @@ [ "MAFFT_ALIGN", "mafft", - "v7.520 (2023/Mar/22)" + "7.520" ] ], "versions_pigz": [ @@ -506,43 +290,19 @@ ] } ], + "timestamp": "2026-06-19T14:29:40.080643935", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2026-01-19T10:42:04.226537806" + "nf-test": "0.9.5", + "nextflow": "26.04.3" + } }, "SARS-CoV-2 scaffolds fasta - compressed - stub": { "content": [ { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fas.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "1": [ - [ - "MAFFT_ALIGN", - "mafft", - "v7.520 (2023/Mar/22)" - ] - ], - "2": [ - [ - "MAFFT_ALIGN", - "pigz", - "2.8" - ] - ], "fas": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.fas.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] @@ -551,7 +311,7 @@ [ "MAFFT_ALIGN", "mafft", - "v7.520 (2023/Mar/22)" + "7.520" ] ], "versions_pigz": [ @@ -563,10 +323,10 @@ ] } ], + "timestamp": "2026-06-19T14:29:46.120139752", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2026-01-19T10:42:13.197004873" + "nf-test": "0.9.5", + "nextflow": "26.04.3" + } } } \ No newline at end of file diff --git a/modules/nf-core/mafft/guidetree/main.nf b/modules/nf-core/mafft/guidetree/main.nf index 66c1e4090f70..288be4fa8a28 100644 --- a/modules/nf-core/mafft/guidetree/main.nf +++ b/modules/nf-core/mafft/guidetree/main.nf @@ -12,7 +12,7 @@ process MAFFT_GUIDETREE { output: tuple val(meta), path("*.dnd"), emit: tree - path "versions.yml" , emit: versions + tuple val("${task.process}"), val("mafft"), eval("mafft --version 2>&1 | sed 's/v//;s/ .*//'"), topic: versions, emit: versions_mafft when: task.ext.when == null || task.ext.when @@ -31,21 +31,11 @@ process MAFFT_GUIDETREE { # remove all prefixes added by mafft which make the output incompatible with other tools awk '{gsub(/^[0-9]+_/, ""); print}' ${prefix}.dnd.tmp > ${prefix}.dnd - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - mafft: \$(mafft --version 2>&1 | sed 's/^v//' | sed 's/ (.*)//') - END_VERSIONS """ stub: def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.dnd - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - mafft: \$(mafft --version 2>&1 | sed 's/^v//' | sed 's/ (.*)//') - END_VERSIONS """ } diff --git a/modules/nf-core/mafft/guidetree/meta.yml b/modules/nf-core/mafft/guidetree/meta.yml index af018a4a109b..6bb508264387 100644 --- a/modules/nf-core/mafft/guidetree/meta.yml +++ b/modules/nf-core/mafft/guidetree/meta.yml @@ -6,13 +6,14 @@ keywords: - guide tree tools: - "mafft": - description: Multiple alignment program for amino acid or nucleotide sequences - based on fast Fourier transform + description: Multiple alignment program for amino acid or nucleotide + sequences based on fast Fourier transform homepage: https://mafft.cbrc.jp/alignment/software/ documentation: https://mafft.cbrc.jp/alignment/software/manual/manual.html tool_dev_url: https://mafft.cbrc.jp/alignment/software/source.html doi: "10.1093/nar/gkf436" - licence: ["BSD"] + licence: + - "BSD" identifier: biotools:MAFFT input: - - meta: @@ -22,7 +23,8 @@ input: e.g. [ id:'test' ] - fasta: type: file - description: FASTA file containing the sequences to be used to render the guidetree. + description: FASTA file containing the sequences to be used to render the + guidetree. pattern: "*.{fa,fasta}" ontologies: - edam: http://edamontology.org/format_1919 # SEQUENCE-LIKE @@ -40,13 +42,29 @@ output: pattern: "*.dnd" ontologies: - edam: http://edamontology.org/format_2006 # PHYLOGENETIC TREE + versions_mafft: + - - ${task.process}: + type: string + description: The name of the process + - mafft: + type: string + description: The name of the tool + - mafft --version 2>&1 | sed 's/v//;s/ .*//': + type: eval + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The name of the process + - mafft: + type: string + description: The name of the tool + - mafft --version 2>&1 | sed 's/v//;s/ .*//': + type: eval + description: The expression to obtain the version of the tool + authors: - "@luisas" maintainers: diff --git a/modules/nf-core/mafft/guidetree/tests/main.nf.test b/modules/nf-core/mafft/guidetree/tests/main.nf.test index 7f5bdeb9b532..4bbea7f8fe7a 100644 --- a/modules/nf-core/mafft/guidetree/tests/main.nf.test +++ b/modules/nf-core/mafft/guidetree/tests/main.nf.test @@ -15,9 +15,10 @@ nextflow_process { when { process { """ - input[0] = [ [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) - ] + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) + ] """ } } @@ -25,7 +26,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } @@ -37,9 +38,10 @@ nextflow_process { when { process { """ - input[0] = [ [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) - ] + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) + ] """ } } @@ -47,7 +49,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } diff --git a/modules/nf-core/mafft/guidetree/tests/main.nf.test.snap b/modules/nf-core/mafft/guidetree/tests/main.nf.test.snap index da526d315a51..67237c287dd5 100644 --- a/modules/nf-core/mafft/guidetree/tests/main.nf.test.snap +++ b/modules/nf-core/mafft/guidetree/tests/main.nf.test.snap @@ -2,7 +2,7 @@ "sarscov2 - fasta - stub": { "content": [ { - "0": [ + "tree": [ [ { "id": "test" @@ -10,32 +10,25 @@ "test.dnd:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "1": [ - "versions.yml:md5,bb10cf733d57dcd5d4c982db94bb1f2f" - ], - "tree": [ + "versions_mafft": [ [ - { - "id": "test" - }, - "test.dnd:md5,d41d8cd98f00b204e9800998ecf8427e" + "MAFFT_GUIDETREE", + "mafft", + "7.525" ] - ], - "versions": [ - "versions.yml:md5,bb10cf733d57dcd5d4c982db94bb1f2f" ] } ], + "timestamp": "2026-06-19T14:29:58.09914887", "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.1" - }, - "timestamp": "2024-11-27T15:45:27.111428175" + "nf-test": "0.9.5", + "nextflow": "26.04.3" + } }, "sarscov2 - fasta": { "content": [ { - "0": [ + "tree": [ [ { "id": "test" @@ -43,26 +36,19 @@ "test.dnd:md5,e376b2b428c095b1d41c26bc0e3789ba" ] ], - "1": [ - "versions.yml:md5,bb10cf733d57dcd5d4c982db94bb1f2f" - ], - "tree": [ + "versions_mafft": [ [ - { - "id": "test" - }, - "test.dnd:md5,e376b2b428c095b1d41c26bc0e3789ba" + "MAFFT_GUIDETREE", + "mafft", + "7.525" ] - ], - "versions": [ - "versions.yml:md5,bb10cf733d57dcd5d4c982db94bb1f2f" ] } ], + "timestamp": "2026-06-19T14:29:52.24639505", "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" - }, - "timestamp": "2025-02-10T09:33:40.755531981" + "nf-test": "0.9.5", + "nextflow": "26.04.3" + } } } \ No newline at end of file