diff --git a/modules/nf-core/fastme/tests/main.nf.test.snap b/modules/nf-core/fastme/tests/main.nf.test.snap index e892b351eae..aa8ffbf7ff7 100644 --- a/modules/nf-core/fastme/tests/main.nf.test.snap +++ b/modules/nf-core/fastme/tests/main.nf.test.snap @@ -54,10 +54,6 @@ ] } ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.0" - }, "timestamp": "2024-03-19T10:03:04.842045" }, "versions": { @@ -66,10 +62,6 @@ "versions.yml:md5,0e7f28ae349efffa1ef75c2279e975b6" ] ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.0" - }, "timestamp": "2024-03-19T10:02:58.72899" }, "stats_boot": { @@ -90,10 +82,6 @@ "" ] ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.0" - }, "timestamp": "2024-03-19T10:09:35.813028" }, "setoxin - phylip - with_tree": { @@ -151,10 +139,6 @@ ] } ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.0" - }, "timestamp": "2024-03-19T10:02:51.77025" }, "setoxin - phylip - basic": { @@ -212,10 +196,6 @@ ] } ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.0" - }, "timestamp": "2024-03-19T10:02:44.598308" } } \ No newline at end of file diff --git a/modules/nf-core/tcoffee/align/main.nf b/modules/nf-core/tcoffee/align/main.nf index a14964c9276..45be6226cb2 100644 --- a/modules/nf-core/tcoffee/align/main.nf +++ b/modules/nf-core/tcoffee/align/main.nf @@ -57,6 +57,8 @@ process TCOFFEE_ALIGN { stub: def prefix = task.ext.prefix ?: "${meta.id}" """ + # Otherwise, tcoffee will crash when calling its version + export TEMP='./' touch ${prefix}.aln${compress ? '.gz':''} cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/tcoffee/align/tests/main.nf.test b/modules/nf-core/tcoffee/align/tests/main.nf.test index 4f136283d08..f0b1752ca8f 100644 --- a/modules/nf-core/tcoffee/align/tests/main.nf.test +++ b/modules/nf-core/tcoffee/align/tests/main.nf.test @@ -11,7 +11,7 @@ nextflow_process { tag "famsa/guidetree" tag "untar" - test("fasta - align_sequence") { + test("align_sequence - compressed - seatoxin") { config "./sequence.config" @@ -19,7 +19,7 @@ nextflow_process { process { """ input[0] = [ [ id:'test' ], - file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) ] input[1] = [[:],[]] input[2] = [[:],[],[]] @@ -31,13 +31,13 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.alignment).match("alignment")}, - { assert snapshot(process.out.versions).match("versions_uncomp") } + { assert snapshot(process.out.versions).match()}, + { assert path(process.out.alignment.get(0).get(1)).getTextGzip().contains("1ahl") }, ) } } - test("fasta - align_sequence - uncompressed") { + test("align_sequence - uncompressed - seatoxin") { config "./sequence.config" @@ -45,7 +45,7 @@ nextflow_process { process { """ input[0] = [ [ id:'test' ], - file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) ] input[1] = [[:],[]] input[2] = [[:],[],[]] @@ -57,13 +57,13 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.alignment).match("alignment - uncompressed")}, - { assert snapshot(process.out.versions).match("versions_comp") } + { assert snapshot(process.out.versions).match()}, + { assert path(process.out.alignment.get(0).get(1)).getText().contains("1ahl") }, ) } } - test("sarscov2 - fasta - align_with_guide_tree") { + test("align_with_guide_tree - uncompressed - seatoxin") { config "./tree.config" @@ -74,7 +74,7 @@ nextflow_process { process { """ input[0] = [ [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/alignment/informative_sites.fas', checkIfExists: true) + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) ] """ @@ -86,7 +86,7 @@ nextflow_process { process { """ input[0] = [ [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/alignment/informative_sites.fas', checkIfExists: true) + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) ] input[1] = FAMSA_GUIDETREE.out.tree.collect{ meta, tree -> tree }.map{ tree -> [[ id: 'test'], tree]} input[2] = [ [:], [], [] ] @@ -98,14 +98,14 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.alignment).match("alignment_guidetree")}, - { assert snapshot(process.out.versions).match("versions_guidetree") } + { assert snapshot(process.out.versions).match()}, + { assert path(process.out.alignment.get(0).get(1)).getTextGzip().contains("1ahl") }, ) } } - test("fasta - align_with_structure") { + test("align_with_structure - uncompressed - seatoxin") { config "./structure.config" @@ -116,7 +116,7 @@ nextflow_process { process { """ input[0] = [ [ id:'test' ], - file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/structures/seatoxin-ref.tar.gz", checkIfExists: true) + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/structures/seatoxin-ref.tar.gz", checkIfExists: true) ] """ @@ -128,7 +128,7 @@ nextflow_process { process { """ input[0] = [ [ id:'test' ], - file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) ] input[1] = [ [:], [] ] input[2] = UNTAR.out.untar.map { meta,dir -> [[ id:'test' ], [] ,file(dir).listFiles().collect()]} @@ -148,7 +148,7 @@ nextflow_process { } - test("fasta - align_with_lib") { + test("align_with_lib - seatoxin") { config "./lib.config" @@ -156,7 +156,7 @@ nextflow_process { process { """ input[0] = [ [ id:'test' ], - file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) ] input[1] = [[:],[]] input[2] = [[:],[],[]] @@ -168,10 +168,40 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.alignment).match("alignment - lib") }, - { assert path(process.out.lib.get(0).get(1)).getText().contains("1ahl") }, - { assert snapshot(process.out.versions).match("versions_lib") } + { assert path(process.out.alignment.get(0).get(1)).getTextGzip().contains("1ahl") }, + { assert snapshot(process.out.versions).match() + } ) } } + + test("align_sequence - uncompressed - seatoxin - stub") { + options "-stub" + config "./sequence.config" + + when { + process { + """ + input[0] = [ [ id:'test' ], + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) + ] + input[1] = [[:],[]] + input[2] = [[:],[],[]] + input[3] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.alignment, + process.out.versions + ).match() + } + ) + } + } + } \ No newline at end of file diff --git a/modules/nf-core/tcoffee/align/tests/main.nf.test.snap b/modules/nf-core/tcoffee/align/tests/main.nf.test.snap index dfef40a7352..ecf8eadbd13 100644 --- a/modules/nf-core/tcoffee/align/tests/main.nf.test.snap +++ b/modules/nf-core/tcoffee/align/tests/main.nf.test.snap @@ -6,125 +6,77 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, "timestamp": "2024-02-28T19:00:28.712838" }, - "versions_lib": { + "align_sequence - uncompressed - seatoxin": { "content": [ [ "versions.yml:md5,fb187c9186b50a8076d08cd3be3c1b70" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-19T14:04:06.031557" + "timestamp": "2024-09-16T10:38:34.006567221" }, - "alignment - uncompressed": { - "content": [ - [ - [ - { - "id": "test" - }, - "test.aln:md5,bd1db08ad04514cc6d1334598c1a6ef0" - ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" - }, - "timestamp": "2024-02-28T18:59:54.582504" - }, - "versions_comp": { + "align_sequence - compressed - seatoxin": { "content": [ [ "versions.yml:md5,fb187c9186b50a8076d08cd3be3c1b70" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-28T18:59:54.593312" + "timestamp": "2024-09-16T10:38:18.99603304" }, - "versions_guidetree": { + "align_with_guide_tree - uncompressed - seatoxin": { "content": [ [ "versions.yml:md5,fb187c9186b50a8076d08cd3be3c1b70" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-28T19:00:10.618213" + "timestamp": "2024-09-16T10:38:48.044669392" }, - "alignment - lib": { + "align_with_lib - seatoxin": { "content": [ [ - [ - { - "id": "test" - }, - "test.aln.gz:md5,bd1db08ad04514cc6d1334598c1a6ef0" - ] + "versions.yml:md5,fb187c9186b50a8076d08cd3be3c1b70" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-19T13:57:39.653762" + "timestamp": "2024-09-16T10:47:34.909457138" }, - "alignment": { + "align_sequence - uncompressed - seatoxin - stub": { "content": [ [ [ { "id": "test" }, - "test.aln.gz:md5,bd1db08ad04514cc6d1334598c1a6ef0" + "test.aln:md5,d41d8cd98f00b204e9800998ecf8427e" ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" - }, - "timestamp": "2024-02-28T18:59:35.169119" - }, - "versions_uncomp": { - "content": [ + ], [ "versions.yml:md5,fb187c9186b50a8076d08cd3be3c1b70" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" - }, - "timestamp": "2024-02-28T18:59:35.2062" - }, - "alignment_guidetree": { - "content": [ - [ - [ - { - "id": "test" - }, - "test.aln.gz:md5,93bc8adfcd88f7913718eacc13da8e4a" - ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-02-28T19:00:10.611489" + "timestamp": "2024-09-16T12:55:10.267649283" } } \ No newline at end of file diff --git a/modules/nf-core/tcoffee/alncompare/main.nf b/modules/nf-core/tcoffee/alncompare/main.nf index 043158a75ad..e902120f468 100644 --- a/modules/nf-core/tcoffee/alncompare/main.nf +++ b/modules/nf-core/tcoffee/alncompare/main.nf @@ -53,6 +53,8 @@ process TCOFFEE_ALNCOMPARE { def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" """ + # Otherwise, tcoffee will crash when calling its version + export TEMP='./' touch "${prefix}.scores" cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/tcoffee/alncompare/tests/main.nf.test b/modules/nf-core/tcoffee/alncompare/tests/main.nf.test index 225a4f12465..66e5f204cbd 100644 --- a/modules/nf-core/tcoffee/alncompare/tests/main.nf.test +++ b/modules/nf-core/tcoffee/alncompare/tests/main.nf.test @@ -6,7 +6,7 @@ nextflow_process { tag "modules" tag "modules_nfcore" tag "tcoffee" - tag "tcoffee/alncompare" + tag "tcoffee/alncompare" test("seatoxin") { @@ -15,12 +15,36 @@ nextflow_process { """ input[0] = [ [ id:'test' ], // meta map - file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true), - file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin.ref", checkIfExists: true) + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true), + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin.ref", checkIfExists: true) ] """ } - + + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + test("seatoxin - stub") { + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true), + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin.ref", checkIfExists: true) + ] + """ + } + } then { diff --git a/modules/nf-core/tcoffee/alncompare/tests/main.nf.test.snap b/modules/nf-core/tcoffee/alncompare/tests/main.nf.test.snap index d1fd92e4304..20fd7a88877 100644 --- a/modules/nf-core/tcoffee/alncompare/tests/main.nf.test.snap +++ b/modules/nf-core/tcoffee/alncompare/tests/main.nf.test.snap @@ -1,4 +1,37 @@ { + "seatoxin - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.scores:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,438507517a1a831c7b7a1571b1fdd98d" + ], + "scores": [ + [ + { + "id": "test" + }, + "test.scores:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,438507517a1a831c7b7a1571b1fdd98d" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-16T09:48:00.328461809" + }, "seatoxin": { "content": [ { @@ -26,6 +59,10 @@ ] } ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, "timestamp": "2024-01-22T17:08:59.494237269" } } \ No newline at end of file diff --git a/modules/nf-core/tcoffee/consensus/tests/main.nf.test b/modules/nf-core/tcoffee/consensus/tests/main.nf.test index 78aa567bf2d..5f013e3f9e7 100644 --- a/modules/nf-core/tcoffee/consensus/tests/main.nf.test +++ b/modules/nf-core/tcoffee/consensus/tests/main.nf.test @@ -8,20 +8,20 @@ nextflow_process { tag "modules_nfcore" tag "tcoffee" tag "tcoffee/consensus" - tag "tcoffee/align" + tag "magus/align" tag "pigz" - tag "famsa/guidetree" + tag "clustalo/guidetree" tag "famsa/align" config "./sequence.config" setup { - run("FAMSA_GUIDETREE") { - script "../../../famsa/guidetree/main.nf" + run("CLUSTALO_GUIDETREE") { + script "../../../clustalo/guidetree/main.nf" process { """ input[0] = [ [ id:'test' ], - file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) ] """ } @@ -31,7 +31,7 @@ nextflow_process { process { """ input[0] = [ [ id:'test' ], - file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) ] input[1] = [[:],[]] input[2] = false @@ -39,28 +39,27 @@ nextflow_process { """ } } - run("TCOFFEE_ALIGN") { - script "../../../tcoffee/align/main.nf" + run("MAGUS_ALIGN") { + script "../../../magus/align/main.nf" process { """ - input[0] = [ [ id:'test' ], - file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) + input[0] = [ [ id:'test2' ], + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) ] input[1] = [[:],[]] - input[2] = [[:],[],[]] - input[3] = false + input[2] = false """ } - } + } } test("consensus - no tree - uncompressed - seatoxin ") { - + when { process { """ - msas = FAMSA_ALIGN.out.alignment.mix(TCOFFEE_ALIGN.out.alignment).groupTuple() + msas = FAMSA_ALIGN.out.alignment.mix(MAGUS_ALIGN.out.alignment).groupTuple() input[0] = msas input[1] = [[:],[]] input[2] = false @@ -71,41 +70,32 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - process.out.alignment, - process.out.versions - ).match() - } + { assert snapshot(process.out.versions).match()}, + { assert path(process.out.alignment.get(0).get(1)).getText().contains("1ahl") } ) } } - test("consensus - tree - compressed- seatoxin") { - + test("consensus - tree - compressed- seatoxin") { when { process { """ - msas = FAMSA_ALIGN.out.alignment.mix(TCOFFEE_ALIGN.out.alignment).groupTuple() + msas = FAMSA_ALIGN.out.alignment.mix(MAGUS_ALIGN.out.alignment).groupTuple() input[0] = msas - input[1] = FAMSA_GUIDETREE.out.tree.collect{ meta, tree -> tree }.map{ tree -> [[ id: 'test'], tree]} + input[1] = CLUSTALO_GUIDETREE.out.tree.collect{ meta, tree -> tree }.map{ tree -> [[ id: 'test'], tree]} input[2] = true """ } } - then { assertAll( { assert process.success }, - { assert snapshot( - process.out.alignment, - process.out.versions - ).match() - } + { assert snapshot(process.out.versions).match()}, + { assert path(process.out.alignment.get(0).get(1)).getTextGzip().contains("1ahl") } ) } } - test("consensus - stub") { options "-stub" @@ -113,7 +103,7 @@ nextflow_process { when { process { """ - msas = FAMSA_ALIGN.out.alignment.mix(TCOFFEE_ALIGN.out.alignment).groupTuple() + msas = FAMSA_ALIGN.out.alignment.mix(MAGUS_ALIGN.out.alignment).groupTuple() input[0] = msas input[1] = [[:],[]] input[2] = false @@ -128,5 +118,5 @@ nextflow_process { ) } } - + } diff --git a/modules/nf-core/tcoffee/consensus/tests/main.nf.test.snap b/modules/nf-core/tcoffee/consensus/tests/main.nf.test.snap index a0fe4f992ac..ed50562d0e6 100644 --- a/modules/nf-core/tcoffee/consensus/tests/main.nf.test.snap +++ b/modules/nf-core/tcoffee/consensus/tests/main.nf.test.snap @@ -2,23 +2,26 @@ "consensus - no tree - uncompressed - seatoxin ": { "content": [ [ - [ - { - "id": "test" - }, - "consensus.aln:md5,ed7fb1f7b7a9cd66e9b0c9d60d1b0e52" - ] - ], - [ + "versions.yml:md5,79d4f7ac70fab29f8cd0a18a4d3f76d1", "versions.yml:md5,79d4f7ac70fab29f8cd0a18a4d3f76d1" ] ], - "timestamp": "2024-09-04T13:17:59.621521" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-18T13:54:43.924522245" }, "consensus - stub": { "content": [ { "0": [ + [ + { + "id": "test2" + }, + "consensus.aln:md5,d41d8cd98f00b204e9800998ecf8427e" + ], [ { "id": "test" @@ -27,9 +30,16 @@ ] ], "1": [ + "versions.yml:md5,79d4f7ac70fab29f8cd0a18a4d3f76d1", "versions.yml:md5,79d4f7ac70fab29f8cd0a18a4d3f76d1" ], "alignment": [ + [ + { + "id": "test2" + }, + "consensus.aln:md5,d41d8cd98f00b204e9800998ecf8427e" + ], [ { "id": "test" @@ -38,26 +48,28 @@ ] ], "versions": [ + "versions.yml:md5,79d4f7ac70fab29f8cd0a18a4d3f76d1", "versions.yml:md5,79d4f7ac70fab29f8cd0a18a4d3f76d1" ] } ], - "timestamp": "2024-09-04T13:18:15.69498" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-18T13:55:25.155000209" }, "consensus - tree - compressed- seatoxin": { "content": [ [ - [ - { - "id": "test" - }, - "consensus.aln.gz:md5,ed7fb1f7b7a9cd66e9b0c9d60d1b0e52" - ] - ], - [ + "versions.yml:md5,79d4f7ac70fab29f8cd0a18a4d3f76d1", "versions.yml:md5,79d4f7ac70fab29f8cd0a18a4d3f76d1" ] ], - "timestamp": "2024-09-04T13:18:08.240517" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-18T13:55:03.627733582" } } \ No newline at end of file diff --git a/modules/nf-core/tcoffee/irmsd/main.nf b/modules/nf-core/tcoffee/irmsd/main.nf index 95e6b61efb4..be6b6a11bc5 100644 --- a/modules/nf-core/tcoffee/irmsd/main.nf +++ b/modules/nf-core/tcoffee/irmsd/main.nf @@ -8,8 +8,8 @@ process TCOFFEE_IRMSD { 'biocontainers/mulled-v2-a76a981c07359a31ff55b9dc13bd3da5ce1909c1:84c8f17f1259b49e2f7783b95b7a89c6f2cb199e-0' }" input: - tuple val(meta), file (msa) - tuple val(meta2), file(template), file(structures) + tuple val(meta), path (msa) + tuple val(meta2), path(template), path(structures) output: tuple val(meta), path ("${prefix}.irmsd"), emit: irmsd @@ -44,6 +44,8 @@ process TCOFFEE_IRMSD { def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${msa.baseName}" """ + # Otherwise, tcoffee will crash when calling its version + export TEMP='./' touch ${prefix}.irmsd cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/tcoffee/irmsd/meta.yml b/modules/nf-core/tcoffee/irmsd/meta.yml index f55fca748cf..e13e7ddadf3 100644 --- a/modules/nf-core/tcoffee/irmsd/meta.yml +++ b/modules/nf-core/tcoffee/irmsd/meta.yml @@ -27,10 +27,18 @@ input: type: file description: fasta file containing the alignment to be evaluated. May be gzipped or uncompressed. pattern: "*.{aln,fa,fasta,fas}{.gz,}" + + - meta2: + type: map + description: | + Groovy Map containing information about the structures + e.g. [ id:'test', ... ] + - template: type: file description: Template file matching the structures to the sequences in the alignment. pattern: "*" + - structures: type: directory description: Directory containing the structures file matching the sequences in the alignment in PDB format diff --git a/modules/nf-core/tcoffee/irmsd/tests/main.nf.test b/modules/nf-core/tcoffee/irmsd/tests/main.nf.test index 55a574a4616..dfb68629535 100644 --- a/modules/nf-core/tcoffee/irmsd/tests/main.nf.test +++ b/modules/nf-core/tcoffee/irmsd/tests/main.nf.test @@ -10,31 +10,43 @@ nextflow_process { tag "untar" tag "pigz/compress" - test("seatoxin") { + setup { - setup { + run("UNTAR") { + script "../../../untar/main.nf" + process { + """ + input[0] = [ [ id:'test' ], + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/structures/seatoxin-ref.tar.gz", checkIfExists: true) + ] - run("UNTAR") { - script "../../../untar/main.nf" - process { - """ - input[0] = [ [ id:'test' ], - file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/structures/seatoxin-ref.tar.gz", checkIfExists: true) - ] + """ + } + } - """ - } + run("PIGZ_COMPRESS") { + script "../../../pigz/compress/main.nf" + process { + """ + input[0] = [ [ id:'test' ], + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin.ref", checkIfExists: true) + ] + + """ } } + } + + test("seatoxin") { when { process { """ input[0] = [ [ id:'test' ], // meta map - file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin.ref", checkIfExists: true) + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin.ref", checkIfExists: true) ] - input[1] = UNTAR.out.untar.map { meta,dir -> [[ id:'test' ], file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/templates/seatoxin-ref_template.txt", checkIfExists: true) ,file(dir).listFiles().collect()]} + input[1] = UNTAR.out.untar.map { meta,dir -> [[ id:'test' ], file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/templates/seatoxin-ref_template.txt", checkIfExists: true) ,file(dir).listFiles().collect()]} """ } @@ -51,38 +63,37 @@ nextflow_process { test("seatoxin - compressed") { - setup { - - run("UNTAR") { - script "../../../untar/main.nf" - process { - """ - input[0] = [ [ id:'test' ], - file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/structures/seatoxin-ref.tar.gz", checkIfExists: true) - ] - - """ - } + when { + process { + """ + input[0] = PIGZ_COMPRESS.out.archive + input[1] = UNTAR.out.untar.map { meta,dir -> [[ id:'test' ], file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/templates/seatoxin-ref_template.txt", checkIfExists: true) ,file(dir).listFiles().collect()]} + """ } - run("PIGZ_COMPRESS") { - script "../../../pigz/compress/main.nf" - process { - """ - input[0] = [ [ id:'test' ], - file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin.ref", checkIfExists: true) - ] + } - """ - } - } + then { + assertAll( + { assert process.success }, + { assert path(process.out.irmsd.get(0).get(1)).getText().contains("1ahl") } + ) } + } + + test("seatoxin - uncompressed - stub") { + + options "-stub" + when { process { """ - input[0] = PIGZ_COMPRESS.out.archive - input[1] = UNTAR.out.untar.map { meta,dir -> [[ id:'test' ], file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/templates/seatoxin-ref_template.txt", checkIfExists: true) ,file(dir).listFiles().collect()]} + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin.ref", checkIfExists: true) + ] + input[1] = UNTAR.out.untar.map { meta,dir -> [[ id:'test' ], file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/templates/seatoxin-ref_template.txt", checkIfExists: true) ,file(dir).listFiles().collect()]} """ } @@ -91,7 +102,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert path(process.out.irmsd.get(0).get(1)).getText().contains("1ahl") } + { assert snapshot(process.out).match()} ) } diff --git a/modules/nf-core/tcoffee/irmsd/tests/main.nf.test.snap b/modules/nf-core/tcoffee/irmsd/tests/main.nf.test.snap index c036642f18a..909d678c5ca 100644 --- a/modules/nf-core/tcoffee/irmsd/tests/main.nf.test.snap +++ b/modules/nf-core/tcoffee/irmsd/tests/main.nf.test.snap @@ -1,5 +1,5 @@ { - "seatoxin": { + "seatoxin - uncompressed - stub": { "content": [ { "0": [ @@ -7,25 +7,29 @@ { "id": "test" }, - "setoxin.irmsd:md5,a8f49fb2621cdc9fe39690a813ad0ca5" + "setoxin.irmsd:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "1": [ - "versions.yml:md5,60646e38ef71127e3736a06c91c2983f" + "versions.yml:md5,95ade8ac867efd9e18f850bb55b7c9b6" ], "irmsd": [ [ { "id": "test" }, - "setoxin.irmsd:md5,a8f49fb2621cdc9fe39690a813ad0ca5" + "setoxin.irmsd:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "versions": [ - "versions.yml:md5,60646e38ef71127e3736a06c91c2983f" + "versions.yml:md5,95ade8ac867efd9e18f850bb55b7c9b6" ] } ], - "timestamp": "2023-12-13T12:26:46.827121" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-16T10:15:36.874290895" } } \ No newline at end of file diff --git a/modules/nf-core/tcoffee/seqreformat/main.nf b/modules/nf-core/tcoffee/seqreformat/main.nf index c4c31f835f8..04617b01ffd 100644 --- a/modules/nf-core/tcoffee/seqreformat/main.nf +++ b/modules/nf-core/tcoffee/seqreformat/main.nf @@ -38,6 +38,8 @@ process TCOFFEE_SEQREFORMAT { def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" """ + # Otherwise, tcoffee will crash when calling its version + export TEMP='./' touch "${prefix}.txt" cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/tcoffee/seqreformat/meta.yml b/modules/nf-core/tcoffee/seqreformat/meta.yml index 9c7d9ce9916..0571c7d875d 100644 --- a/modules/nf-core/tcoffee/seqreformat/meta.yml +++ b/modules/nf-core/tcoffee/seqreformat/meta.yml @@ -19,7 +19,7 @@ input: Groovy Map containing sample information e.g. `[ id:'test' ]` - - fasta: + - infile: type: file description: Input file to be reformatted pattern: "*" diff --git a/modules/nf-core/tcoffee/seqreformat/tests/main.nf.test b/modules/nf-core/tcoffee/seqreformat/tests/main.nf.test index 7a5492c51ab..1510e92075b 100644 --- a/modules/nf-core/tcoffee/seqreformat/tests/main.nf.test +++ b/modules/nf-core/tcoffee/seqreformat/tests/main.nf.test @@ -9,13 +9,13 @@ nextflow_process { tag "tcoffee" tag "tcoffee/seqreformat" - test("sarscov2 - bam") { + test("seatoxin") { when { process { """ input[0] = [ [ id:'test' ], - file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) ] """ } @@ -25,8 +25,36 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.formatted_file).match("formatted_file")}, - { assert snapshot(process.out.versions).match("versions") } + { assert snapshot( + process.out.formatted_file, + process.out.versions + ).match() + } + ) + } + } + + test("seatoxin - stub") { + options "-stub" + when { + process { + """ + input[0] = [ [ id:'test' ], + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) + ] + """ + } + } + + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.formatted_file, + process.out.versions + ).match() + } ) } } diff --git a/modules/nf-core/tcoffee/seqreformat/tests/main.nf.test.snap b/modules/nf-core/tcoffee/seqreformat/tests/main.nf.test.snap index 150102ee3a8..185f24d8f55 100644 --- a/modules/nf-core/tcoffee/seqreformat/tests/main.nf.test.snap +++ b/modules/nf-core/tcoffee/seqreformat/tests/main.nf.test.snap @@ -1,23 +1,42 @@ { - "formatted_file": { + "seatoxin - stub": { "content": [ [ [ { "id": "test" }, - "test.txt:md5,fcd4691daf120c88ec5def7ac06fb562" + "test.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] + ], + [ + "versions.yml:md5,68fb841e6e44274d430a1382bb0bbd14" ] ], - "timestamp": "2023-11-28T11:56:22.705185493" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-16T09:53:55.165479364" }, - "versions": { + "seatoxin": { "content": [ + [ + [ + { + "id": "test" + }, + "test.txt:md5,fcd4691daf120c88ec5def7ac06fb562" + ] + ], [ "versions.yml:md5,68fb841e6e44274d430a1382bb0bbd14" ] ], - "timestamp": "2023-11-28T11:56:22.717235196" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-16T09:53:33.814075197" } } \ No newline at end of file diff --git a/modules/nf-core/tcoffee/tcs/environment.yml b/modules/nf-core/tcoffee/tcs/environment.yml index 615d140e6bb..26a17e70983 100644 --- a/modules/nf-core/tcoffee/tcs/environment.yml +++ b/modules/nf-core/tcoffee/tcs/environment.yml @@ -1,8 +1,6 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda dependencies: - - "bioconda::t-coffee=13.46.0.919e8c6b" + - bioconda::t-coffee=13.46.0.919e8c6b - conda-forge::pigz=2.8 diff --git a/modules/nf-core/tcoffee/tcs/main.nf b/modules/nf-core/tcoffee/tcs/main.nf index 0c50f52a233..9080a317479 100644 --- a/modules/nf-core/tcoffee/tcs/main.nf +++ b/modules/nf-core/tcoffee/tcs/main.nf @@ -8,7 +8,7 @@ process TCOFFEE_TCS { 'biocontainers/mulled-v2-a76a981c07359a31ff55b9dc13bd3da5ce1909c1:84c8f17f1259b49e2f7783b95b7a89c6f2cb199e-0' }" input: - tuple val(meta), path(msa) + tuple val(meta) , path(msa) tuple val(meta2), path(lib) output: @@ -63,6 +63,8 @@ process TCOFFEE_TCS { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ + # Otherwise, tcoffee will crash when calling its version + export TEMP='./' touch ${prefix}.tcs touch ${prefix}.scores diff --git a/modules/nf-core/tcoffee/tcs/meta.yml b/modules/nf-core/tcoffee/tcs/meta.yml index a28efad0ab8..7a13e79a8b6 100644 --- a/modules/nf-core/tcoffee/tcs/meta.yml +++ b/modules/nf-core/tcoffee/tcs/meta.yml @@ -29,6 +29,11 @@ input: type: file description: fasta file containing the alignment to be evaluated. May be gzipped or uncompressed. pattern: "*.{aln,fa,fasta,fas}{.gz,}" + - meta2: + type: map + description: | + Groovy Map containing library information + e.g. [ id:'test', ... ] - lib: type: file description: lib file containing the alignment library of the given msa. diff --git a/modules/nf-core/tcoffee/tcs/tests/lib.config b/modules/nf-core/tcoffee/tcs/tests/lib.config index 56712f63798..610250ce235 100644 --- a/modules/nf-core/tcoffee/tcs/tests/lib.config +++ b/modules/nf-core/tcoffee/tcs/tests/lib.config @@ -1,5 +1,7 @@ process { + withName: "TCOFFEE_ALIGN"{ ext.args = { "-output fasta_aln -out_lib sample_lib1.tc_lib" } } + } diff --git a/modules/nf-core/tcoffee/tcs/tests/main.nf.test b/modules/nf-core/tcoffee/tcs/tests/main.nf.test index 35636fff075..d66a2cdaa31 100644 --- a/modules/nf-core/tcoffee/tcs/tests/main.nf.test +++ b/modules/nf-core/tcoffee/tcs/tests/main.nf.test @@ -10,14 +10,14 @@ nextflow_process { tag "pigz/compress" tag "tcoffee/align" - test("tcs - msa") { + test("tcs - seatoxin") { when { process { """ input[0] = [ - [ id:'test'], - file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin.ref", checkIfExists: true) + [ id:'test'], + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin.ref", checkIfExists: true) ] input[1] = [ [ id:'test'], @@ -30,13 +30,15 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert path(process.out.tcs.get(0).get(1)).getText().contains("1ahl") }, + { assert snapshot(process.out.versions).match() + } ) } } - test("tcs - msa - compressed") { + test("tcs - seatoxin - compressed") { setup { run("PIGZ_COMPRESS") { @@ -44,12 +46,12 @@ nextflow_process { process { """ input[0] = [ [ id:'test' ], - file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin.ref", checkIfExists: true) + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin.ref", checkIfExists: true) ] """ } - } + } } when { @@ -67,12 +69,14 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert path(process.out.tcs.get(0).get(1)).getText().contains("1ahl") }, + { assert snapshot(process.out.versions).match() + } ) } } - test("tcs - msa - lib") { + test("tcs - seatoxin - lib") { config "./lib.config" @@ -82,33 +86,63 @@ nextflow_process { process { """ input[0] = [ [ id:'test' ], - file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) ] input[1] = [[:],[]] input[2] = [[:],[],[]] input[3] = true """ } - } + } } when { process { """ input[0] = [ - [ id:'test'], - file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin.ref", checkIfExists: true) + [ id:'test'], + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin.ref", checkIfExists: true) ] input[1] = TCOFFEE_ALIGN.out.lib.map { it -> [[ id:'test' ], it[1]] } """ } } + then { + assertAll( + { assert process.success }, + { assert path(process.out.tcs.get(0).get(1)).getText().contains("1ahl") }, + { assert snapshot(process.out.versions).match() + } + ) + } + } + + test("tcs - seatoxin - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test'], + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin.ref", checkIfExists: true) + ] + input[1] = [ + [ id:'test'], + [] + ] + """ + } + } + then { assertAll( { assert process.success }, { assert snapshot(process.out).match() } ) } + } } diff --git a/modules/nf-core/tcoffee/tcs/tests/main.nf.test.snap b/modules/nf-core/tcoffee/tcs/tests/main.nf.test.snap index 8f6fca132c4..80da751875b 100644 --- a/modules/nf-core/tcoffee/tcs/tests/main.nf.test.snap +++ b/modules/nf-core/tcoffee/tcs/tests/main.nf.test.snap @@ -1,54 +1,17 @@ { - "tcs - msa - lib": { + "tcs - seatoxin - compressed": { "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.tcs:md5,d6467c4c358a9fe2d21b5d6d3e128cdb" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "test.scores:md5,25576b8e2fef74953d28f4e3df689d93" - ] - ], - "2": [ - "versions.yml:md5,99775735c64e1ae150252a3b09576e91" - ], - "scores": [ - [ - { - "id": "test" - }, - "test.scores:md5,25576b8e2fef74953d28f4e3df689d93" - ] - ], - "tcs": [ - [ - { - "id": "test" - }, - "test.tcs:md5,d6467c4c358a9fe2d21b5d6d3e128cdb" - ] - ], - "versions": [ - "versions.yml:md5,99775735c64e1ae150252a3b09576e91" - ] - } + [ + "versions.yml:md5,99775735c64e1ae150252a3b09576e91" + ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-19T17:52:51.096817" + "timestamp": "2024-09-16T13:13:16.017532678" }, - "tcs - msa": { + "tcs - seatoxin - stub": { "content": [ { "0": [ @@ -56,7 +19,7 @@ { "id": "test" }, - "test.tcs:md5,d6467c4c358a9fe2d21b5d6d3e128cdb" + "test.tcs:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "1": [ @@ -64,7 +27,7 @@ { "id": "test" }, - "test.scores:md5,25576b8e2fef74953d28f4e3df689d93" + "test.scores:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "2": [ @@ -75,7 +38,7 @@ { "id": "test" }, - "test.scores:md5,25576b8e2fef74953d28f4e3df689d93" + "test.scores:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "tcs": [ @@ -83,7 +46,7 @@ { "id": "test" }, - "test.tcs:md5,d6467c4c358a9fe2d21b5d6d3e128cdb" + "test.tcs:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "versions": [ @@ -92,58 +55,33 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-19T12:47:34.828638" + "timestamp": "2024-09-16T09:59:35.62776554" }, - "tcs - msa - compressed": { + "tcs - seatoxin - lib": { "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.tcs:md5,d6467c4c358a9fe2d21b5d6d3e128cdb" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "test.scores:md5,25576b8e2fef74953d28f4e3df689d93" - ] - ], - "2": [ - "versions.yml:md5,99775735c64e1ae150252a3b09576e91" - ], - "scores": [ - [ - { - "id": "test" - }, - "test.scores:md5,25576b8e2fef74953d28f4e3df689d93" - ] - ], - "tcs": [ - [ - { - "id": "test" - }, - "test.tcs:md5,d6467c4c358a9fe2d21b5d6d3e128cdb" - ] - ], - "versions": [ - "versions.yml:md5,99775735c64e1ae150252a3b09576e91" - ] - } + [ + "versions.yml:md5,99775735c64e1ae150252a3b09576e91" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-16T13:13:32.306127259" + }, + "tcs - seatoxin": { + "content": [ + [ + "versions.yml:md5,99775735c64e1ae150252a3b09576e91" + ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-03-19T17:37:52.408687" + "timestamp": "2024-09-16T13:13:00.253922777" } } \ No newline at end of file