From 0270c0fbbbb09456d7823605e4285c4a2c5bbf40 Mon Sep 17 00:00:00 2001 From: Luisa Santus Date: Tue, 10 Dec 2024 09:44:41 +0100 Subject: [PATCH 1/6] Add foldmason createdb (#7180) * add first version module * add test * add tests * add * ass * add * up * update containers * update version * update version easymsa * Update modules/nf-core/foldmason/createdb/main.nf Co-authored-by: Jose Espinosa-Carrasco * Update modules/nf-core/foldmason/createdb/meta.yml Co-authored-by: Jose Espinosa-Carrasco * Update modules/nf-core/foldmason/createdb/main.nf Co-authored-by: Jose Espinosa-Carrasco * Update modules/nf-core/foldmason/createdb/main.nf Co-authored-by: Jose Espinosa-Carrasco --------- Co-authored-by: Jose Espinosa-Carrasco --- .../foldmason/createdb/environment.yml | 5 + modules/nf-core/foldmason/createdb/main.nf | 47 +++++++ modules/nf-core/foldmason/createdb/meta.yml | 48 +++++++ .../foldmason/createdb/tests/main.nf.test | 66 +++++++++ .../createdb/tests/main.nf.test.snap | 128 ++++++++++++++++++ .../nf-core/foldmason/easymsa/environment.yml | 4 +- modules/nf-core/foldmason/easymsa/main.nf | 5 +- .../foldmason/easymsa/tests/main.nf.test.snap | 32 ++--- 8 files changed, 315 insertions(+), 20 deletions(-) create mode 100644 modules/nf-core/foldmason/createdb/environment.yml create mode 100644 modules/nf-core/foldmason/createdb/main.nf create mode 100644 modules/nf-core/foldmason/createdb/meta.yml create mode 100644 modules/nf-core/foldmason/createdb/tests/main.nf.test create mode 100644 modules/nf-core/foldmason/createdb/tests/main.nf.test.snap diff --git a/modules/nf-core/foldmason/createdb/environment.yml b/modules/nf-core/foldmason/createdb/environment.yml new file mode 100644 index 00000000000..80d4dd371d9 --- /dev/null +++ b/modules/nf-core/foldmason/createdb/environment.yml @@ -0,0 +1,5 @@ +channels: + - conda-forge + - bioconda +dependencies: + - bioconda::foldmason=2.7bd21ed diff --git a/modules/nf-core/foldmason/createdb/main.nf b/modules/nf-core/foldmason/createdb/main.nf new file mode 100644 index 00000000000..c54b45f3f06 --- /dev/null +++ b/modules/nf-core/foldmason/createdb/main.nf @@ -0,0 +1,47 @@ +process FOLDMASON_CREATEDB { + tag "$meta.id" + label 'process_low' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/a8/a88d162c3f39a1518d48c3faec235e6fcde750586da868b62fc5f0a08a89aa9d/data' : + 'community.wave.seqera.io/library/foldmason:2.7bd21ed--e7f739473ad6578d' }" + + input: + tuple val(meta) , path(structures) + + output: + tuple val(meta), path("${prefix}*"), emit: db + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + """ + foldmason createdb \\ + ${structures} \\ + ${prefix} \\ + $args \\ + --threads $task.cpus + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + foldmason: \$(foldmason | grep "foldmason Version:" | cut -d":" -f 2 | awk '{\$1=\$1;print}') + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + foldmason: \$(foldmason | grep "foldmason Version:" | cut -d":" -f 2 | awk '{\$1=\$1;print}') + END_VERSIONS + """ +} diff --git a/modules/nf-core/foldmason/createdb/meta.yml b/modules/nf-core/foldmason/createdb/meta.yml new file mode 100644 index 00000000000..fd47efe2f90 --- /dev/null +++ b/modules/nf-core/foldmason/createdb/meta.yml @@ -0,0 +1,48 @@ +name: "foldmason_createdb" +description: Creates a database for Foldmason. +keywords: + - alignment + - MSA + - genomics + - structure +tools: + - "foldmason": + description: "Multiple Protein Structure Alignment at Scale with FoldMason" + homepage: "https://github.com/steineggerlab/foldmason" + documentation: "https://github.com/steineggerlab/foldmason" + tool_dev_url: "https://github.com/steineggerlab/foldmason" + doi: "10.1101/2024.08.01.606130" + licence: ["GPL v3"] + identifier: biotools:foldmason + +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - structures: + type: file + description: Input protein structures in `PDB` or `mmCIF` format. + pattern: "*.{pdb,mmcif}" + +output: + - db: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - "${prefix}*": + type: file + description: All database files created by Foldmason + pattern: "*" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@luisas" +maintainers: + - "@luisas" diff --git a/modules/nf-core/foldmason/createdb/tests/main.nf.test b/modules/nf-core/foldmason/createdb/tests/main.nf.test new file mode 100644 index 00000000000..9ac567a7504 --- /dev/null +++ b/modules/nf-core/foldmason/createdb/tests/main.nf.test @@ -0,0 +1,66 @@ +nextflow_process { + + name "Test Process FOLDMASON_CREATEDB" + script "../main.nf" + process "FOLDMASON_CREATEDB" + + tag "modules" + tag "modules_nfcore" + tag "foldmason" + tag "foldmason/createdb" + tag "untar" + + setup { + + run("UNTAR") { + script "../../../../../modules/nf-core/untar/main.nf" + process { + """ + archive = file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/af2_structures/seatoxin-ref.tar.gz", checkIfExists: true) + input[0] = Channel.of(tuple([id:'test'], archive)) + """ + } + } + } + + test("seatoxin") { + + when { + + process { + """ + input[0] = UNTAR.out.untar.map { meta,dir -> [meta, file(dir).listFiles().collect()]} + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("seatoxin - stub ") { + + when { + + process { + """ + input[0] = UNTAR.out.untar.map { meta,dir -> [meta, file(dir).listFiles().collect()]} + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/foldmason/createdb/tests/main.nf.test.snap b/modules/nf-core/foldmason/createdb/tests/main.nf.test.snap new file mode 100644 index 00000000000..dce5175dc90 --- /dev/null +++ b/modules/nf-core/foldmason/createdb/tests/main.nf.test.snap @@ -0,0 +1,128 @@ +{ + "seatoxin - stub ": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "test:md5,941321067eae439b4a8ccf6425d84751", + "test.dbtype:md5,f1d3ff8443297732862df21dc4e57262", + "test.index:md5,8d3c65fcda8b216fff2f1eb2c4dcc015", + "test.lookup:md5,83047fddf9b6fbaa99f00cdf5a7dd274", + "test.source:md5,7968a6cb6577ead230c31910380af948", + "test_ca:md5,2738c516c1a15238a5c62c4ba6dee0b9", + "test_ca.dbtype:md5,3fd85f9ee7ca8882c8caa747d0eef0b3", + "test_ca.index:md5,cfdf544c3aa6d7e2034e4a01dac1d0ba", + "test_h:md5,ab9ce99a99fc6ba6a98c4460410b6a16", + "test_h.dbtype:md5,740bab4f9ec8808aedb68d6b1281aeb2", + "test_h.index:md5,dc7c33ddb6a3dc54ad033120ef4c9af4", + "test_ss:md5,75d329b63c0383c3e43090ba89238e14", + "test_ss.dbtype:md5,f1d3ff8443297732862df21dc4e57262", + "test_ss.index:md5,8d3c65fcda8b216fff2f1eb2c4dcc015" + ] + ] + ], + "1": [ + "versions.yml:md5,6ebe56979a45b356d374cfc65c8a2b45" + ], + "db": [ + [ + { + "id": "test" + }, + [ + "test:md5,941321067eae439b4a8ccf6425d84751", + "test.dbtype:md5,f1d3ff8443297732862df21dc4e57262", + "test.index:md5,8d3c65fcda8b216fff2f1eb2c4dcc015", + "test.lookup:md5,83047fddf9b6fbaa99f00cdf5a7dd274", + "test.source:md5,7968a6cb6577ead230c31910380af948", + "test_ca:md5,2738c516c1a15238a5c62c4ba6dee0b9", + "test_ca.dbtype:md5,3fd85f9ee7ca8882c8caa747d0eef0b3", + "test_ca.index:md5,cfdf544c3aa6d7e2034e4a01dac1d0ba", + "test_h:md5,ab9ce99a99fc6ba6a98c4460410b6a16", + "test_h.dbtype:md5,740bab4f9ec8808aedb68d6b1281aeb2", + "test_h.index:md5,dc7c33ddb6a3dc54ad033120ef4c9af4", + "test_ss:md5,75d329b63c0383c3e43090ba89238e14", + "test_ss.dbtype:md5,f1d3ff8443297732862df21dc4e57262", + "test_ss.index:md5,8d3c65fcda8b216fff2f1eb2c4dcc015" + ] + ] + ], + "versions": [ + "versions.yml:md5,6ebe56979a45b356d374cfc65c8a2b45" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-09T15:11:27.426024133" + }, + "seatoxin": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "test:md5,941321067eae439b4a8ccf6425d84751", + "test.dbtype:md5,f1d3ff8443297732862df21dc4e57262", + "test.index:md5,8d3c65fcda8b216fff2f1eb2c4dcc015", + "test.lookup:md5,83047fddf9b6fbaa99f00cdf5a7dd274", + "test.source:md5,7968a6cb6577ead230c31910380af948", + "test_ca:md5,2738c516c1a15238a5c62c4ba6dee0b9", + "test_ca.dbtype:md5,3fd85f9ee7ca8882c8caa747d0eef0b3", + "test_ca.index:md5,cfdf544c3aa6d7e2034e4a01dac1d0ba", + "test_h:md5,ab9ce99a99fc6ba6a98c4460410b6a16", + "test_h.dbtype:md5,740bab4f9ec8808aedb68d6b1281aeb2", + "test_h.index:md5,dc7c33ddb6a3dc54ad033120ef4c9af4", + "test_ss:md5,75d329b63c0383c3e43090ba89238e14", + "test_ss.dbtype:md5,f1d3ff8443297732862df21dc4e57262", + "test_ss.index:md5,8d3c65fcda8b216fff2f1eb2c4dcc015" + ] + ] + ], + "1": [ + "versions.yml:md5,6ebe56979a45b356d374cfc65c8a2b45" + ], + "db": [ + [ + { + "id": "test" + }, + [ + "test:md5,941321067eae439b4a8ccf6425d84751", + "test.dbtype:md5,f1d3ff8443297732862df21dc4e57262", + "test.index:md5,8d3c65fcda8b216fff2f1eb2c4dcc015", + "test.lookup:md5,83047fddf9b6fbaa99f00cdf5a7dd274", + "test.source:md5,7968a6cb6577ead230c31910380af948", + "test_ca:md5,2738c516c1a15238a5c62c4ba6dee0b9", + "test_ca.dbtype:md5,3fd85f9ee7ca8882c8caa747d0eef0b3", + "test_ca.index:md5,cfdf544c3aa6d7e2034e4a01dac1d0ba", + "test_h:md5,ab9ce99a99fc6ba6a98c4460410b6a16", + "test_h.dbtype:md5,740bab4f9ec8808aedb68d6b1281aeb2", + "test_h.index:md5,dc7c33ddb6a3dc54ad033120ef4c9af4", + "test_ss:md5,75d329b63c0383c3e43090ba89238e14", + "test_ss.dbtype:md5,f1d3ff8443297732862df21dc4e57262", + "test_ss.index:md5,8d3c65fcda8b216fff2f1eb2c4dcc015" + ] + ] + ], + "versions": [ + "versions.yml:md5,6ebe56979a45b356d374cfc65c8a2b45" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-09T15:11:15.375341633" + } +} \ No newline at end of file diff --git a/modules/nf-core/foldmason/easymsa/environment.yml b/modules/nf-core/foldmason/easymsa/environment.yml index 64a5b3671d4..fa2909a9491 100644 --- a/modules/nf-core/foldmason/easymsa/environment.yml +++ b/modules/nf-core/foldmason/easymsa/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::foldmason=1.763a428 + - bioconda::foldmason=2.7bd21ed - conda-forge::pigz=2.8 diff --git a/modules/nf-core/foldmason/easymsa/main.nf b/modules/nf-core/foldmason/easymsa/main.nf index bb1737f05ef..b4870da0d10 100644 --- a/modules/nf-core/foldmason/easymsa/main.nf +++ b/modules/nf-core/foldmason/easymsa/main.nf @@ -3,7 +3,10 @@ process FOLDMASON_EASYMSA { label 'process_medium' conda "${moduleDir}/environment.yml" - container "community.wave.seqera.io/library/foldmason_pigz:54849036d93c89ed" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'oras://community.wave.seqera.io/library/foldmason_pigz:d8dfffbc768abe03': + 'community.wave.seqera.io/library/foldmason_pigz:88809eb5649534b0' }" + input: tuple val(meta) , path(pdbs) diff --git a/modules/nf-core/foldmason/easymsa/tests/main.nf.test.snap b/modules/nf-core/foldmason/easymsa/tests/main.nf.test.snap index 384d2021284..4951f29bff3 100644 --- a/modules/nf-core/foldmason/easymsa/tests/main.nf.test.snap +++ b/modules/nf-core/foldmason/easymsa/tests/main.nf.test.snap @@ -19,7 +19,7 @@ ] ], "2": [ - "versions.yml:md5,da4694171d1b0bb9559f7049334126ed" + "versions.yml:md5,a29f8390ef8ef7b90ad85d99589d97e6" ], "msa_3di": [ [ @@ -38,7 +38,7 @@ ] ], "versions": [ - "versions.yml:md5,da4694171d1b0bb9559f7049334126ed" + "versions.yml:md5,a29f8390ef8ef7b90ad85d99589d97e6" ] } ], @@ -46,7 +46,7 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-04T10:56:12.836231763" + "timestamp": "2024-12-09T15:22:29.135105042" }, "Test on seatoxin dataset - uncompressed": { "content": [ @@ -68,7 +68,7 @@ ] ], "2": [ - "versions.yml:md5,da4694171d1b0bb9559f7049334126ed" + "versions.yml:md5,a29f8390ef8ef7b90ad85d99589d97e6" ], "msa_3di": [ [ @@ -87,7 +87,7 @@ ] ], "versions": [ - "versions.yml:md5,da4694171d1b0bb9559f7049334126ed" + "versions.yml:md5,a29f8390ef8ef7b90ad85d99589d97e6" ] } ], @@ -95,7 +95,7 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-04T10:55:41.89060384" + "timestamp": "2024-12-09T15:21:46.797852094" }, "Test on seatoxin dataset - compressed": { "content": [ @@ -117,7 +117,7 @@ ] ], "2": [ - "versions.yml:md5,da4694171d1b0bb9559f7049334126ed" + "versions.yml:md5,a29f8390ef8ef7b90ad85d99589d97e6" ], "msa_3di": [ [ @@ -136,7 +136,7 @@ ] ], "versions": [ - "versions.yml:md5,da4694171d1b0bb9559f7049334126ed" + "versions.yml:md5,a29f8390ef8ef7b90ad85d99589d97e6" ] } ], @@ -144,7 +144,7 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-04T10:55:52.135344443" + "timestamp": "2024-12-09T15:21:58.958099076" }, "Test on seatoxin dataset - guide_tree": { "content": [ @@ -154,7 +154,7 @@ { "id": "test" }, - "test_3di.fa:md5,46fa911158bb736c054dfad0378832b4" + "test_3di.fa:md5,7c591bb57218fc00fdcb0b48306afc08" ] ], "1": [ @@ -162,18 +162,18 @@ { "id": "test" }, - "test_aa.fa:md5,7ada48f0152342787a46505b9e8a2fae" + "test_aa.fa:md5,e18523697101ff5d474ce4b6d0188731" ] ], "2": [ - "versions.yml:md5,da4694171d1b0bb9559f7049334126ed" + "versions.yml:md5,a29f8390ef8ef7b90ad85d99589d97e6" ], "msa_3di": [ [ { "id": "test" }, - "test_3di.fa:md5,46fa911158bb736c054dfad0378832b4" + "test_3di.fa:md5,7c591bb57218fc00fdcb0b48306afc08" ] ], "msa_aa": [ @@ -181,11 +181,11 @@ { "id": "test" }, - "test_aa.fa:md5,7ada48f0152342787a46505b9e8a2fae" + "test_aa.fa:md5,e18523697101ff5d474ce4b6d0188731" ] ], "versions": [ - "versions.yml:md5,da4694171d1b0bb9559f7049334126ed" + "versions.yml:md5,a29f8390ef8ef7b90ad85d99589d97e6" ] } ], @@ -193,6 +193,6 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-04T10:56:02.473496089" + "timestamp": "2024-12-09T15:22:11.0778334" } } \ No newline at end of file From d752b3edfab155e353c93ed868a24db2fc047ab0 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Tue, 10 Dec 2024 09:45:56 +0100 Subject: [PATCH 2/6] Update: deseq2/differential for upcoming improved standardisation of template modules (#7178) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Rename deseq_de.R to deseq2_differential.R for standaisation * Update main.nf --------- Co-authored-by: Famke Bäuerle <45968370+famosab@users.noreply.github.com> --- modules/nf-core/deseq2/differential/main.nf | 2 +- .../templates/{deseq_de.R => deseq2_differential.R} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename modules/nf-core/deseq2/differential/templates/{deseq_de.R => deseq2_differential.R} (100%) diff --git a/modules/nf-core/deseq2/differential/main.nf b/modules/nf-core/deseq2/differential/main.nf index 4d25602f7d6..c76187b50b5 100644 --- a/modules/nf-core/deseq2/differential/main.nf +++ b/modules/nf-core/deseq2/differential/main.nf @@ -29,7 +29,7 @@ process DESEQ2_DIFFERENTIAL { task.ext.when == null || task.ext.when script: - template 'deseq_de.R' + template 'deseq2_differential.R' stub: """ diff --git a/modules/nf-core/deseq2/differential/templates/deseq_de.R b/modules/nf-core/deseq2/differential/templates/deseq2_differential.R similarity index 100% rename from modules/nf-core/deseq2/differential/templates/deseq_de.R rename to modules/nf-core/deseq2/differential/templates/deseq2_differential.R From 13e7d1046922381df90cd8fe9bee8c3e57ae8457 Mon Sep 17 00:00:00 2001 From: Friederike Hanssen Date: Tue, 10 Dec 2024 11:18:18 +0100 Subject: [PATCH 3/6] add stub test for samtools/mpileup (#7192) add stub test --- modules/nf-core/samtools/mpileup/main.nf | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/modules/nf-core/samtools/mpileup/main.nf b/modules/nf-core/samtools/mpileup/main.nf index 8a3ff75eb4a..925c8244e09 100644 --- a/modules/nf-core/samtools/mpileup/main.nf +++ b/modules/nf-core/samtools/mpileup/main.nf @@ -6,13 +6,14 @@ process SAMTOOLS_MPILEUP { container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0' : 'biocontainers/samtools:1.21--h50ea8bc_0' }" + input: tuple val(meta), path(input), path(intervals) path fasta output: tuple val(meta), path("*.mpileup.gz"), emit: mpileup - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -20,15 +21,29 @@ process SAMTOOLS_MPILEUP { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - intervals = intervals ? "-l ${intervals}" : "" + def intervals_arg = intervals ? "-l ${intervals}" : "" """ samtools mpileup \\ --fasta-ref $fasta \\ --output ${prefix}.mpileup \\ $args \\ - $intervals \\ + $intervals_arg \\ $input bgzip ${prefix}.mpileup + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def intervals_arg = intervals ? "-l ${intervals}" : "" + """ + touch ${prefix}.mpileup.gz + cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') From d3555a4a33ae94269b65f79f7066ac2fcb836005 Mon Sep 17 00:00:00 2001 From: Luisa Santus Date: Tue, 10 Dec 2024 12:09:54 +0100 Subject: [PATCH 4/6] Add foldmason msa2lddtreport (#7191) * add module * add test * update test * up * add * update * fix test * Update modules/nf-core/foldmason/msa2lddtreport/main.nf Co-authored-by: Jose Espinosa-Carrasco * Update modules/nf-core/foldmason/msa2lddtreport/tests/main.nf.test Co-authored-by: Jose Espinosa-Carrasco --------- Co-authored-by: Jose Espinosa-Carrasco --- .../foldmason/msa2lddtreport/environment.yml | 5 + .../nf-core/foldmason/msa2lddtreport/main.nf | 52 +++++++++ .../nf-core/foldmason/msa2lddtreport/meta.yml | 74 +++++++++++++ .../msa2lddtreport/tests/main.nf.test | 101 ++++++++++++++++++ .../msa2lddtreport/tests/main.nf.test.snap | 68 ++++++++++++ 5 files changed, 300 insertions(+) create mode 100644 modules/nf-core/foldmason/msa2lddtreport/environment.yml create mode 100644 modules/nf-core/foldmason/msa2lddtreport/main.nf create mode 100644 modules/nf-core/foldmason/msa2lddtreport/meta.yml create mode 100644 modules/nf-core/foldmason/msa2lddtreport/tests/main.nf.test create mode 100644 modules/nf-core/foldmason/msa2lddtreport/tests/main.nf.test.snap diff --git a/modules/nf-core/foldmason/msa2lddtreport/environment.yml b/modules/nf-core/foldmason/msa2lddtreport/environment.yml new file mode 100644 index 00000000000..80d4dd371d9 --- /dev/null +++ b/modules/nf-core/foldmason/msa2lddtreport/environment.yml @@ -0,0 +1,5 @@ +channels: + - conda-forge + - bioconda +dependencies: + - bioconda::foldmason=2.7bd21ed diff --git a/modules/nf-core/foldmason/msa2lddtreport/main.nf b/modules/nf-core/foldmason/msa2lddtreport/main.nf new file mode 100644 index 00000000000..e07a7552b73 --- /dev/null +++ b/modules/nf-core/foldmason/msa2lddtreport/main.nf @@ -0,0 +1,52 @@ +process FOLDMASON_MSA2LDDTREPORT { + tag "$meta.id" + label 'process_medium' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/a8/a88d162c3f39a1518d48c3faec235e6fcde750586da868b62fc5f0a08a89aa9d/data' : + 'community.wave.seqera.io/library/foldmason:2.7bd21ed--e7f739473ad6578d' }" + input: + tuple val(meta) , path(msa) + tuple val(meta2), path(db) + tuple val(meta3), path(pdbs) + tuple val(meta4), path(tree) + + output: + tuple val(meta), path("${prefix}.html"), emit: html + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + def options_tree = tree ? "--guide-tree $tree" : "" + """ + foldmason msa2lddtreport \\ + ${meta.id} \\ + ${msa} \\ + ${prefix}.html \\ + $args \\ + ${options_tree} \\ + --threads $task.cpus + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + foldmason: \$(foldmason | grep "foldmason Version:" | cut -d":" -f 2 | awk '{\$1=\$1;print}') + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.html + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + foldmason: \$(foldmason | grep "foldmason Version:" | cut -d":" -f 2 | awk '{\$1=\$1;print}') + END_VERSIONS + """ +} diff --git a/modules/nf-core/foldmason/msa2lddtreport/meta.yml b/modules/nf-core/foldmason/msa2lddtreport/meta.yml new file mode 100644 index 00000000000..cf9749acb07 --- /dev/null +++ b/modules/nf-core/foldmason/msa2lddtreport/meta.yml @@ -0,0 +1,74 @@ +name: "foldmason_msa2lddtreport" +description: Renders a visualization report using foldmason +keywords: + - alignment + - MSA + - genomics + - structure +tools: + - "foldmason": + description: "Multiple Protein Structure Alignment at Scale with FoldMason" + homepage: "https://github.com/steineggerlab/foldmason" + documentation: "https://github.com/steineggerlab/foldmason" + tool_dev_url: "https://github.com/steineggerlab/foldmason" + doi: "10.1101/2024.08.01.606130" + licence: ["GPL v3"] + identifier: biotools:foldmason + +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - msa: + type: file + description: Input alignment file. + pattern: "*.{fa,fasta,aln}" + - - meta2: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - db: + type: file + description: Input foldmason database. + pattern: "*" + - - meta3: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - pdbs: + type: file + description: Protein structures used for the visualization. + pattern: "*.{pdb}" + - - meta4: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - tree: + type: file + description: Guide tree used for the visualization . + pattern: "*.{nwk,dnd}" +output: + - html: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - "${prefix}.html": + type: file + description: HTML file with the foldmason visualization + pattern: "*.{html}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@luisas" +maintainers: + - "@luisas" diff --git a/modules/nf-core/foldmason/msa2lddtreport/tests/main.nf.test b/modules/nf-core/foldmason/msa2lddtreport/tests/main.nf.test new file mode 100644 index 00000000000..b92c05d0704 --- /dev/null +++ b/modules/nf-core/foldmason/msa2lddtreport/tests/main.nf.test @@ -0,0 +1,101 @@ +nextflow_process { + + name "Test Process FOLDMASON_MSA2LDDTREPORT" + script "../main.nf" + process "FOLDMASON_MSA2LDDTREPORT" + + tag "modules" + tag "modules_nfcore" + tag "foldmason" + tag "foldmason/msa2lddtreport" + tag "foldmason/createdb" + tag "untar" + tag "famsa/guidetree" + + + setup{ + run("UNTAR") { + script "../../../../../modules/nf-core/untar/main.nf" + process { + """ + archive = file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/af2_structures/seatoxin-ref.tar.gz", checkIfExists: true) + input[0] = Channel.of(tuple([id:'test'], archive)) + """ + } + } + + run("FAMSA_GUIDETREE") { + script "../../../../../modules/nf-core/famsa/guidetree/main.nf" + process { + """ + input[0] = [ [ id:'test_tree' ], // meta map + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin-ref.fa", checkIfExists: true) + ] + """ + } + } + + run("FOLDMASON_CREATEDB") { + script "../../../../../modules/nf-core/foldmason/createdb/main.nf" + process { + """ + input[0] = UNTAR.out.untar.map { meta,dir -> [meta, file(dir).listFiles().collect()]} + """ + } + } + + + } + + test("seatoxin") { + + + when { + process { + """ + input[0] =[ [ id:'test' ], // meta map + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin.ref", checkIfExists: true) + ] + input[1] = FOLDMASON_CREATEDB.out.db.collect{ meta, db -> db }.map{ db -> [[ id: 'test'], db]} + input[2] = UNTAR.out.untar.map { meta,dir -> [meta, file(dir).listFiles().collect()]} + input[3] = FAMSA_GUIDETREE.out.tree.collect{ meta, tree -> tree }.map{ tree -> [[ id: 'test_tree'], tree]} + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("seatixin - stub") { + + options "-stub" + + when { + process { + """ + input[0] =[ [ id:'test_tree' ], // meta map + file(params.modules_testdata_base_path + "../../multiplesequencealign/testdata/setoxin.ref", checkIfExists: true) + ] + input[1] = FOLDMASON_CREATEDB.out.db.collect{ meta, db -> db }.map{ db -> [[ id: 'test'], db]} + input[2] = UNTAR.out.untar.map { meta,dir -> [meta, file(dir).listFiles().collect()]} + input[3] = FAMSA_GUIDETREE.out.tree.collect{ meta, tree -> tree }.map{ tree -> [[ id: 'test_tree'], tree]} + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/foldmason/msa2lddtreport/tests/main.nf.test.snap b/modules/nf-core/foldmason/msa2lddtreport/tests/main.nf.test.snap new file mode 100644 index 00000000000..da11cfad2df --- /dev/null +++ b/modules/nf-core/foldmason/msa2lddtreport/tests/main.nf.test.snap @@ -0,0 +1,68 @@ +{ + "seatixin - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test_tree" + }, + "test_tree.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,ed922d0faa7a3e3c8171a05296939468" + ], + "html": [ + [ + { + "id": "test_tree" + }, + "test_tree.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,ed922d0faa7a3e3c8171a05296939468" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-10T09:36:23.360594258" + }, + "seatoxin": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.html:md5,7a90a8e674dc45ce4181498b8f53b519" + ] + ], + "1": [ + "versions.yml:md5,ed922d0faa7a3e3c8171a05296939468" + ], + "html": [ + [ + { + "id": "test" + }, + "test.html:md5,7a90a8e674dc45ce4181498b8f53b519" + ] + ], + "versions": [ + "versions.yml:md5,ed922d0faa7a3e3c8171a05296939468" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-10T09:54:03.711567262" + } +} \ No newline at end of file From 9142b390538283705c084e4d612170972ff60326 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Tue, 10 Dec 2024 12:30:25 +0100 Subject: [PATCH 5/6] MEGAHIT: fix single-end input (#7190) * Fix space to command separated lst * Put hte join the right place --- modules/nf-core/megahit/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/megahit/main.nf b/modules/nf-core/megahit/main.nf index f6e50f94d43..db0612422bd 100644 --- a/modules/nf-core/megahit/main.nf +++ b/modules/nf-core/megahit/main.nf @@ -25,7 +25,7 @@ process MEGAHIT { def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def reads_command = meta.single_end || !reads2 ? "-r ${reads1}" : "-1 ${reads1.join(',')} -2 ${reads2.join(',')}" + def reads_command = meta.single_end || !reads2 ? "-r ${reads1.join(',')}" : "-1 ${reads1.join(',')} -2 ${reads2.join(',')}" """ megahit \\ ${reads_command} \\ From 2edb63067971fb906749e96bf22b23a4ec892a62 Mon Sep 17 00:00:00 2001 From: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> Date: Tue, 10 Dec 2024 17:33:26 +0530 Subject: [PATCH 6/6] Fix ci confirm pass (#7186) * update confirm-pass jobs to correctly identify failed & cancelled * touch gpu & cpu module to test * bump NXF VER to 24.10.2 --- .github/workflows/gpu-tests.yml | 13 +++++--- .github/workflows/nf-test.yml | 13 +++++--- .../nf-core/bwameth/align/tests/main.nf.test | 1 - modules/nf-core/parabricks/fq2bammeth/main.nf | 14 ++++---- .../parabricks/fq2bammeth/tests/main.nf.test | 9 +++--- .../fq2bammeth/tests/main.nf.test.snap | 32 +++++++++---------- 6 files changed, 46 insertions(+), 36 deletions(-) diff --git a/.github/workflows/gpu-tests.yml b/.github/workflows/gpu-tests.yml index 78667065a3b..2a341360f04 100644 --- a/.github/workflows/gpu-tests.yml +++ b/.github/workflows/gpu-tests.yml @@ -29,7 +29,7 @@ env: NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity # renovate: datasource=github-releases depName=nextflow-io/nextflow versioning=semver - NXF_VER: "24.10.1" + NXF_VER: "24.10.2" jobs: nf-test-changes: @@ -108,13 +108,18 @@ jobs: needs: [nf-test-gpu] if: always() steps: - - name: All tests ok - if: ${{ success() || !contains(needs.*.result, 'failure') }} - run: exit 0 - name: One or more tests failed if: ${{ contains(needs.*.result, 'failure') }} run: exit 1 + - name: One or more tests cancelled + if: ${{ contains(needs.*.result, 'cancelled') }} + run: exit 1 + + - name: All tests ok + if: ${{ contains(needs.*.result, 'success') }} + run: exit 0 + - name: debug-print if: always() run: | diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml index f8c71275bf9..036c40f0880 100644 --- a/.github/workflows/nf-test.yml +++ b/.github/workflows/nf-test.yml @@ -32,7 +32,7 @@ env: NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity # renovate: datasource=github-releases depName=nextflow/nextflow versioning=semver - NXF_VER: "24.10.1" + NXF_VER: "24.10.2" jobs: nf-test-changes: @@ -110,13 +110,18 @@ jobs: needs: [nf-test] if: always() steps: - - name: All tests ok - if: ${{ success() || !contains(needs.*.result, 'failure') }} - run: exit 0 - name: One or more tests failed if: ${{ contains(needs.*.result, 'failure') }} run: exit 1 + - name: One or more tests cancelled + if: ${{ contains(needs.*.result, 'cancelled') }} + run: exit 1 + + - name: All tests ok + if: ${{ contains(needs.*.result, 'success') }} + run: exit 0 + - name: debug-print if: always() run: | diff --git a/modules/nf-core/bwameth/align/tests/main.nf.test b/modules/nf-core/bwameth/align/tests/main.nf.test index 37dd4ad2b08..87195e0c31a 100644 --- a/modules/nf-core/bwameth/align/tests/main.nf.test +++ b/modules/nf-core/bwameth/align/tests/main.nf.test @@ -117,5 +117,4 @@ nextflow_process { ) } } - } diff --git a/modules/nf-core/parabricks/fq2bammeth/main.nf b/modules/nf-core/parabricks/fq2bammeth/main.nf index 44f266604bd..eb7ae685b71 100644 --- a/modules/nf-core/parabricks/fq2bammeth/main.nf +++ b/modules/nf-core/parabricks/fq2bammeth/main.nf @@ -27,14 +27,15 @@ process PARABRICKS_FQ2BAMMETH { if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { error "Parabricks module does not support Conda. Please use Docker / Singularity / Podman instead." } - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def in_fq_command = meta.single_end ? "--in-se-fq $reads" : "--in-fq $reads" + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def in_fq_command = meta.single_end ? "--in-se-fq $reads" : "--in-fq $reads" def known_sites_command = known_sites ? known_sites.collect{"--knownSites $it"}.join(' ') : "" - def known_sites_output = known_sites ? "--out-recal-file ${prefix}.table" : "" - def num_gpus = task.accelerator ? "--num-gpus $task.accelerator.request" : '' + def known_sites_output = known_sites ? "--out-recal-file ${prefix}.table" : "" + def num_gpus = task.accelerator ? "--num-gpus $task.accelerator.request" : '' """ ln -sf \$(readlink $fasta) $index/$fasta + pbrun \\ fq2bam_meth \\ --ref $index/$fasta \\ @@ -44,6 +45,7 @@ process PARABRICKS_FQ2BAMMETH { $known_sites_output \\ $num_gpus \\ $args + cat <<-END_VERSIONS > versions.yml "${task.process}": pbrun: \$(echo \$(pbrun version 2>&1) | sed 's/^Please.* //' ) @@ -55,11 +57,11 @@ process PARABRICKS_FQ2BAMMETH { if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { error "Parabricks module does not support Conda. Please use Docker / Singularity / Podman instead." } - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.bam touch ${prefix}.bam.bai + cat <<-END_VERSIONS > versions.yml "${task.process}": pbrun: \$(echo \$(pbrun version 2>&1) | sed 's/^Please.* //' ) diff --git a/modules/nf-core/parabricks/fq2bammeth/tests/main.nf.test b/modules/nf-core/parabricks/fq2bammeth/tests/main.nf.test index 459eb6317db..ce89e8cac9f 100644 --- a/modules/nf-core/parabricks/fq2bammeth/tests/main.nf.test +++ b/modules/nf-core/parabricks/fq2bammeth/tests/main.nf.test @@ -5,12 +5,12 @@ nextflow_process { process "PARABRICKS_FQ2BAMMETH" config "./nextflow.config" + tag "gpu" tag "bwameth/index" tag "modules" tag "parabricks" tag "parabricks/fq2bammeth" tag "modules_nfcore" - tag "gpu" setup { run("BWAMETH_INDEX") { @@ -26,8 +26,7 @@ nextflow_process { } } - - test("SRR389222 - fastq - se") { + test("SRR389222 single-end [fastq]") { when { process { @@ -60,7 +59,7 @@ nextflow_process { } } - test("SRR389222 - fastq - se - stub") { + test("SRR389222 single-end [fastq] - stub") { options '-stub' when { @@ -90,7 +89,7 @@ nextflow_process { } } - test("E. coli - fastq - pe - stub") { + test("E.coli paired-end [fastq] - stub") { options '-stub' when { diff --git a/modules/nf-core/parabricks/fq2bammeth/tests/main.nf.test.snap b/modules/nf-core/parabricks/fq2bammeth/tests/main.nf.test.snap index cf06f28c7b3..21ae222c254 100644 --- a/modules/nf-core/parabricks/fq2bammeth/tests/main.nf.test.snap +++ b/modules/nf-core/parabricks/fq2bammeth/tests/main.nf.test.snap @@ -1,5 +1,5 @@ { - "SRR389222 - fastq - se - stub": { + "SRR389222 single-end [fastq] - stub": { "content": [ { "0": [ @@ -21,13 +21,13 @@ ] ], "2": [ - + ], "3": [ - + ], "4": [ - + ], "5": [ "versions.yml:md5,882d996a64ad457fcaf85e3a75514baf" @@ -51,13 +51,13 @@ ] ], "bqsr_table": [ - + ], "duplicate_metrics": [ - + ], "qc_metrics": [ - + ], "versions": [ "versions.yml:md5,882d996a64ad457fcaf85e3a75514baf" @@ -70,7 +70,7 @@ }, "timestamp": "2024-11-12T11:20:10.809580487" }, - "E. coli - fastq - pe - stub": { + "E.coli paired-end [fastq] - stub": { "content": [ { "0": [ @@ -92,13 +92,13 @@ ] ], "2": [ - + ], "3": [ - + ], "4": [ - + ], "5": [ "versions.yml:md5,882d996a64ad457fcaf85e3a75514baf" @@ -122,13 +122,13 @@ ] ], "bqsr_table": [ - + ], "duplicate_metrics": [ - + ], "qc_metrics": [ - + ], "versions": [ "versions.yml:md5,882d996a64ad457fcaf85e3a75514baf" @@ -141,7 +141,7 @@ }, "timestamp": "2024-11-12T11:20:18.927598721" }, - "SRR389222 - fastq - se": { + "SRR389222 single-end [fastq]": { "content": [ "a7f7ca7b5eb503ab58790d64a0273ed6", [ @@ -163,4 +163,4 @@ }, "timestamp": "2024-10-26T21:29:14.709022" } -} \ No newline at end of file +}