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/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 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} \\ diff --git a/modules/nf-core/ngsbits/samplegender/environment.yml b/modules/nf-core/ngsbits/samplegender/environment.yml index 932d1556a7a..98be7c334ec 100644 --- a/modules/nf-core/ngsbits/samplegender/environment.yml +++ b/modules/nf-core/ngsbits/samplegender/environment.yml @@ -2,4 +2,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::ngs-bits=2023_02 + - bioconda::ngs-bits=2024_11 diff --git a/modules/nf-core/ngsbits/samplegender/main.nf b/modules/nf-core/ngsbits/samplegender/main.nf index 3562238dfcd..6551490845c 100644 --- a/modules/nf-core/ngsbits/samplegender/main.nf +++ b/modules/nf-core/ngsbits/samplegender/main.nf @@ -4,13 +4,13 @@ process NGSBITS_SAMPLEGENDER { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ngs-bits:2023_02--py311ha0b7adc_2': - 'biocontainers/ngs-bits:2023_02--py311ha0b7adc_2' }" + 'https://depot.galaxyproject.org/singularity/ngs-bits:2024_11--py312hd80e9a6_0': + 'biocontainers/ngs-bits:2024_11--py312hd80e9a6_0' }" input: tuple val(meta), path(bam), path(bai) tuple val(meta2), path(fasta) - tuple val(meta2), path(fai) + tuple val(meta3), path(fai) val method output: diff --git a/modules/nf-core/ngsbits/samplegender/meta.yml b/modules/nf-core/ngsbits/samplegender/meta.yml index 54a611812df..fd5a55024c2 100644 --- a/modules/nf-core/ngsbits/samplegender/meta.yml +++ b/modules/nf-core/ngsbits/samplegender/meta.yml @@ -36,7 +36,7 @@ input: type: file description: The reference FASTA to use (mandatory when CRAM files are used) pattern: "*.{fasta,fa,fna}" - - - meta2: + - - meta3: type: map description: | Groovy Map containing reference fasta information diff --git a/modules/nf-core/ngsbits/samplegender/tests/main.nf.test b/modules/nf-core/ngsbits/samplegender/tests/main.nf.test index 4f8379b4022..0917b7ddeed 100644 --- a/modules/nf-core/ngsbits/samplegender/tests/main.nf.test +++ b/modules/nf-core/ngsbits/samplegender/tests/main.nf.test @@ -9,7 +9,7 @@ nextflow_process { tag "ngsbits" tag "ngsbits/samplegender" - // Only a stub test here because the modules needs the full chrX and chrY + // Only a stub test here because the module needs the full chrX and chrY test("homo_sapiens - bam, bai, [], [], sry - stub") { options "-stub" diff --git a/modules/nf-core/ngsbits/samplegender/tests/main.nf.test.snap b/modules/nf-core/ngsbits/samplegender/tests/main.nf.test.snap index 48fd8af9c12..cb493a2c25b 100644 --- a/modules/nf-core/ngsbits/samplegender/tests/main.nf.test.snap +++ b/modules/nf-core/ngsbits/samplegender/tests/main.nf.test.snap @@ -11,7 +11,7 @@ ] ], "1": [ - "versions.yml:md5,72f3e70be3e6a734bf39d1a6bf6d604b" + "versions.yml:md5,9c2c2b8cf880d89b4eb1c06e3b7f7333" ], "tsv": [ [ @@ -22,14 +22,14 @@ ] ], "versions": [ - "versions.yml:md5,72f3e70be3e6a734bf39d1a6bf6d604b" + "versions.yml:md5,9c2c2b8cf880d89b4eb1c06e3b7f7333" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nf-test": "0.9.1", + "nextflow": "24.10.1" }, - "timestamp": "2024-03-18T15:36:37.639882564" + "timestamp": "2024-12-10T13:36:08.650020628" } } \ No newline at end of file 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 +}