diff --git a/.github/skip_nf_test.json b/.github/skip_nf_test.json index 47336236310..01e2c6712bc 100644 --- a/.github/skip_nf_test.json +++ b/.github/skip_nf_test.json @@ -86,6 +86,8 @@ "docker_self_hosted": ["modules/nf-core/parabricks"], "singularity": [ "modules/nf-core/bases2fastq", + "modules/nf-core/deepvariant/rundeepvariant", + "modules/nf-core/deepvariant/vcfstatsreport", "modules/nf-core/deepsomatic", "modules/nf-core/parabricks", "modules/nf-core/universc" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7e3c53763cc..a343cc64bf8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -93,7 +93,7 @@ jobs: echo ${{ steps.module_names.outputs.result }} nf-core-lint-modules: - runs-on: ${{ github.event.inputs.runners || 'self-hosted' }} + runs-on: ${{ github.event.inputs.runners || 'ubuntu-latest' }} name: nf-core lint modules needs: nf-core-changes if: ${{ (needs.nf-core-changes.outputs.modules == 'true') }} diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml index ebfdedd2019..9774004aa51 100644 --- a/.github/workflows/nf-test.yml +++ b/.github/workflows/nf-test.yml @@ -75,7 +75,7 @@ jobs: echo ${{ steps.outputs.outputs.modules }} echo ${{ steps.outputs.outputs.subworkflows }} nf-test: - runs-on: ${{ github.event.inputs.runners || 'self-hosted' }} + runs-on: ${{ github.event.inputs.runners || 'ubuntu-latest' }} name: "Test | ${{ matrix.profile }} | ${{ matrix.shard }}" needs: nf-test-changes if: ${{ needs.nf-test-changes.outputs.modules != '[]' || needs.nf-test-changes.outputs.subworkflows != '[]' }} diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index f61541dc9ab..0540ddf7940 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -62,7 +62,7 @@ jobs: echo ${{ steps.tags.outputs.subworkflows }} pytest: - runs-on: ${{ github.event.inputs.runners || 'self-hosted' }} + runs-on: ${{ github.event.inputs.runners || 'ubuntu-latest' }} name: pytest needs: [pytest-changes] if: needs.pytest-changes.outputs.tags != '[]' diff --git a/modules/nf-core/agat/convertbed2gff/environment.yml b/modules/nf-core/agat/convertbed2gff/environment.yml new file mode 100644 index 00000000000..2c3daab3437 --- /dev/null +++ b/modules/nf-core/agat/convertbed2gff/environment.yml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - "bioconda::agat=1.4.2" diff --git a/modules/nf-core/agat/convertbed2gff/main.nf b/modules/nf-core/agat/convertbed2gff/main.nf new file mode 100644 index 00000000000..2ce3e67d5b5 --- /dev/null +++ b/modules/nf-core/agat/convertbed2gff/main.nf @@ -0,0 +1,45 @@ +process AGAT_CONVERTBED2GFF { + tag "$meta.id" + label 'process_single' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/agat:1.4.2--pl5321hdfd78af_0' : + 'biocontainers/agat:1.4.2--pl5321hdfd78af_0' }" + + input: + tuple val(meta), path(bed) + + output: + tuple val(meta), path("*.gff") , emit: gff + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + agat_convert_bed2gff.pl \\ + --bed $bed \\ + --output ${prefix}.gff \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + agat: \$(agat_convert_bed2gff.pl --help | sed -n 's/.*(AGAT) - Version: \\(.*\\) .*/\\1/p') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.gff + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + agat: \$(agat_convert_bed2gff.pl --help | sed -n 's/.*(AGAT) - Version: \\(.*\\) .*/\\1/p') + END_VERSIONS + """ +} diff --git a/modules/nf-core/agat/convertbed2gff/meta.yml b/modules/nf-core/agat/convertbed2gff/meta.yml new file mode 100644 index 00000000000..57bd3d34227 --- /dev/null +++ b/modules/nf-core/agat/convertbed2gff/meta.yml @@ -0,0 +1,49 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: agat_convertbed2gff +description: | + Takes a bed12 file and converts to a GFF3 file +keywords: + - genome + - bed + - gff + - conversion +tools: + - agat: + description: "AGAT is a toolkit for manipulation and getting information from + GFF/GTF files" + homepage: "https://github.com/NBISweden/AGAT" + documentation: "https://agat.readthedocs.io/" + tool_dev_url: "https://github.com/NBISweden/AGAT" + doi: "10.5281/zenodo.3552717" + licence: ["GPL v3"] + identifier: biotools:AGAT +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: Input bed12 file + pattern: "*.bed" +output: + - gff: + - meta: + type: map + description: Groovy Map containing sample information + - "*.gff": + type: file + description: Output GFF3 file + pattern: "*.{gff}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@GallVp" +maintainers: + - "@GallVp" diff --git a/modules/nf-core/agat/convertbed2gff/tests/main.nf.test b/modules/nf-core/agat/convertbed2gff/tests/main.nf.test new file mode 100644 index 00000000000..1799dab28c4 --- /dev/null +++ b/modules/nf-core/agat/convertbed2gff/tests/main.nf.test @@ -0,0 +1,58 @@ +nextflow_process { + + name "Test Process AGAT_CONVERTBED2GFF" + script "../main.nf" + process "AGAT_CONVERTBED2GFF" + + tag "modules" + tag "modules_nfcore" + tag "agat" + tag "agat/convertbed2gff" + + test("sarscov2 - bed12") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed12', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - bam - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed12', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} \ No newline at end of file diff --git a/modules/nf-core/agat/convertbed2gff/tests/main.nf.test.snap b/modules/nf-core/agat/convertbed2gff/tests/main.nf.test.snap new file mode 100644 index 00000000000..4ecc20d7676 --- /dev/null +++ b/modules/nf-core/agat/convertbed2gff/tests/main.nf.test.snap @@ -0,0 +1,70 @@ +{ + "sarscov2 - bam - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.gff:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,ccfb13a5b261f660922e1ed845e68cbc" + ], + "gff": [ + [ + { + "id": "test", + "single_end": false + }, + "test.gff:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,ccfb13a5b261f660922e1ed845e68cbc" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.3" + }, + "timestamp": "2025-01-15T14:02:09.48826" + }, + "sarscov2 - bed12": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.gff:md5,4e5a23a6babac6d5b1bcfa06c5b12518" + ] + ], + "1": [ + "versions.yml:md5,ccfb13a5b261f660922e1ed845e68cbc" + ], + "gff": [ + [ + { + "id": "test" + }, + "test.gff:md5,4e5a23a6babac6d5b1bcfa06c5b12518" + ] + ], + "versions": [ + "versions.yml:md5,ccfb13a5b261f660922e1ed845e68cbc" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.3" + }, + "timestamp": "2025-01-15T14:02:03.549345" + } +} \ No newline at end of file diff --git a/modules/nf-core/deepvariant/rundeepvariant/main.nf b/modules/nf-core/deepvariant/rundeepvariant/main.nf index 7f99c53f6d2..aec18907646 100644 --- a/modules/nf-core/deepvariant/rundeepvariant/main.nf +++ b/modules/nf-core/deepvariant/rundeepvariant/main.nf @@ -5,7 +5,7 @@ process DEEPVARIANT_RUNDEEPVARIANT { // FIXME Conda is not supported at the moment // BUG https://github.com/nf-core/modules/issues/1754 // BUG https://github.com/bioconda/bioconda-recipes/issues/30310 - container "nf-core/deepvariant:1.6.1" + container "docker.io/google/deepvariant:1.8.0" input: tuple val(meta), path(input), path(index), path(intervals) @@ -15,11 +15,11 @@ process DEEPVARIANT_RUNDEEPVARIANT { tuple val(meta5), path(par_bed) output: - tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf - tuple val(meta), path("${prefix}.vcf.gz.tbi") , emit: vcf_tbi - tuple val(meta), path("${prefix}.g.vcf.gz") , emit: gvcf - tuple val(meta), path("${prefix}.g.vcf.gz.tbi"), emit: gvcf_tbi - path "versions.yml" , emit: versions + tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf + tuple val(meta), path("${prefix}.vcf.gz.tbi") , emit: vcf_tbi + tuple val(meta), path("${prefix}.g.vcf.gz") , emit: gvcf + tuple val(meta), path("${prefix}.g.vcf.gz.tbi"), emit: gvcf_tbi + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -33,9 +33,6 @@ process DEEPVARIANT_RUNDEEPVARIANT { prefix = task.ext.prefix ?: "${meta.id}" def regions = intervals ? "--regions=${intervals}" : "" def par_regions = par_bed ? "--par_regions_bed=${par_bed}" : "" - // WARN https://github.com/nf-core/modules/pull/5801#issuecomment-2194293755 - // FIXME Revert this on next version bump - def VERSION = '1.6.1' """ /opt/deepvariant/bin/run_deepvariant \\ @@ -51,7 +48,7 @@ process DEEPVARIANT_RUNDEEPVARIANT { cat <<-END_VERSIONS > versions.yml "${task.process}": - deepvariant: $VERSION + deepvariant: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) END_VERSIONS """ @@ -61,9 +58,6 @@ process DEEPVARIANT_RUNDEEPVARIANT { error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." } prefix = task.ext.prefix ?: "${meta.id}" - // WARN https://github.com/nf-core/modules/pull/5801#issuecomment-2194293755 - // FIXME Revert this on next version bump - def VERSION = '1.6.1' """ touch ${prefix}.vcf.gz touch ${prefix}.vcf.gz.tbi @@ -72,7 +66,7 @@ process DEEPVARIANT_RUNDEEPVARIANT { cat <<-END_VERSIONS > versions.yml "${task.process}": - deepvariant: $VERSION + deepvariant: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) END_VERSIONS """ } diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test.snap b/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test.snap index 1ec351eecc9..8e836336da6 100644 --- a/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test.snap +++ b/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test.snap @@ -8,7 +8,7 @@ "id": "test", "single_end": false }, - "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + "test_out.vcf.gz:md5,cf14200d683c17a6e433bb076d487fee" ] ], "1": [ @@ -17,7 +17,7 @@ "id": "test", "single_end": false }, - "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + "test_out.vcf.gz.tbi:md5,e9bcd1d1f5280e0d76ed8fd31f27bd59" ] ], "2": [ @@ -26,7 +26,7 @@ "id": "test", "single_end": false }, - "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + "test_out.g.vcf.gz:md5,6251a87945e530ca61a989d7187d89dc" ] ], "3": [ @@ -35,11 +35,11 @@ "id": "test", "single_end": false }, - "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + "test_out.g.vcf.gz.tbi:md5,32ca0d6713b96ed4ce07c79421bb04a9" ] ], "4": [ - "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + "versions.yml:md5,cd692ea876a00da762fd4608c9f40f01" ], "gvcf": [ [ @@ -47,7 +47,7 @@ "id": "test", "single_end": false }, - "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + "test_out.g.vcf.gz:md5,6251a87945e530ca61a989d7187d89dc" ] ], "gvcf_tbi": [ @@ -56,7 +56,7 @@ "id": "test", "single_end": false }, - "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + "test_out.g.vcf.gz.tbi:md5,32ca0d6713b96ed4ce07c79421bb04a9" ] ], "vcf": [ @@ -65,7 +65,7 @@ "id": "test", "single_end": false }, - "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + "test_out.vcf.gz:md5,cf14200d683c17a6e433bb076d487fee" ] ], "vcf_tbi": [ @@ -74,19 +74,19 @@ "id": "test", "single_end": false }, - "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + "test_out.vcf.gz.tbi:md5,e9bcd1d1f5280e0d76ed8fd31f27bd59" ] ], "versions": [ - "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + "versions.yml:md5,cd692ea876a00da762fd4608c9f40f01" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-08-29T11:36:27.325363" + "timestamp": "2025-01-14T08:16:22.036932742" }, "homo_sapiens - [bam, bai] - fasta - fai": { "content": [ @@ -97,7 +97,7 @@ "id": "test", "single_end": false }, - "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + "test_out.vcf.gz:md5,cf14200d683c17a6e433bb076d487fee" ] ], "1": [ @@ -106,7 +106,7 @@ "id": "test", "single_end": false }, - "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + "test_out.vcf.gz.tbi:md5,e9bcd1d1f5280e0d76ed8fd31f27bd59" ] ], "2": [ @@ -115,7 +115,7 @@ "id": "test", "single_end": false }, - "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + "test_out.g.vcf.gz:md5,6251a87945e530ca61a989d7187d89dc" ] ], "3": [ @@ -124,11 +124,11 @@ "id": "test", "single_end": false }, - "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + "test_out.g.vcf.gz.tbi:md5,32ca0d6713b96ed4ce07c79421bb04a9" ] ], "4": [ - "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + "versions.yml:md5,cd692ea876a00da762fd4608c9f40f01" ], "gvcf": [ [ @@ -136,7 +136,7 @@ "id": "test", "single_end": false }, - "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + "test_out.g.vcf.gz:md5,6251a87945e530ca61a989d7187d89dc" ] ], "gvcf_tbi": [ @@ -145,7 +145,7 @@ "id": "test", "single_end": false }, - "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + "test_out.g.vcf.gz.tbi:md5,32ca0d6713b96ed4ce07c79421bb04a9" ] ], "vcf": [ @@ -154,7 +154,7 @@ "id": "test", "single_end": false }, - "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + "test_out.vcf.gz:md5,cf14200d683c17a6e433bb076d487fee" ] ], "vcf_tbi": [ @@ -163,19 +163,19 @@ "id": "test", "single_end": false }, - "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + "test_out.vcf.gz.tbi:md5,e9bcd1d1f5280e0d76ed8fd31f27bd59" ] ], "versions": [ - "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + "versions.yml:md5,cd692ea876a00da762fd4608c9f40f01" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-08-29T11:34:41.779153" + "timestamp": "2025-01-14T08:13:35.621497498" }, "homo_sapiens - [cram, crai, genome_bed] - fasta - fai": { "content": [ @@ -186,7 +186,7 @@ "id": "test", "single_end": false }, - "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + "test_out.vcf.gz:md5,cf14200d683c17a6e433bb076d487fee" ] ], "1": [ @@ -195,7 +195,7 @@ "id": "test", "single_end": false }, - "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + "test_out.vcf.gz.tbi:md5,e9bcd1d1f5280e0d76ed8fd31f27bd59" ] ], "2": [ @@ -204,7 +204,7 @@ "id": "test", "single_end": false }, - "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + "test_out.g.vcf.gz:md5,6251a87945e530ca61a989d7187d89dc" ] ], "3": [ @@ -213,11 +213,11 @@ "id": "test", "single_end": false }, - "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + "test_out.g.vcf.gz.tbi:md5,32ca0d6713b96ed4ce07c79421bb04a9" ] ], "4": [ - "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + "versions.yml:md5,cd692ea876a00da762fd4608c9f40f01" ], "gvcf": [ [ @@ -225,7 +225,7 @@ "id": "test", "single_end": false }, - "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a" + "test_out.g.vcf.gz:md5,6251a87945e530ca61a989d7187d89dc" ] ], "gvcf_tbi": [ @@ -234,7 +234,7 @@ "id": "test", "single_end": false }, - "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d" + "test_out.g.vcf.gz.tbi:md5,32ca0d6713b96ed4ce07c79421bb04a9" ] ], "vcf": [ @@ -243,7 +243,7 @@ "id": "test", "single_end": false }, - "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0" + "test_out.vcf.gz:md5,cf14200d683c17a6e433bb076d487fee" ] ], "vcf_tbi": [ @@ -252,19 +252,19 @@ "id": "test", "single_end": false }, - "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21" + "test_out.vcf.gz.tbi:md5,e9bcd1d1f5280e0d76ed8fd31f27bd59" ] ], "versions": [ - "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + "versions.yml:md5,cd692ea876a00da762fd4608c9f40f01" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-08-29T11:35:16.993129" + "timestamp": "2025-01-14T08:14:32.23781232" }, "homo_sapiens - [cram, crai, genome_bed] - fasta - fai - par_bed": { "content": [ @@ -275,7 +275,7 @@ "id": "test", "single_end": false }, - "test_out.vcf.gz:md5,d2e26d65dbbcea9b087ed191b5c9841c" + "test_out.vcf.gz:md5,b79936a7bf53fa4ee7e5866664e37d56" ] ], "1": [ @@ -284,7 +284,7 @@ "id": "test", "single_end": false }, - "test_out.vcf.gz.tbi:md5,0801296d0356415bbf1ef8deb4ec84c3" + "test_out.vcf.gz.tbi:md5,22f9f4c6c8c1faa8b129eddf32b445b8" ] ], "2": [ @@ -293,7 +293,7 @@ "id": "test", "single_end": false }, - "test_out.g.vcf.gz:md5,4fcaa9a8b55730d191382160c2b5bb0a" + "test_out.g.vcf.gz:md5,c82ce85ed16dcabe411995c52aaffd85" ] ], "3": [ @@ -302,11 +302,11 @@ "id": "test", "single_end": false }, - "test_out.g.vcf.gz.tbi:md5,f468e846904733b3231ecf00ef7cd4a2" + "test_out.g.vcf.gz.tbi:md5,6420a456b0507c70c8423293395c29bc" ] ], "4": [ - "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + "versions.yml:md5,cd692ea876a00da762fd4608c9f40f01" ], "gvcf": [ [ @@ -314,7 +314,7 @@ "id": "test", "single_end": false }, - "test_out.g.vcf.gz:md5,4fcaa9a8b55730d191382160c2b5bb0a" + "test_out.g.vcf.gz:md5,c82ce85ed16dcabe411995c52aaffd85" ] ], "gvcf_tbi": [ @@ -323,7 +323,7 @@ "id": "test", "single_end": false }, - "test_out.g.vcf.gz.tbi:md5,f468e846904733b3231ecf00ef7cd4a2" + "test_out.g.vcf.gz.tbi:md5,6420a456b0507c70c8423293395c29bc" ] ], "vcf": [ @@ -332,7 +332,7 @@ "id": "test", "single_end": false }, - "test_out.vcf.gz:md5,d2e26d65dbbcea9b087ed191b5c9841c" + "test_out.vcf.gz:md5,b79936a7bf53fa4ee7e5866664e37d56" ] ], "vcf_tbi": [ @@ -341,18 +341,18 @@ "id": "test", "single_end": false }, - "test_out.vcf.gz.tbi:md5,0801296d0356415bbf1ef8deb4ec84c3" + "test_out.vcf.gz.tbi:md5,22f9f4c6c8c1faa8b129eddf32b445b8" ] ], "versions": [ - "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890" + "versions.yml:md5,cd692ea876a00da762fd4608c9f40f01" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-08-29T11:35:52.23093" + "timestamp": "2025-01-14T08:15:29.680851997" } } \ No newline at end of file diff --git a/modules/nf-core/deepvariant/vcfstatsreport/main.nf b/modules/nf-core/deepvariant/vcfstatsreport/main.nf index 5bbf06b633f..314c3d2aec1 100644 --- a/modules/nf-core/deepvariant/vcfstatsreport/main.nf +++ b/modules/nf-core/deepvariant/vcfstatsreport/main.nf @@ -5,7 +5,7 @@ process DEEPVARIANT_VCFSTATSREPORT { // FIXME Conda is not supported at the moment // BUG https://github.com/nf-core/modules/issues/1754 // BUG https://github.com/bioconda/bioconda-recipes/issues/30310 - container "nf-core/deepvariant:1.6.1" + container "docker.io/google/deepvariant:1.8.0" input: tuple val(meta), path(vcf) @@ -24,10 +24,6 @@ process DEEPVARIANT_VCFSTATSREPORT { } def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" - // WARN https://github.com/nf-core/modules/pull/5801#issuecomment-2194293755 - // FIXME Revert this on next version bump - def VERSION = '1.6.1' - """ /opt/deepvariant/bin/vcf_stats_report \\ --input_vcf=${vcf} \\ @@ -35,7 +31,7 @@ process DEEPVARIANT_VCFSTATSREPORT { cat <<-END_VERSIONS > versions.yml "${task.process}": - deepvariant: $VERSION + deepvariant: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) END_VERSIONS """ @@ -45,15 +41,12 @@ process DEEPVARIANT_VCFSTATSREPORT { error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." } prefix = task.ext.prefix ?: "${meta.id}" - // WARN https://github.com/nf-core/modules/pull/5801#issuecomment-2194293755 - // FIXME Revert this on next version bump - def VERSION = '1.6.1' """ touch ${prefix}.visual_report.html cat <<-END_VERSIONS > versions.yml "${task.process}": - deepvariant: $VERSION + deepvariant: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) END_VERSIONS """ } diff --git a/modules/nf-core/deepvariant/vcfstatsreport/tests/main.nf.test.snap b/modules/nf-core/deepvariant/vcfstatsreport/tests/main.nf.test.snap index 9a9ac3cef60..9255ccb4539 100644 --- a/modules/nf-core/deepvariant/vcfstatsreport/tests/main.nf.test.snap +++ b/modules/nf-core/deepvariant/vcfstatsreport/tests/main.nf.test.snap @@ -11,7 +11,7 @@ ] ], "1": [ - "versions.yml:md5,3378d1cbd4b3ba7579dcd6c47266f996" + "versions.yml:md5,72414085057fedf473d874c39db9b4c1" ], "report": [ [ @@ -22,15 +22,15 @@ ] ], "versions": [ - "versions.yml:md5,3378d1cbd4b3ba7579dcd6c47266f996" + "versions.yml:md5,72414085057fedf473d874c39db9b4c1" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-10-14T08:19:35.672028563" + "timestamp": "2025-01-14T15:13:32.380265779" }, "bcf": { "content": [ @@ -44,7 +44,7 @@ ] ], "1": [ - "versions.yml:md5,3378d1cbd4b3ba7579dcd6c47266f996" + "versions.yml:md5,72414085057fedf473d874c39db9b4c1" ], "report": [ [ @@ -55,15 +55,15 @@ ] ], "versions": [ - "versions.yml:md5,3378d1cbd4b3ba7579dcd6c47266f996" + "versions.yml:md5,72414085057fedf473d874c39db9b4c1" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-10-11T07:47:10.485269156" + "timestamp": "2025-01-14T15:13:11.49442341" }, "vcf.gz - stub": { "content": [ @@ -77,7 +77,7 @@ ] ], "1": [ - "versions.yml:md5,3378d1cbd4b3ba7579dcd6c47266f996" + "versions.yml:md5,72414085057fedf473d874c39db9b4c1" ], "report": [ [ @@ -88,15 +88,15 @@ ] ], "versions": [ - "versions.yml:md5,3378d1cbd4b3ba7579dcd6c47266f996" + "versions.yml:md5,72414085057fedf473d874c39db9b4c1" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-10-14T08:34:50.411910578" + "timestamp": "2025-01-14T15:13:59.468946068" }, "vcf.gz": { "content": [ @@ -110,7 +110,7 @@ ] ], "1": [ - "versions.yml:md5,3378d1cbd4b3ba7579dcd6c47266f996" + "versions.yml:md5,72414085057fedf473d874c39db9b4c1" ], "report": [ [ @@ -121,15 +121,15 @@ ] ], "versions": [ - "versions.yml:md5,3378d1cbd4b3ba7579dcd6c47266f996" + "versions.yml:md5,72414085057fedf473d874c39db9b4c1" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-10-11T07:47:00.438649988" + "timestamp": "2025-01-14T15:12:52.602536212" }, "vcf": { "content": [ @@ -143,7 +143,7 @@ ] ], "1": [ - "versions.yml:md5,3378d1cbd4b3ba7579dcd6c47266f996" + "versions.yml:md5,72414085057fedf473d874c39db9b4c1" ], "report": [ [ @@ -154,15 +154,15 @@ ] ], "versions": [ - "versions.yml:md5,3378d1cbd4b3ba7579dcd6c47266f996" + "versions.yml:md5,72414085057fedf473d874c39db9b4c1" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-10-11T07:44:07.427456921" + "timestamp": "2025-01-14T15:12:35.527450489" }, "bcf - stub": { "content": [ @@ -176,7 +176,7 @@ ] ], "1": [ - "versions.yml:md5,3378d1cbd4b3ba7579dcd6c47266f996" + "versions.yml:md5,72414085057fedf473d874c39db9b4c1" ], "report": [ [ @@ -187,15 +187,15 @@ ] ], "versions": [ - "versions.yml:md5,3378d1cbd4b3ba7579dcd6c47266f996" + "versions.yml:md5,72414085057fedf473d874c39db9b4c1" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-10-14T08:35:03.341417618" + "timestamp": "2025-01-14T15:14:13.064758768" }, "bcf.gz - stub": { "content": [ @@ -209,7 +209,7 @@ ] ], "1": [ - "versions.yml:md5,3378d1cbd4b3ba7579dcd6c47266f996" + "versions.yml:md5,72414085057fedf473d874c39db9b4c1" ], "report": [ [ @@ -220,15 +220,15 @@ ] ], "versions": [ - "versions.yml:md5,3378d1cbd4b3ba7579dcd6c47266f996" + "versions.yml:md5,72414085057fedf473d874c39db9b4c1" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-10-14T08:35:13.52398762" + "timestamp": "2025-01-14T15:14:26.7174912" }, "vcf - stub": { "content": [ @@ -242,7 +242,7 @@ ] ], "1": [ - "versions.yml:md5,3378d1cbd4b3ba7579dcd6c47266f996" + "versions.yml:md5,72414085057fedf473d874c39db9b4c1" ], "report": [ [ @@ -253,14 +253,14 @@ ] ], "versions": [ - "versions.yml:md5,3378d1cbd4b3ba7579dcd6c47266f996" + "versions.yml:md5,72414085057fedf473d874c39db9b4c1" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-10-14T08:34:35.977457571" + "timestamp": "2025-01-14T15:13:46.09138006" } } \ No newline at end of file diff --git a/modules/nf-core/immunedeconv/environment.yml b/modules/nf-core/immunedeconv/environment.yml new file mode 100644 index 00000000000..004fc39bed0 --- /dev/null +++ b/modules/nf-core/immunedeconv/environment.yml @@ -0,0 +1,5 @@ +channels: + - conda-forge + - bioconda +dependencies: + - bioconda::r-immunedeconv=2.1.2 diff --git a/modules/nf-core/immunedeconv/main.nf b/modules/nf-core/immunedeconv/main.nf new file mode 100644 index 00000000000..db0aa7b56a9 --- /dev/null +++ b/modules/nf-core/immunedeconv/main.nf @@ -0,0 +1,37 @@ +process IMMUNEDECONV { + tag "$meta.id" + label 'process_single' + + 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/22/22cb85f1b69ceff45b83e0fdb7b96d9ae29c8aafeaa0707d64cc4628982977ab/data' : + 'community.wave.seqera.io/library/r-immunedeconv:2.1.2--e1bb1ea1cf505cb3' }" + + input: + tuple val(meta), path(input_file), val(method), val(function) + val gene_symbol_col + + output: + tuple val(meta), path("*.deconvolution_results.tsv"), emit: deconv_table + tuple val(meta), path("*.png"), emit: deconv_plots, optional: true + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + template 'immunedeconv.R' + + stub: + prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.deconvolution_results.tsv + touch ${prefix}.plot1_stacked_bar_chart.png + touch ${prefix}.plot2_points_with_facets.png + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + r-immunedeconv: \$(Rscript -e "cat(as.character(packageVersion('immunedeconv')))") + END_VERSIONS + """ +} diff --git a/modules/nf-core/immunedeconv/meta.yml b/modules/nf-core/immunedeconv/meta.yml new file mode 100644 index 00000000000..4eea8be7bc5 --- /dev/null +++ b/modules/nf-core/immunedeconv/meta.yml @@ -0,0 +1,67 @@ +name: immunedeconv +description: Perform immune cell deconvolution using RNA-seq data and various computational methods. +keywords: + - Immune Deconvolution + - RNA-seq + - Bioinformatics Tools + - Computational Immunology +tools: + - immunedeconv: + description: | + The immunedeconv R package provides functions for immune cell deconvolution + from RNA-seq data. It supports multiple deconvolution methods and generates + results as well as visualizations. + homepage: https://github.com/icbi-lab/immunedeconv + documentation: https://icbi-lab.github.io/immunedeconv/ + licence: ["GPL-2"] +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - input_file: + type: file + description: Input matrix with genes in rows and samples in columns. + pattern: "*.tsv" + - method: + type: string + description: The deconvolution method to use (e.g., 'CIBERSORT', 'EPIC', 'xCell'). + - function: + type: string + description: The specific function from immunedeconv to execute for analysis. + - - gene_symbol_col: + type: string + description: Column name for gene symbols in the matrix input file. +output: + - deconv_table: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - "*.deconvolution_results.tsv": + type: file + description: Results table containing deconvolution data. + pattern: "*.deconvolution_results.tsv" + - deconv_plots: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - "*.png": + type: file + description: Visualization plots generated during deconvolution. + pattern: "*.png" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@grst" + - "@nschcolnicov" +maintainers: + - "@grst" + - "@nschcolnicov" diff --git a/modules/nf-core/immunedeconv/templates/immunedeconv.R b/modules/nf-core/immunedeconv/templates/immunedeconv.R new file mode 100644 index 00000000000..6f0c7bad1a3 --- /dev/null +++ b/modules/nf-core/immunedeconv/templates/immunedeconv.R @@ -0,0 +1,89 @@ +#!/usr/bin/env Rscript + +library(dplyr) +library(ggplot2) +library(tidyr) +library(immunedeconv) +library(tibble) +library(readr) + +#Load prefix +prefix = ifelse('$task.ext.prefix' == 'null', '$meta.id', '$task.ext.prefix') + +# Load the TSV file and keep only $gene_symbol_col column + counts +gene_expression_matrix <- readr::read_tsv('$input_file') %>% + as.data.frame() %>% + dplyr::select( + dplyr::all_of('$gene_symbol_col'), # Keep the '$gene_symbol_col' column + where(~ !is.character(.)) # Include all non-string columns + ) %>% + tibble::column_to_rownames('$gene_symbol_col') + +# Check if the data is log-transformed or TPM-transformed +# Check range of values +min_value <- min(gene_expression_matrix, na.rm = TRUE) +max_value <- max(gene_expression_matrix, na.rm = TRUE) + +# Detect log-transformed data (values typically within a compressed range) +if (max_value < 100 && min_value >= 0) { + warning("The data appears to be log-transformed. Please provide TPM-transformed data.") +} + +# Detect TPM-transformed data (column sums should be close to 1,000,000) +column_sums <- colSums(gene_expression_matrix, na.rm = TRUE) +if (!all(abs(column_sums - 1e6) < 1e4)) { + warning("The data does not appear to be properly TPM-transformed. Ensure the data is normalized.") +} + +# Generate results +result <- immunedeconv::${function}(gene_expression_matrix, method = '$method') + +# Save the result to a CSV file +readr::write_tsv(result, paste0(prefix,'.deconvolution_results.tsv')) + +# Plot and save results +# Plot 1: Stacked bar chart +plot1 <- result %>% + gather(sample, fraction, -cell_type) %>% + ggplot(aes(x = sample, y = fraction, fill = cell_type)) + + geom_bar(stat = 'identity') + + coord_flip() + + scale_fill_brewer(palette = 'Paired') + + scale_x_discrete(limits = rev(levels(result))) + +# Save Plot 1 +ggsave(paste0(prefix,'.plot1_stacked_bar_chart.png'), plot = plot1, dpi = 300, width = 10, height = 8) + +# Plot 2: Points with facets +plot2 <- result %>% + gather(sample, score, -cell_type) %>% + ggplot(aes(x = sample, y = score, color = cell_type)) + + geom_point(size = 4) + + facet_wrap(~cell_type, scales = 'free_x', ncol = 3) + + scale_color_brewer(palette = 'Paired', guide = FALSE) + + coord_flip() + + theme_bw() + + theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust = 1)) + +# Save Plot 2 +ggsave(paste0(prefix,'.plot2_points_with_facets.png'), plot = plot2, dpi = 300, width = 12, height = 10) + +################################################ +################################################ +## VERSIONS FILE ## +################################################ +################################################ + +immunedeconv_version <- as.character(packageVersion('immunedeconv')) + +writeLines( + c( + '"${task.process}":', + paste(' r-immunedeconv:', immunedeconv_version) + ), +'versions.yml') + +################################################ +################################################ +################################################ +################################################ \ No newline at end of file diff --git a/modules/nf-core/immunedeconv/tests/main.nf.test b/modules/nf-core/immunedeconv/tests/main.nf.test new file mode 100644 index 00000000000..683d1eff599 --- /dev/null +++ b/modules/nf-core/immunedeconv/tests/main.nf.test @@ -0,0 +1,107 @@ +nextflow_process { + + name "Test Process IMMUNEDECONV" + script "../main.nf" + process "IMMUNEDECONV" + tag "modules" + tag "modules_nfcore" + tag "immunedeconv" + + test("test_immunedeconv_bulkmat") { + + when { + process { + """ + input[0] = [ [id:"immunedeconv"], file(params.modules_testdata_base_path + 'genomics/mus_musculus/rnaseq_expression/bulk_mat.tsv', checkIfExists: true), "quantiseq", "deconvolute" ] + input[1] = "gene_symbol" + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + process.out.deconv_table, + process.out.deconv_plots[0][1].collect{ file(it).name }, //assert unstable file + process.out.versions + ).match() + } + ) + } + } + + test("test_immunedeconv_custom_data_mouse") { + + when { + process { + """ + input[0] = [ [id:"immunedeconv"], file(params.modules_testdata_base_path + 'genomics/mus_musculus/rnaseq_expression/bulk_mat_mouse.tsv', checkIfExists: true), "mmcp_counter", "deconvolute_mouse" ] + input[1] = "gene_symbol" + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + process.out.deconv_table, + process.out.deconv_plots[0][1].collect{ file(it).name }, //assert unstable file + process.out.versions + ).match() + } + ) + } + } + + test("test_immunedeconv_bulkmat_mouse") { + + when { + process { + """ + input[0] = [ [id:"immunedeconv"], file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/mus_musculus/rnaseq_expression/SRP254919.salmon.merged.gene_counts.top1000cov.tsv', checkIfExists: true), "mmcp_counter", "deconvolute_mouse" ] + input[1] = "gene_name" + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + process.out.deconv_table, + process.out.deconv_plots[0][1].collect{ file(it).name }, //assert unstable file + process.out.versions + ).match() + } + ) + } + } + + test("test_immunedeconv - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ [id:"immunedeconv"], file(params.modules_testdata_base_path + 'genomics/mus_musculus/rnaseq_expression/bulk_mat.tsv', checkIfExists: true), "quantiseq", "deconvolute" ] + input[1] = "gene_symbol" + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + process.out.deconv_table, + process.out.deconv_plots[0][1].collect{ file(it).name }, //assert unstable file + process.out.versions + ).match() + } + ) + } + } +} diff --git a/modules/nf-core/immunedeconv/tests/main.nf.test.snap b/modules/nf-core/immunedeconv/tests/main.nf.test.snap new file mode 100644 index 00000000000..626161afb11 --- /dev/null +++ b/modules/nf-core/immunedeconv/tests/main.nf.test.snap @@ -0,0 +1,98 @@ +{ + "test_immunedeconv_bulkmat": { + "content": [ + [ + [ + { + "id": "immunedeconv" + }, + "immunedeconv.deconvolution_results.tsv:md5,7ea22a01f198957cbe8dae92015583ff" + ] + ], + [ + "immunedeconv.plot1_stacked_bar_chart.png", + "immunedeconv.plot2_points_with_facets.png" + ], + [ + "versions.yml:md5,e155e29c7a7b3ba2ef8e3ed4c495b929" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.3" + }, + "timestamp": "2025-01-15T17:53:32.201416758" + }, + "test_immunedeconv_bulkmat_mouse": { + "content": [ + [ + [ + { + "id": "immunedeconv" + }, + "immunedeconv.deconvolution_results.tsv:md5,3d7ed4550a0da2f63fcfd2e74605e7a3" + ] + ], + [ + "immunedeconv.plot1_stacked_bar_chart.png", + "immunedeconv.plot2_points_with_facets.png" + ], + [ + "versions.yml:md5,e155e29c7a7b3ba2ef8e3ed4c495b929" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.3" + }, + "timestamp": "2025-01-15T17:54:01.300160943" + }, + "test_immunedeconv - stub": { + "content": [ + [ + [ + { + "id": "immunedeconv" + }, + "immunedeconv.deconvolution_results.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + [ + "immunedeconv.plot1_stacked_bar_chart.png", + "immunedeconv.plot2_points_with_facets.png" + ], + [ + "versions.yml:md5,e155e29c7a7b3ba2ef8e3ed4c495b929" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.3" + }, + "timestamp": "2025-01-15T17:54:09.796182653" + }, + "test_immunedeconv_custom_data_mouse": { + "content": [ + [ + [ + { + "id": "immunedeconv" + }, + "immunedeconv.deconvolution_results.tsv:md5,5c69779bac914a28737eb40460807bec" + ] + ], + [ + "immunedeconv.plot1_stacked_bar_chart.png", + "immunedeconv.plot2_points_with_facets.png" + ], + [ + "versions.yml:md5,e155e29c7a7b3ba2ef8e3ed4c495b929" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.3" + }, + "timestamp": "2025-01-15T17:53:46.364238594" + } +} \ No newline at end of file diff --git a/modules/nf-core/kaiju/mkfmi/main.nf b/modules/nf-core/kaiju/mkfmi/main.nf index d08be63bb5e..f82c2d75921 100644 --- a/modules/nf-core/kaiju/mkfmi/main.nf +++ b/modules/nf-core/kaiju/mkfmi/main.nf @@ -1,18 +1,21 @@ process KAIJU_MKFMI { - tag "$meta.id" + tag "${meta.id}" label 'process_high' conda "bioconda::kaiju=1.10.0" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/kaiju:1.10.0--h43eeafb_0': - 'biocontainers/kaiju:1.10.0--h43eeafb_0' }" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + ? 'https://depot.galaxyproject.org/singularity/kaiju:1.10.0--h43eeafb_0' + : 'biocontainers/kaiju:1.10.0--h43eeafb_0'}" input: tuple val(meta), path(fasta) + val keep_intermediate output: tuple val(meta), path("*.fmi"), emit: fmi - path "versions.yml" , emit: versions + tuple val(meta), path("*.bwt"), optional: true, emit: bwt + tuple val(meta), path("*.sa"), optional: true, emit: sa + path "versions.yml", emit: versions when: task.ext.when == null || task.ext.when @@ -20,14 +23,17 @@ process KAIJU_MKFMI { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def run_cleanup = keep_intermediate ? "" : "rm -f *.{bwt,sa}" """ kaiju-mkbwt \\ - $args \\ - -n $task.cpus \\ + ${args} \\ + -n ${task.cpus} \\ -o ${prefix} \\ ${fasta} kaiju-mkfmi ${prefix} + ${run_cleanup} + cat <<-END_VERSIONS > versions.yml "${task.process}": kaiju: \$(echo \$( kaiju -h 2>&1 | sed -n 1p | sed 's/^.*Kaiju //' )) @@ -37,8 +43,13 @@ process KAIJU_MKFMI { stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def run_cleanup = keep_intermediate ? "" : "rm -f *.{bwt,sa}" """ touch ${prefix}.fmi + touch ${prefix}.bwt + touch ${prefix}.sa + + ${run_cleanup} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/kaiju/mkfmi/meta.yml b/modules/nf-core/kaiju/mkfmi/meta.yml index 16532703735..cb3a5a0aeed 100644 --- a/modules/nf-core/kaiju/mkfmi/meta.yml +++ b/modules/nf-core/kaiju/mkfmi/meta.yml @@ -26,6 +26,10 @@ input: type: file description: Uncompressed Protein FASTA file (mandatory) pattern: "*.{fa,faa,fasta}" + - - keep_intermediate: + type: boolean + description: "Keep intermediate files" + pattern: true|false output: - fmi: - meta: @@ -37,6 +41,26 @@ output: type: file description: Kaiju FM-index file pattern: "*.{fmi}" + - bwt: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - "*.bwt": + type: file + description: Kaiju intermedite bwt-index file (not needed for classification) + pattern: "*.{bwt}" + - sa: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - "*.sa": + type: file + description: Kaiju intermedite bwt-index file (not needed for classification) + pattern: "*.{sa}" - versions: - versions.yml: type: file @@ -44,3 +68,4 @@ output: pattern: "versions.yml" authors: - "@alxndrdiaz" + - "@jfy133" diff --git a/modules/nf-core/kaiju/mkfmi/tests/main.nf.test b/modules/nf-core/kaiju/mkfmi/tests/main.nf.test index d8062b0b9f9..68170caeb40 100644 --- a/modules/nf-core/kaiju/mkfmi/tests/main.nf.test +++ b/modules/nf-core/kaiju/mkfmi/tests/main.nf.test @@ -18,6 +18,30 @@ nextflow_process { [ id:'test', single_end:true ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true) ] + input[1] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - proteome - keep intermediates") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true) + ] + input[1] = true """ } } @@ -42,6 +66,7 @@ nextflow_process { [ id:'test', single_end:true ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true) ] + input[1] = true """ } } diff --git a/modules/nf-core/kaiju/mkfmi/tests/main.nf.test.snap b/modules/nf-core/kaiju/mkfmi/tests/main.nf.test.snap index 9120a164e4f..8c0ae1b22f1 100644 --- a/modules/nf-core/kaiju/mkfmi/tests/main.nf.test.snap +++ b/modules/nf-core/kaiju/mkfmi/tests/main.nf.test.snap @@ -3,6 +3,10 @@ "content": [ "test.fmi" ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, "timestamp": "2024-01-20T16:27:00.670884904" }, "sarscov2 - proteome - fasta": { @@ -18,7 +22,16 @@ ] ], "1": [ + + ], + "2": [ + + ], + "3": [ "versions.yml:md5,3cbd427d0187ffee188347830d33dc12" + ], + "bwt": [ + ], "fmi": [ [ @@ -29,11 +42,89 @@ "test.fmi:md5,54fd89f5e4eab61af30175e8aa389598" ] ], + "sa": [ + + ], + "versions": [ + "versions.yml:md5,3cbd427d0187ffee188347830d33dc12" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2025-01-16T09:29:43.118144301" + }, + "sarscov2 - proteome - keep intermediates": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fmi:md5,54fd89f5e4eab61af30175e8aa389598" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bwt:md5,fe639339371f5b4352017522f54d0c99" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.sa:md5,7d4a6481ad5ffdc2058bb35331a64d4d" + ] + ], + "3": [ + "versions.yml:md5,3cbd427d0187ffee188347830d33dc12" + ], + "bwt": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bwt:md5,fe639339371f5b4352017522f54d0c99" + ] + ], + "fmi": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fmi:md5,54fd89f5e4eab61af30175e8aa389598" + ] + ], + "sa": [ + [ + { + "id": "test", + "single_end": true + }, + "test.sa:md5,7d4a6481ad5ffdc2058bb35331a64d4d" + ] + ], "versions": [ "versions.yml:md5,3cbd427d0187ffee188347830d33dc12" ] } ], - "timestamp": "2024-01-20T16:26:48.062489887" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2025-01-16T09:29:47.890853152" } } \ No newline at end of file diff --git a/modules/nf-core/krakenuniq/build/main.nf b/modules/nf-core/krakenuniq/build/main.nf index b9a5991a8b2..07c06bebfbe 100644 --- a/modules/nf-core/krakenuniq/build/main.nf +++ b/modules/nf-core/krakenuniq/build/main.nf @@ -1,18 +1,19 @@ process KRAKENUNIQ_BUILD { - tag "$meta.id" + tag "${meta.id}" label 'process_medium' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/krakenuniq:1.0.4--pl5321h6dccd9a_2': - 'biocontainers/krakenuniq:1.0.4--pl5321h6dccd9a_2' }" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + ? 'https://depot.galaxyproject.org/singularity/krakenuniq:1.0.4--pl5321h6dccd9a_2' + : 'biocontainers/krakenuniq:1.0.4--pl5321h6dccd9a_2'}" input: tuple val(meta), path(custom_library_dir, stageAs: "library/*"), path(custom_taxonomy_dir, stageAs: "taxonomy"), path(custom_seqid2taxid) + val keep_intermediate output: - tuple val(meta), path("$prefix/"), emit: db - path "versions.yml" , emit: versions + tuple val(meta), path("${prefix}/"), emit: db + path "versions.yml", emit: versions when: task.ext.when == null || task.ext.when @@ -20,15 +21,38 @@ process KRAKENUNIQ_BUILD { script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" - custom_db = custom_library_dir ? "mkdir $prefix && mv library taxonomy $custom_seqid2taxid $prefix" : "" + custom_db = custom_library_dir ? "mkdir ${prefix} && mv library taxonomy ${custom_seqid2taxid} ${prefix}" : "" + run_cleanup = keep_intermediate ? "" : "find -L ${prefix} -type f -not -name \"*.kdb\" -type f -not -name \"*idx\" -not -name \"taxDB\" -delete" + """ - $custom_db + ${custom_db} krakenuniq-build \\ - $args \\ + ${args} \\ --threads ${task.cpus} \\ --db ${prefix} + ${run_cleanup} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + krakenuniq: \$(echo \$(krakenuniq --version 2>&1) | sed 's/^.*KrakenUniq version //; s/ .*\$//') + END_VERSIONS + """ + + stub: + prefix = task.ext.prefix ?: "${meta.id}" + run_cleanup = keep_intermediate ? "" : "find -L ${prefix} -type f -not -name \"*.kdb\" -type f -not -name \"*idx\" -not -name \"taxDB\" -delete" + """ + mkdir ${prefix}/ + touch ${prefix}/database-build.log + touch ${prefix}/database.idx + touch ${prefix}/database.jdb + touch ${prefix}/database.kdb + touch ${prefix}/database.kdb.counts + touch ${prefix}/database.kraken.tsv + touch ${prefix}/database.report.tsv + cat <<-END_VERSIONS > versions.yml "${task.process}": krakenuniq: \$(echo \$(krakenuniq --version 2>&1) | sed 's/^.*KrakenUniq version //; s/ .*\$//') diff --git a/modules/nf-core/krakenuniq/build/meta.yml b/modules/nf-core/krakenuniq/build/meta.yml index bafc3cfa04e..0322cb68ec1 100644 --- a/modules/nf-core/krakenuniq/build/meta.yml +++ b/modules/nf-core/krakenuniq/build/meta.yml @@ -34,6 +34,11 @@ input: - custom_seqid2taxid: type: file description: custom seqid2taxid + - - keep_intermediate: + type: boolean + description: "Keep intermediate files" + pattern: true|false + output: - db: - meta: @@ -41,7 +46,7 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - $prefix/: + - ${prefix}/: type: directory description: Directory containing KrakenUniq database pattern: "*/" diff --git a/modules/nf-core/krakenuniq/build/tests/main.nf.test b/modules/nf-core/krakenuniq/build/tests/main.nf.test new file mode 100644 index 00000000000..c4e77e29846 --- /dev/null +++ b/modules/nf-core/krakenuniq/build/tests/main.nf.test @@ -0,0 +1,126 @@ +nextflow_process { + + name "Test Process KRAKENUNIQ_BUILD" + script "../main.nf" + process "KRAKENUNIQ_BUILD" + config './nextflow.config' + + tag "modules" + tag "modules_nfcore" + tag "krakenuniq" + tag "krakenuniq/build" + tag "krakenuniq/download" + + setup { + run("KRAKENUNIQ_DOWNLOAD"){ + script "../../download/main.nf" + process { + """ + input[0] = 'taxonomy' + """ + } + } + } + + test("sarscov2 - fasta") { + + when { + process { + """ + ch_fastas = Channel.fromPath(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ch_seqid2mapid = Channel.fromPath(params.modules_testdata_base_path + 'genomics/sarscov2/metagenome/seqid2taxid.map', checkIfExists: true) + + ch_input = ch_fastas + .combine(KRAKENUNIQ_DOWNLOAD.out.output) + .combine(ch_seqid2mapid) + .map { + fna, tax, map -> + + [ [id:'test'] , fna, tax, map ] + } + + input[0] = ch_input + input[1] = false + """ + } + } + + then { + def stablefiles = [] + file(process.out.db.get(0).get(1)).eachFileRecurse{ file -> if (!file.isDirectory() && !["database-build.log", "database.report.tsv", "timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"].find {file.toString().endsWith(it)}) {stablefiles.add(file)} } + def unstablefiles = [] + file(process.out.db.get(0).get(1)).eachFileRecurse{ file -> if (["database-build.log", "database.report.tsv", "timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"].find {file.toString().endsWith(it)}) {unstablefiles.add(file.getName().toString())} } + assertAll( + { assert process.success }, + { assert snapshot( + stablefiles.sort(), + unstablefiles.sort(), + process.out.versions + ).match() + } + ) + } + + } + +test("sarscov2 - fasta - nocleanup") { + + when { + process { + """ + ch_fastas = Channel.fromPath(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ch_seqid2mapid = Channel.fromPath(params.modules_testdata_base_path + 'genomics/sarscov2/metagenome/seqid2taxid.map', checkIfExists: true) + + ch_input = ch_fastas + .combine(KRAKENUNIQ_DOWNLOAD.out.output) + .combine(ch_seqid2mapid) + .map { + fna, tax, map -> + + [ [id:'test'] , fna, tax, map ] + } + + input[0] = ch_input + input[1] = true + """ + } + } + + then { + def stablefiles = [] + file(process.out.db.get(0).get(1)).eachFileRecurse{ file -> if (!file.isDirectory() && !["database-build.log", "database.report.tsv", "timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"].find {file.toString().endsWith(it)}) {stablefiles.add(file)} } + def unstablefiles = [] + file(process.out.db.get(0).get(1)).eachFileRecurse{ file -> if (["database-build.log", "database.report.tsv", "timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"].find {file.toString().endsWith(it)}) {unstablefiles.add(file.getName().toString())} } + assertAll( + { assert process.success }, + { assert snapshot( + stablefiles.sort(), + unstablefiles.sort(), + process.out.versions + ).match() + } + ) + } + + } + + test("sarscov2 - fasta - stub") { + options "-stub" + + when { + process { + """ + input[0] = [[id:'test'], [] , [] , []] + input[1] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } +} diff --git a/modules/nf-core/krakenuniq/build/tests/main.nf.test.snap b/modules/nf-core/krakenuniq/build/tests/main.nf.test.snap new file mode 100644 index 00000000000..fb3f1327e16 --- /dev/null +++ b/modules/nf-core/krakenuniq/build/tests/main.nf.test.snap @@ -0,0 +1,104 @@ +{ + "sarscov2 - fasta - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "database-build.log:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.idx:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.jdb:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.kdb:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.kdb.counts:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.kraken.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.report.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + "versions.yml:md5,b7fb6c70957b2e6b6b810757928d0325" + ], + "db": [ + [ + { + "id": "test" + }, + [ + "database-build.log:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.idx:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.jdb:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.kdb:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.kdb.counts:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.kraken.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.report.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions": [ + "versions.yml:md5,b7fb6c70957b2e6b6b810757928d0325" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.3" + }, + "timestamp": "2025-01-16T14:19:28.193479362" + }, + "sarscov2 - fasta - nocleanup": { + "content": [ + [ + "database.idx:md5,f5298aa4215c956d2f737b5988721a24", + "database.jdb:md5,48db5f6bb9b9e9db7f5bbdd0d8bec4a8", + "database.kdb:md5,46542be19979e867075f9e455a314e00", + "database.kdb.counts:md5,a82149480a435210ec1e870f06b6cdb3", + "database.kraken.tsv:md5,be9bd0cb3a8bea30989e65aa42a73727", + "database0.kdb:md5,46542be19979e867075f9e455a314e00", + "library-files.txt:md5,8a9817d2de8465eb436aa3aa8696a717", + "genome.fasta:md5,6e9fe4042a72f2345f644f239272b7e6", + "seqid2taxid.map:md5,fe738f2333d57dde0db32239c04a93b8", + "taxDB:md5,37ea954363803b13c2c9f6ae36fc81c7" + ], + [ + "database-build.log", + "database.report.tsv", + "names.dmp", + "nodes.dmp", + "taxdump.tar.gz", + "timestamp" + ], + [ + "versions.yml:md5,b7fb6c70957b2e6b6b810757928d0325" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2025-01-17T08:29:04.791324194" + }, + "sarscov2 - fasta": { + "content": [ + [ + "database.idx:md5,f5298aa4215c956d2f737b5988721a24", + "database.kdb:md5,46542be19979e867075f9e455a314e00", + "database0.kdb:md5,46542be19979e867075f9e455a314e00", + "taxDB:md5,37ea954363803b13c2c9f6ae36fc81c7" + ], + [ + + ], + [ + "versions.yml:md5,b7fb6c70957b2e6b6b810757928d0325" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2025-01-17T08:28:18.051752599" + } +} \ No newline at end of file diff --git a/modules/nf-core/krakenuniq/build/tests/nextflow.config b/modules/nf-core/krakenuniq/build/tests/nextflow.config new file mode 100644 index 00000000000..11e267e03c6 --- /dev/null +++ b/modules/nf-core/krakenuniq/build/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: KRAKENUNIQ_BUILD { + ext.args = "--work-on-disk --max-db-size 12 --kmer-len 15 --minimizer-len 13 --jellyfish-bin \"\$(which jellyfish)\"" + } +} diff --git a/modules/nf-core/krakenuniq/download/main.nf b/modules/nf-core/krakenuniq/download/main.nf index 8ef3eff2b90..abfa89961f4 100644 --- a/modules/nf-core/krakenuniq/download/main.nf +++ b/modules/nf-core/krakenuniq/download/main.nf @@ -2,16 +2,16 @@ process KRAKENUNIQ_DOWNLOAD { label 'process_low' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/krakenuniq:1.0.4--pl5321h6dccd9a_2': - 'biocontainers/krakenuniq:1.0.4--pl5321h6dccd9a_2' }" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + ? 'https://depot.galaxyproject.org/singularity/krakenuniq:1.0.4--pl5321h6dccd9a_2' + : 'biocontainers/krakenuniq:1.0.4--pl5321h6dccd9a_2'}" input: val pattern output: - path "${pattern}/" , emit: output - path "versions.yml" , emit: versions + path "${pattern}/", emit: output + path "versions.yml", emit: versions when: task.ext.when == null || task.ext.when @@ -23,7 +23,18 @@ process KRAKENUNIQ_DOWNLOAD { --threads ${task.cpus} \\ -o ${pattern}/ \\ ${pattern} \\ - $args + ${args} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + krakenuniq: \$(echo \$(krakenuniq --version 2>&1) | sed 's/^.*KrakenUniq version //; s/ .*\$//') + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + """ + mkdir ${pattern} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/krakenuniq/download/tests/main.nf.test b/modules/nf-core/krakenuniq/download/tests/main.nf.test new file mode 100644 index 00000000000..edef7bfea3b --- /dev/null +++ b/modules/nf-core/krakenuniq/download/tests/main.nf.test @@ -0,0 +1,65 @@ +nextflow_process { + + name "Test Process KRAKENUNIQ_DOWNLOAD" + script "../main.nf" + process "KRAKENUNIQ_DOWNLOAD" + + tag "modules" + tag "modules_nfcore" + tag "krakenuniq" + tag "krakenuniq/download" + tag "debug" + + test("taxonomy") { + + when { + process { + """ + input[0] = 'taxonomy' + """ + } + } + + then { + println('HHELLLOOOOO') + def stablefiles = [] + file(process.out.output.get(0)).eachFileRecurse{ file -> if (!file.isDirectory() && !["timestamp"].find {file.toString().endsWith(it)}) {stablefiles.add(file)} } + println(stablefiles) + def unstablefiles = [] + file(process.out.output.get(0)).eachFileRecurse{ file -> if (["timestamp"].find {file.toString().endsWith(it)}) {unstablefiles.add(file.getName().toString())} } + println(unstablefiles) + assertAll( + { assert process.success }, + { assert snapshot( + stablefiles.sort(), + unstablefiles.sort(), + process.out.versions + ).match() + } + ) + } + + } + + test("taxonomy - stub") { + + options "-stub" + + when { + process { + """ + input[0] = 'taxonomy' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/krakenuniq/download/tests/main.nf.test.snap b/modules/nf-core/krakenuniq/download/tests/main.nf.test.snap new file mode 100644 index 00000000000..bdea7d86ea6 --- /dev/null +++ b/modules/nf-core/krakenuniq/download/tests/main.nf.test.snap @@ -0,0 +1,49 @@ +{ + "taxonomy - stub": { + "content": [ + { + "0": [ + [ + + ] + ], + "1": [ + "versions.yml:md5,a12e821f0d977f77c0c905a89c708d09" + ], + "output": [ + [ + + ] + ], + "versions": [ + "versions.yml:md5,a12e821f0d977f77c0c905a89c708d09" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2025-01-17T08:39:20.362801897" + }, + "taxonomy": { + "content": [ + [ + "names.dmp:md5,aae05a99d67ea8a593f8642b40e98f28", + "nodes.dmp:md5,73f515a0c4be7a324a6717bbe14cd274", + "taxdump.tar.gz:md5,4ec3d4430ef2d350db5b3284edd33a8b" + ], + [ + "timestamp" + ], + [ + "versions.yml:md5,a12e821f0d977f77c0c905a89c708d09" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2025-01-17T09:01:52.533204202" + } +} \ No newline at end of file diff --git a/modules/nf-core/mmseqs/cluster/main.nf b/modules/nf-core/mmseqs/cluster/main.nf index bad704cbbe2..b7fa6c4d2cf 100644 --- a/modules/nf-core/mmseqs/cluster/main.nf +++ b/modules/nf-core/mmseqs/cluster/main.nf @@ -34,8 +34,7 @@ process MMSEQS_CLUSTER { ${prefix}/${prefix} \\ tmp1 \\ $args \\ - --threads ${task.cpus} \\ - --compressed 1 + --threads ${task.cpus} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/mmseqs/cluster/tests/main.nf.test.snap b/modules/nf-core/mmseqs/cluster/tests/main.nf.test.snap index 6fc98698513..f61bc9f3070 100644 --- a/modules/nf-core/mmseqs/cluster/tests/main.nf.test.snap +++ b/modules/nf-core/mmseqs/cluster/tests/main.nf.test.snap @@ -8,8 +8,8 @@ "test_output_cluster.index" ], [ - "test_output_cluster.dbtype:md5,5c879eb8a8613fd4537b919e7d68d089", - "test_output_cluster.index:md5,ca7e1f0967222b06d7e05e47bcbe1e50" + "test_output_cluster.dbtype:md5,b9d9c6dbc098c97ae446f612efd8eafd", + "test_output_cluster.index:md5,9848b52b6df827d80a04f7c71c50056b" ], "versions.yml:md5,4acad55952c6d1fb41ad7f5a44468aed" ], @@ -17,6 +17,6 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-05T10:44:45.713270981" + "timestamp": "2024-12-15T19:30:14.704271821" } } \ No newline at end of file diff --git a/modules/nf-core/mmseqs/createdb/main.nf b/modules/nf-core/mmseqs/createdb/main.nf index b1d6caf0b06..ef11306895b 100644 --- a/modules/nf-core/mmseqs/createdb/main.nf +++ b/modules/nf-core/mmseqs/createdb/main.nf @@ -33,8 +33,7 @@ process MMSEQS_CREATEDB { createdb \\ ${sequence_name} \\ ${prefix}/${prefix} \\ - $args \\ - --compressed 1 + $args cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/mmseqs/createdb/tests/main.nf.test.snap b/modules/nf-core/mmseqs/createdb/tests/main.nf.test.snap index 92f1e6d8257..ececa7a4dd5 100644 --- a/modules/nf-core/mmseqs/createdb/tests/main.nf.test.snap +++ b/modules/nf-core/mmseqs/createdb/tests/main.nf.test.snap @@ -8,14 +8,14 @@ "single_end": false }, [ - "test:md5,7c3c2c5926cf8fa82e66b9628f680256", - "test.dbtype:md5,c8ed20c23ba91f4577f84c940c86c7db", - "test.index:md5,5b2fd8abd0ad3fee24738af7082e6a6e", + "test:md5,a2cda8768736a7a317a09d61556194bd", + "test.dbtype:md5,4352d88a78aa39750bf70cd6f27bcaa5", + "test.index:md5,4ba298b011e2472ce9f6b99fe6b6e3d5", "test.lookup:md5,32f88756dbcb6aaf7b239b0d61730f1b", "test.source:md5,9ada5b3ea6e1a7e16c4418eb98ae8d9d", - "test_h:md5,8c29f5ed94d83d7115e9c8a883ce358d", - "test_h.dbtype:md5,8895d3d8e9322aedbf45249dfb3ddb0a", - "test_h.index:md5,87c7c8c6d16018ebfaa6f408391a5ae2" + "test_h:md5,21c399702a071bdeecce09f9d1df4531", + "test_h.dbtype:md5,740bab4f9ec8808aedb68d6b1281aeb2", + "test_h.index:md5,d767fb43b37c0a644c676b00f9f93477" ] ] ], @@ -27,7 +27,7 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-05T10:35:27.322864475" + "timestamp": "2024-12-15T19:30:25.339409238" }, "Should build an mmseqs db from a zipped amino acid sequence file": { "content": [ @@ -37,14 +37,14 @@ "id": "test" }, [ - "test:md5,4b494965ed7ab67da8ca3f39523eb104", - "test.dbtype:md5,152afd7bf4dbe26f85032eee0269201a", - "test.index:md5,46f9d884e9a7f442fe1cd2ce339734e3", + "test:md5,1162504bc65aacf734abdcb0cdbe87de", + "test.dbtype:md5,f1d3ff8443297732862df21dc4e57262", + "test.index:md5,8cdcbc06c2b99fdb09f3d1735a76def9", "test.lookup:md5,3e27cb93d9ee875ad42a6f32f5651bdc", "test.source:md5,eaa64fc8a5f7ec1ee49b0dcbd1a72e9d", - "test_h:md5,6e798b81c70d191f78939c2dd6223a7f", - "test_h.dbtype:md5,8895d3d8e9322aedbf45249dfb3ddb0a", - "test_h.index:md5,d5ac49ff56df064b980fa0eb5da57673" + "test_h:md5,f258f8cc04f83c270a75e8b00a6d2d89", + "test_h.dbtype:md5,740bab4f9ec8808aedb68d6b1281aeb2", + "test_h.index:md5,844bf1950bcd37284fdc5d7117ee4241" ] ] ], @@ -56,6 +56,6 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-05T10:35:33.418552595" + "timestamp": "2024-12-15T19:30:34.93361715" } } \ No newline at end of file diff --git a/modules/nf-core/mmseqs/createindex/main.nf b/modules/nf-core/mmseqs/createindex/main.nf index 4e9c82a3499..ea6866fca41 100644 --- a/modules/nf-core/mmseqs/createindex/main.nf +++ b/modules/nf-core/mmseqs/createindex/main.nf @@ -3,16 +3,16 @@ process MMSEQS_CREATEINDEX { label 'process_high' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mmseqs2:15.6f452--pl5321h6a68c12_0': - 'biocontainers/mmseqs2:15.6f452--pl5321h6a68c12_0' }" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + ? 'https://depot.galaxyproject.org/singularity/mmseqs2:15.6f452--pl5321h6a68c12_0' + : 'biocontainers/mmseqs2:15.6f452--pl5321h6a68c12_0'}" input: tuple val(meta), path(db) output: - tuple val(meta), path(db) , emit: db_indexed - path "versions.yml" , emit: versions + tuple val(meta), path(db), emit: db_indexed + path "versions.yml", emit: versions when: task.ext.when == null || task.ext.when @@ -23,15 +23,14 @@ process MMSEQS_CREATEINDEX { def prefix = task.ext.prefix ?: "${meta.id}" """ - DB_INPUT_PATH_NAME=\$(find -L "$db/" -maxdepth 1 -name "$args2" | sed 's/\\.[^.]*\$//' | sed -e 'N;s/^\\(.*\\).*\\n\\1.*\$/\\1\\n\\1/;D' ) + DB_INPUT_PATH_NAME=\$(find -L "${db}/" -maxdepth 1 -name "${args2}" | sed 's/\\.[^.]*\$//' | sed -e 'N;s/^\\(.*\\).*\\n\\1.*\$/\\1\\n\\1/;D' ) mmseqs \\ createindex \\ \${DB_INPUT_PATH_NAME} \\ tmp1 \\ - $args \\ - --threads ${task.cpus} \\ - --compressed 1 + ${args} \\ + --threads ${task.cpus} cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -40,8 +39,9 @@ process MMSEQS_CREATEINDEX { """ stub: + def args2 = task.ext.args2 ?: "*.dbtype" """ - DB_INPUT_PATH_NAME=\$(find -L "$db/" -maxdepth 1 -name "$args2" | sed 's/\\.[^.]*\$//' | sed -e 'N;s/^\\(.*\\).*\\n\\1.*\$/\\1\\n\\1/;D' ) + DB_INPUT_PATH_NAME=\$(find -L "${db}/" -maxdepth 1 -name "${args2}" | sed 's/\\.[^.]*\$//' | sed -e 'N;s/^\\(.*\\).*\\n\\1.*\$/\\1\\n\\1/;D' ) touch "\${DB_PATH_NAME}.idx" diff --git a/modules/nf-core/mmseqs/createtsv/main.nf b/modules/nf-core/mmseqs/createtsv/main.nf index d5afc0694ae..b41b5c54a65 100644 --- a/modules/nf-core/mmseqs/createtsv/main.nf +++ b/modules/nf-core/mmseqs/createtsv/main.nf @@ -22,9 +22,9 @@ process MMSEQS_CREATETSV { script: def args = task.ext.args ?: '' - def args2 = task.ext.args ?: "*.dbtype" // database generated by mmyseqs cluster | search | taxonomy | ... - def args3 = task.ext.args ?: "*.dbtype" // database generated by mmyseqs/createdb - def args4 = task.ext.args ?: "*.dbtype" // database generated by mmyseqs/createdb + def args2 = task.ext.args2 ?: "*.dbtype" // database generated by mmyseqs cluster | search | taxonomy | ... + def args3 = task.ext.args3 ?: "*.dbtype" // database generated by mmyseqs/createdb + def args4 = task.ext.args4 ?: "*.dbtype" // database generated by mmyseqs/createdb def prefix = task.ext.prefix ?: "${meta.id}" """ @@ -40,8 +40,7 @@ process MMSEQS_CREATETSV { \$DB_RESULT_PATH_NAME \\ ${prefix}.tsv \\ $args \\ - --threads ${task.cpus} \\ - --compressed 1 + --threads ${task.cpus} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/mmseqs/createtsv/tests/main.nf.test.snap b/modules/nf-core/mmseqs/createtsv/tests/main.nf.test.snap index 6192fa16a83..ad31aa06b6e 100644 --- a/modules/nf-core/mmseqs/createtsv/tests/main.nf.test.snap +++ b/modules/nf-core/mmseqs/createtsv/tests/main.nf.test.snap @@ -113,7 +113,7 @@ "id": "test_result", "single_end": true }, - "test_result.tsv:md5,4e7ba50ce2879660dc6595286bf0d097" + "test_result.tsv:md5,c81449fb936b76aad6f925b965e84bc5" ] ], "1": [ @@ -125,7 +125,7 @@ "id": "test_result", "single_end": true }, - "test_result.tsv:md5,4e7ba50ce2879660dc6595286bf0d097" + "test_result.tsv:md5,c81449fb936b76aad6f925b965e84bc5" ] ], "versions": [ @@ -135,8 +135,8 @@ ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nextflow": "24.10.3" }, - "timestamp": "2024-12-05T10:50:42.432284995" + "timestamp": "2025-01-15T11:17:04.119521629" } } \ No newline at end of file diff --git a/modules/nf-core/mmseqs/databases/main.nf b/modules/nf-core/mmseqs/databases/main.nf index 176d7b45d59..8f94eac5ffa 100644 --- a/modules/nf-core/mmseqs/databases/main.nf +++ b/modules/nf-core/mmseqs/databases/main.nf @@ -28,7 +28,6 @@ process MMSEQS_DATABASES { ${prefix}/database \\ tmp/ \\ --threads ${task.cpus} \\ - --compressed 1 \\ ${args} cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/mmseqs/easysearch/main.nf b/modules/nf-core/mmseqs/easysearch/main.nf index bdb50e759eb..41272a80793 100644 --- a/modules/nf-core/mmseqs/easysearch/main.nf +++ b/modules/nf-core/mmseqs/easysearch/main.nf @@ -1,20 +1,19 @@ - process MMSEQS_EASYSEARCH { - tag "$meta.id" + tag "${meta.id}" label 'process_high' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mmseqs2:15.6f452--pl5321h6a68c12_0': - 'biocontainers/mmseqs2:15.6f452--pl5321h6a68c12_0' }" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + ? 'https://depot.galaxyproject.org/singularity/mmseqs2:15.6f452--pl5321h6a68c12_0' + : 'biocontainers/mmseqs2:15.6f452--pl5321h6a68c12_0'}" input: - tuple val(meta) , path(fasta) + tuple val(meta), path(fasta) tuple val(meta2), path(db_target) output: tuple val(meta), path("${prefix}.tsv"), emit: tsv - path "versions.yml" , emit: versions + path "versions.yml", emit: versions when: task.ext.when == null || task.ext.when @@ -27,17 +26,16 @@ process MMSEQS_EASYSEARCH { mkdir -p ${prefix} # Extract files with specified args based suffix | remove suffix | isolate longest common substring of files - DB_TARGET_PATH_NAME=\$(find -L "$db_target/" -maxdepth 1 -name "$args2" | sed 's/\\.[^.]*\$//' | sed -e 'N;s/^\\(.*\\).*\\n\\1.*\$/\\1\\n\\1/;D' ) + DB_TARGET_PATH_NAME=\$(find -L "${db_target}/" -maxdepth 1 -name "${args2}" | sed 's/\\.[^.]*\$//' | sed -e 'N;s/^\\(.*\\).*\\n\\1.*\$/\\1\\n\\1/;D' ) mmseqs \\ easy-search \\ - $fasta \\ + ${fasta} \\ \$DB_TARGET_PATH_NAME \\ ${prefix}.tsv \\ tmp1 \\ - $args \\ - --threads ${task.cpus} \\ - --compressed 1 + ${args} \\ + --threads ${task.cpus} cat <<-END_VERSIONS > versions.yml @@ -47,6 +45,9 @@ process MMSEQS_EASYSEARCH { """ stub: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: "*.dbtype" + prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.tsv diff --git a/modules/nf-core/mmseqs/easysearch/meta.yml b/modules/nf-core/mmseqs/easysearch/meta.yml index bcfdde9b783..972fbe3f1b9 100644 --- a/modules/nf-core/mmseqs/easysearch/meta.yml +++ b/modules/nf-core/mmseqs/easysearch/meta.yml @@ -1,4 +1,3 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: "mmseqs_easysearch" description: Searches for the sequences of a fasta file in a database using MMseqs2 keywords: diff --git a/modules/nf-core/mmseqs/easysearch/tests/main.nf.test b/modules/nf-core/mmseqs/easysearch/tests/main.nf.test new file mode 100644 index 00000000000..f9894feab3b --- /dev/null +++ b/modules/nf-core/mmseqs/easysearch/tests/main.nf.test @@ -0,0 +1,68 @@ +nextflow_process { + + name "Test Process MMSEQS_EASYSEARCH" + script "../main.nf" + process "MMSEQS_EASYSEARCH" + config './nextflow.config' + + tag "modules" + tag "modules_nfcore" + tag "mmseqs" + tag "mmseqs/easysearch" + tag "mmseqs/createdb" + + setup { + + run("MMSEQS_CREATEDB") { + script "../../createdb/main.nf" + process { + """ + input[0] = [ [id: 'test_query', single_end: true], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) ] + """ + } + } + } + + test("sarscov2 - illumina - contigs - fasta") { + + when { + process { + """ + input[0] = [ [id: 'test_scaffolds', single_end: true], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/scaffolds.fasta', checkIfExists: true) ] + input[1] = MMSEQS_CREATEDB.out.db + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - illumina - contigs - fasta - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ [id: 'test_scaffolds', single_end: true], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/scaffolds.fasta', checkIfExists: true) ] + input[1] = MMSEQS_CREATEDB.out.db + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/mmseqs/easysearch/tests/main.nf.test.snap b/modules/nf-core/mmseqs/easysearch/tests/main.nf.test.snap new file mode 100644 index 00000000000..4e570427bf9 --- /dev/null +++ b/modules/nf-core/mmseqs/easysearch/tests/main.nf.test.snap @@ -0,0 +1,72 @@ +{ + "sarscov2 - illumina - contigs - fasta": { + "content": [ + { + "0": [ + [ + { + "id": "test_scaffolds", + "single_end": true + }, + "test_scaffolds.tsv:md5,98a6e138ad41ed04366808799fd6a4b8" + ] + ], + "1": [ + "versions.yml:md5,6e4d1e0d47fdc34c4ef32ad7b030cf70" + ], + "tsv": [ + [ + { + "id": "test_scaffolds", + "single_end": true + }, + "test_scaffolds.tsv:md5,98a6e138ad41ed04366808799fd6a4b8" + ] + ], + "versions": [ + "versions.yml:md5,6e4d1e0d47fdc34c4ef32ad7b030cf70" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2025-01-15T10:08:31.865068417" + }, + "sarscov2 - illumina - contigs - fasta - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test_scaffolds", + "single_end": true + }, + "test_scaffolds.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,bef949a977594a12d605c2d30198ab27" + ], + "tsv": [ + [ + { + "id": "test_scaffolds", + "single_end": true + }, + "test_scaffolds.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,bef949a977594a12d605c2d30198ab27" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2025-01-15T10:09:30.132833597" + } +} \ No newline at end of file diff --git a/modules/nf-core/mmseqs/easysearch/tests/nextflow.config b/modules/nf-core/mmseqs/easysearch/tests/nextflow.config new file mode 100644 index 00000000000..9700c7e4930 --- /dev/null +++ b/modules/nf-core/mmseqs/easysearch/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: MMSEQS_EASYSEARCH { + ext.args = '--remove-tmp-files 1 --search-type 2' + } +} diff --git a/modules/nf-core/mmseqs/linclust/main.nf b/modules/nf-core/mmseqs/linclust/main.nf index c5927985897..fb8663b98f1 100644 --- a/modules/nf-core/mmseqs/linclust/main.nf +++ b/modules/nf-core/mmseqs/linclust/main.nf @@ -34,8 +34,7 @@ process MMSEQS_LINCLUST { ${prefix}/${prefix} \\ tmp1 \\ $args \\ - --threads ${task.cpus} \\ - --compressed 1 + --threads ${task.cpus} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/mmseqs/linclust/tests/main.nf.test.snap b/modules/nf-core/mmseqs/linclust/tests/main.nf.test.snap index e1622d49d12..b5f555b847a 100644 --- a/modules/nf-core/mmseqs/linclust/tests/main.nf.test.snap +++ b/modules/nf-core/mmseqs/linclust/tests/main.nf.test.snap @@ -8,8 +8,8 @@ "test_output_cluster.index" ], [ - "test_output_cluster.dbtype:md5,5c879eb8a8613fd4537b919e7d68d089", - "test_output_cluster.index:md5,38908275cdd5727ae0eb9be017f9ca13" + "test_output_cluster.dbtype:md5,b9d9c6dbc098c97ae446f612efd8eafd", + "test_output_cluster.index:md5,a0b78f31aee2c327d72f32919814baf1" ], "versions.yml:md5,969cb26241f66ac758c104f9561860b1" ], @@ -17,6 +17,6 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-05T10:43:26.020522437" + "timestamp": "2024-12-15T19:38:00.258247122" } } \ No newline at end of file diff --git a/modules/nf-core/mmseqs/search/main.nf b/modules/nf-core/mmseqs/search/main.nf index 29844235ecb..e4ddc2d3d91 100644 --- a/modules/nf-core/mmseqs/search/main.nf +++ b/modules/nf-core/mmseqs/search/main.nf @@ -1,5 +1,5 @@ process MMSEQS_SEARCH { - tag "$meta.id" + tag "${meta.id}" label 'process_high' conda "${moduleDir}/environment.yml" @@ -24,13 +24,15 @@ process MMSEQS_SEARCH { def args3 = task.ext.args3 ?: "*.dbtype" prefix = task.ext.prefix ?: "${meta.id}" - if ("$db_query" == "${prefix}" || "$db_target" == "${prefix}" ) error "Input and output names of databases are the same, set prefix in module configuration to disambiguate!" + if ("${db_query}" == "${prefix}" || "${db_target}" == "${prefix}") { + error("Input and output names of databases are the same, set prefix in module configuration to disambiguate!") + } """ mkdir -p ${prefix} # Extract files with specified args based suffix | remove suffix | isolate longest common substring of files - DB_QUERY_PATH_NAME=\$(find -L "$db_query/" -maxdepth 1 -name "$args2" | sed 's/\\.[^.]*\$//' | sed -e 'N;s/^\\(.*\\).*\\n\\1.*\$/\\1\\n\\1/;D' ) - DB_TARGET_PATH_NAME=\$(find -L "$db_target/" -maxdepth 1 -name "$args3" | sed 's/\\.[^.]*\$//' | sed -e 'N;s/^\\(.*\\).*\\n\\1.*\$/\\1\\n\\1/;D' ) + DB_QUERY_PATH_NAME=\$(find -L "${db_query}/" -maxdepth 1 -name "${args2}" | sed 's/\\.[^.]*\$//' | sed -e 'N;s/^\\(.*\\).*\\n\\1.*\$/\\1\\n\\1/;D' ) + DB_TARGET_PATH_NAME=\$(find -L "${db_target}/" -maxdepth 1 -name "${args3}" | sed 's/\\.[^.]*\$//' | sed -e 'N;s/^\\(.*\\).*\\n\\1.*\$/\\1\\n\\1/;D' ) mmseqs \\ search \\ @@ -48,10 +50,11 @@ process MMSEQS_SEARCH { """ stub: + def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" if ("$db_query" == "${prefix}" || "$db_target" == "${prefix}" ) error "Input and output names of databases are the same, set prefix in module configuration to disambiguate!" """ - mkdir -p $prefix + mkdir -p ${prefix} touch ${prefix}/${prefix}.{0..9} touch ${prefix}/${prefix}.dbtype touch ${prefix}/${prefix}.index diff --git a/modules/nf-core/mmseqs/taxonomy/main.nf b/modules/nf-core/mmseqs/taxonomy/main.nf index 54849885691..396abd1f243 100644 --- a/modules/nf-core/mmseqs/taxonomy/main.nf +++ b/modules/nf-core/mmseqs/taxonomy/main.nf @@ -38,8 +38,7 @@ process MMSEQS_TAXONOMY { ${prefix}_taxonomy/${prefix} \\ tmp1 \\ $args \\ - --threads ${task.cpus} \\ - --compressed 1 + --threads ${task.cpus} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/mmseqs/tsv2exprofiledb/environment.yml b/modules/nf-core/mmseqs/tsv2exprofiledb/environment.yml index 18547591a2e..235ad03ad82 100644 --- a/modules/nf-core/mmseqs/tsv2exprofiledb/environment.yml +++ b/modules/nf-core/mmseqs/tsv2exprofiledb/environment.yml @@ -2,4 +2,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::mmseqs2=15.6f452 + - bioconda::mmseqs2=16.747c6 diff --git a/modules/nf-core/mmseqs/tsv2exprofiledb/main.nf b/modules/nf-core/mmseqs/tsv2exprofiledb/main.nf index d043cac4c6a..b64f00fad5f 100644 --- a/modules/nf-core/mmseqs/tsv2exprofiledb/main.nf +++ b/modules/nf-core/mmseqs/tsv2exprofiledb/main.nf @@ -1,31 +1,31 @@ process MMSEQS_TSV2EXPROFILEDB { - tag "$db" + tag "${database}" label 'process_high' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mmseqs2:14.7e284--pl5321hf1761c0_0': - 'biocontainers/mmseqs2:14.7e284--pl5321hf1761c0_0' }" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + ? 'https://depot.galaxyproject.org/singularity/mmseqs2:16.747c6--pl5321h6a68c12_0' + : 'biocontainers/mmseqs2:16.747c6--pl5321h6a68c12_0'}" input: - path db + path database output: - path (db) , emit: db_exprofile + path (database) , emit: db_exprofile path "versions.yml", emit: versions - // INDEX=`find -L ./ -name "*.amb" | sed 's/\\.amb\$//'` + when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' """ - DB_PATH_NAME=\$(find -L "$db/" -name "*_seq.tsv" | sed 's/_seq\\.tsv\$//') + DB_PATH_NAME=\$(find -L "${database}/" -name "*_seq.tsv" | sed 's/_seq\\.tsv\$//') mmseqs tsv2exprofiledb \\ \${DB_PATH_NAME} \\ "\${DB_PATH_NAME}_db" \\ - $args + ${args} cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -35,8 +35,7 @@ process MMSEQS_TSV2EXPROFILEDB { stub: """ - DB_PATH_NAME=\$(find -L "$db/" -name "*_seq.tsv" | sed 's/_seq\\.tsv\$//') - + DB_PATH_NAME=\$(find -L "${database}/" -name "*_seq.tsv" | sed 's/_seq\\.tsv\$//') touch "\${DB_PATH_NAME}_db" cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/mmseqs/tsv2exprofiledb/meta.yml b/modules/nf-core/mmseqs/tsv2exprofiledb/meta.yml index 4e8890addfa..284e16877e7 100644 --- a/modules/nf-core/mmseqs/tsv2exprofiledb/meta.yml +++ b/modules/nf-core/mmseqs/tsv2exprofiledb/meta.yml @@ -18,17 +18,17 @@ tools: licence: ["GPL v3"] identifier: biotools:mmseqs input: - - - db: + - - database: type: directory description: | - Directory containing the DB to be indexed + Directory containing the database to be indexed pattern: "*" output: - db_exprofile: - - db: + - database: type: directory description: | - Directory containing the expandable profile DB + Directory containing the expandable profile database pattern: "*" - versions: - versions.yml: @@ -40,3 +40,4 @@ authors: - "@JoseEspinosa" maintainers: - "@JoseEspinosa" + - "@sateeshperi" diff --git a/modules/nf-core/mmseqs/tsv2exprofiledb/tests/main.nf.test b/modules/nf-core/mmseqs/tsv2exprofiledb/tests/main.nf.test new file mode 100644 index 00000000000..04994caefa5 --- /dev/null +++ b/modules/nf-core/mmseqs/tsv2exprofiledb/tests/main.nf.test @@ -0,0 +1,75 @@ +nextflow_process { + + name "Test Process MMSEQS_TSV2EXPROFILEDB" + script "../main.nf" + process "MMSEQS_TSV2EXPROFILEDB" + config './nextflow.config' + + tag "modules" + tag "modules_nfcore" + tag "mmseqs" + tag "mmseqs/tsv2exprofiledb" + tag "untar" + + setup { + run("UNTAR") { + script "../../../untar" + process { + """ + input[0] = [ [:], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/db/mmseqs.tar.gz', checkIfExists: true) + ] + """ + } + } + } + + test("sarscov2 - db") { + + when { + process { + """ + input[0] = UNTAR.out.untar.map { meta, untar -> untar } + """ + } + } + + then { + // Many files are validly empty due to small test data, so just list names, and check a couple of expected files with contents + assertAll( + { assert process.success }, + { assert snapshot( + path(process.out.db_exprofile[0]).list().find { it.getFileName().toString() == "mmseqs.tsv" }, + path(process.out.db_exprofile[0]).list().find { it.getFileName().toString() == "mmseqs" }, + path(process.out.db_exprofile[0]).list().find { it.getFileName().toString() == "mmseqs_seq.index" }, + path(process.out.db_exprofile[0]).list().sort().collect { it.getFileName().toString() }, + process.out.versions + ).match() } + ) + } + } + + test("sarscov2 - db - stub") { + options "-stub" + + when { + process { + """ + input[0] = UNTAR.out.untar.map { meta, untar -> untar } + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + path(process.out.db_exprofile[0]).list().sort().collect { it.getFileName().toString() }, + process.out.versions + ).match() } + ) + } + + } + +} \ No newline at end of file diff --git a/modules/nf-core/mmseqs/tsv2exprofiledb/tests/main.nf.test.snap b/modules/nf-core/mmseqs/tsv2exprofiledb/tests/main.nf.test.snap new file mode 100644 index 00000000000..10de97a47ed --- /dev/null +++ b/modules/nf-core/mmseqs/tsv2exprofiledb/tests/main.nf.test.snap @@ -0,0 +1,149 @@ +{ + "sarscov2 - db - stub": { + "content": [ + [ + "mmseqs", + "mmseqs.dbtype", + "mmseqs.fasta", + "mmseqs.index", + "mmseqs.lookup", + "mmseqs.source", + "mmseqs.tsv", + "mmseqs_aln.0", + "mmseqs_aln.1", + "mmseqs_aln.2", + "mmseqs_aln.3", + "mmseqs_aln.4", + "mmseqs_aln.5", + "mmseqs_aln.6", + "mmseqs_aln.7", + "mmseqs_aln.dbtype", + "mmseqs_aln.index", + "mmseqs_aln.tsv", + "mmseqs_clu.0", + "mmseqs_clu.1", + "mmseqs_clu.2", + "mmseqs_clu.3", + "mmseqs_clu.4", + "mmseqs_clu.5", + "mmseqs_clu.6", + "mmseqs_clu.7", + "mmseqs_clu.dbtype", + "mmseqs_clu.index", + "mmseqs_db", + "mmseqs_h", + "mmseqs_h.dbtype", + "mmseqs_h.index", + "mmseqs_h.tsv", + "mmseqs_profile", + "mmseqs_profile.dbtype", + "mmseqs_profile.index", + "mmseqs_profile.lookup", + "mmseqs_profile.source", + "mmseqs_profile_h", + "mmseqs_profile_h.dbtype", + "mmseqs_profile_h.index", + "mmseqs_seq", + "mmseqs_seq.dbtype", + "mmseqs_seq.index", + "mmseqs_seq.lookup", + "mmseqs_seq.source", + "mmseqs_seq.tsv", + "mmseqs_seq_h", + "mmseqs_seq_h.dbtype", + "mmseqs_seq_h.index", + "tmp" + ], + [ + "versions.yml:md5,b5bfad51f25a7fb9add496eb09c5f2b2" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.3" + }, + "timestamp": "2025-01-16T06:32:24.126939413" + }, + "sarscov2 - db": { + "content": [ + "mmseqs.tsv:md5,4e7ba50ce2879660dc6595286bf0d097", + "mmseqs:md5,a5ba5a88d2995da3522dddb4abca07ef", + "mmseqs_seq.index:md5,09f8cf12406b814198156e56f5acd8dc", + [ + "mmseqs", + "mmseqs.dbtype", + "mmseqs.fasta", + "mmseqs.index", + "mmseqs.lookup", + "mmseqs.source", + "mmseqs.tsv", + "mmseqs_aln.0", + "mmseqs_aln.1", + "mmseqs_aln.2", + "mmseqs_aln.3", + "mmseqs_aln.4", + "mmseqs_aln.5", + "mmseqs_aln.6", + "mmseqs_aln.7", + "mmseqs_aln.dbtype", + "mmseqs_aln.index", + "mmseqs_aln.tsv", + "mmseqs_clu.0", + "mmseqs_clu.1", + "mmseqs_clu.2", + "mmseqs_clu.3", + "mmseqs_clu.4", + "mmseqs_clu.5", + "mmseqs_clu.6", + "mmseqs_clu.7", + "mmseqs_clu.dbtype", + "mmseqs_clu.index", + "mmseqs_db", + "mmseqs_db.dbtype", + "mmseqs_db.index", + "mmseqs_db_aln", + "mmseqs_db_aln.dbtype", + "mmseqs_db_aln.index", + "mmseqs_db_h", + "mmseqs_db_h.dbtype", + "mmseqs_db_h.index", + "mmseqs_db_seq", + "mmseqs_db_seq.dbtype", + "mmseqs_db_seq.index", + "mmseqs_db_seq_h", + "mmseqs_db_seq_h.dbtype", + "mmseqs_db_seq_h.index", + "mmseqs_h", + "mmseqs_h.dbtype", + "mmseqs_h.index", + "mmseqs_h.tsv", + "mmseqs_profile", + "mmseqs_profile.dbtype", + "mmseqs_profile.index", + "mmseqs_profile.lookup", + "mmseqs_profile.source", + "mmseqs_profile_h", + "mmseqs_profile_h.dbtype", + "mmseqs_profile_h.index", + "mmseqs_seq", + "mmseqs_seq.dbtype", + "mmseqs_seq.index", + "mmseqs_seq.lookup", + "mmseqs_seq.source", + "mmseqs_seq.tsv", + "mmseqs_seq_h", + "mmseqs_seq_h.dbtype", + "mmseqs_seq_h.index", + "tmp" + ], + [ + "versions.yml:md5,b5bfad51f25a7fb9add496eb09c5f2b2" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.3" + }, + "timestamp": "2025-01-16T06:32:11.496679278" + } +} \ No newline at end of file diff --git a/modules/nf-core/mmseqs/tsv2exprofiledb/tests/nextflow.config b/modules/nf-core/mmseqs/tsv2exprofiledb/tests/nextflow.config new file mode 100644 index 00000000000..d57fa806906 --- /dev/null +++ b/modules/nf-core/mmseqs/tsv2exprofiledb/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: UNTAR { + publishDir = [ enabled: false ] + } +} diff --git a/modules/nf-core/seqkit/fx2tab/environment.yml b/modules/nf-core/seqkit/fx2tab/environment.yml index 41f3e7de43d..1f93892f485 100644 --- a/modules/nf-core/seqkit/fx2tab/environment.yml +++ b/modules/nf-core/seqkit/fx2tab/environment.yml @@ -2,4 +2,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::seqkit=2.8.1 + - bioconda::seqkit=2.9.0 diff --git a/modules/nf-core/seqkit/fx2tab/main.nf b/modules/nf-core/seqkit/fx2tab/main.nf index d96b0b9d370..7a3f4103391 100644 --- a/modules/nf-core/seqkit/fx2tab/main.nf +++ b/modules/nf-core/seqkit/fx2tab/main.nf @@ -4,8 +4,8 @@ process SEQKIT_FX2TAB { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/seqkit:2.8.1--h9ee0642_0' : - 'biocontainers/seqkit:2.8.1--h9ee0642_0' }" + 'https://depot.galaxyproject.org/singularity/seqkit:2.9.0--h9ee0642_0' : + 'biocontainers/seqkit:2.9.0--h9ee0642_0' }" input: tuple val(meta), path(fastx) @@ -34,4 +34,16 @@ process SEQKIT_FX2TAB { seqkit: \$( seqkit | sed '3!d; s/Version: //' ) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + def suffix = task.ext.suffix ?: "txt.zst" + """ + touch ${prefix}.${suffix} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + seqkit: \$( seqkit | sed '3!d; s/Version: //' ) + END_VERSIONS + """ } diff --git a/modules/nf-core/seqkit/fx2tab/tests/main.nf.test.snap b/modules/nf-core/seqkit/fx2tab/tests/main.nf.test.snap index 29421657250..38c0b645ee2 100644 --- a/modules/nf-core/seqkit/fx2tab/tests/main.nf.test.snap +++ b/modules/nf-core/seqkit/fx2tab/tests/main.nf.test.snap @@ -7,30 +7,30 @@ { "id": "test" }, - "test.txt.zst:md5,08902131ebe68052a97178bc426bf944" + "test.txt.zst:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "1": [ - "versions.yml:md5,ba37c06c2d66e54301b2cd35ae47d0e8" + "versions.yml:md5,b35c25f76ae716eb6bed4f18abf12d50" ], "text": [ [ { "id": "test" }, - "test.txt.zst:md5,08902131ebe68052a97178bc426bf944" + "test.txt.zst:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "versions": [ - "versions.yml:md5,ba37c06c2d66e54301b2cd35ae47d0e8" + "versions.yml:md5,b35c25f76ae716eb6bed4f18abf12d50" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-05-07T16:01:39.484590737" + "timestamp": "2025-01-15T12:18:24.281141" }, "sarscov2 - fasta": { "content": [ @@ -44,7 +44,7 @@ ] ], "1": [ - "versions.yml:md5,ba37c06c2d66e54301b2cd35ae47d0e8" + "versions.yml:md5,b35c25f76ae716eb6bed4f18abf12d50" ], "text": [ [ @@ -55,15 +55,15 @@ ] ], "versions": [ - "versions.yml:md5,ba37c06c2d66e54301b2cd35ae47d0e8" + "versions.yml:md5,b35c25f76ae716eb6bed4f18abf12d50" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-05-07T16:01:21.332957847" + "timestamp": "2025-01-15T12:18:14.007765" }, "sarscov2 - fastq": { "content": [ @@ -77,7 +77,7 @@ ] ], "1": [ - "versions.yml:md5,ba37c06c2d66e54301b2cd35ae47d0e8" + "versions.yml:md5,b35c25f76ae716eb6bed4f18abf12d50" ], "text": [ [ @@ -88,14 +88,14 @@ ] ], "versions": [ - "versions.yml:md5,ba37c06c2d66e54301b2cd35ae47d0e8" + "versions.yml:md5,b35c25f76ae716eb6bed4f18abf12d50" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-05-07T16:01:29.885155029" + "timestamp": "2025-01-15T12:18:19.228692" } } \ No newline at end of file diff --git a/modules/nf-core/seqkit/tab2fx/environment.yml b/modules/nf-core/seqkit/tab2fx/environment.yml index 41f3e7de43d..1f93892f485 100644 --- a/modules/nf-core/seqkit/tab2fx/environment.yml +++ b/modules/nf-core/seqkit/tab2fx/environment.yml @@ -2,4 +2,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::seqkit=2.8.1 + - bioconda::seqkit=2.9.0 diff --git a/modules/nf-core/seqkit/tab2fx/main.nf b/modules/nf-core/seqkit/tab2fx/main.nf index 9532cfc5918..9cdee7d30ba 100644 --- a/modules/nf-core/seqkit/tab2fx/main.nf +++ b/modules/nf-core/seqkit/tab2fx/main.nf @@ -4,8 +4,8 @@ process SEQKIT_TAB2FX { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/seqkit:2.8.1--h9ee0642_0' : - 'biocontainers/seqkit:2.8.1--h9ee0642_0' }" + 'https://depot.galaxyproject.org/singularity/seqkit:2.9.0--h9ee0642_0' : + 'biocontainers/seqkit:2.9.0--h9ee0642_0' }" input: tuple val(meta), path(text) @@ -34,4 +34,16 @@ process SEQKIT_TAB2FX { seqkit: \$( seqkit | sed '3!d; s/Version: //' ) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + def suffix = task.ext.suffix ?: "fa.zst" + """ + touch ${prefix}.${suffix} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + seqkit: \$( seqkit | sed '3!d; s/Version: //' ) + END_VERSIONS + """ } diff --git a/modules/nf-core/seqkit/tab2fx/tests/main.nf.test.snap b/modules/nf-core/seqkit/tab2fx/tests/main.nf.test.snap index 857a2b2e953..91c6fbbb5c2 100644 --- a/modules/nf-core/seqkit/tab2fx/tests/main.nf.test.snap +++ b/modules/nf-core/seqkit/tab2fx/tests/main.nf.test.snap @@ -7,30 +7,30 @@ { "id": "test" }, - "test.fa.zst:md5,04d45a85c10933605cb5a289552c83a0" + "test.fa.zst:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "1": [ - "versions.yml:md5,60fb327ac9a1ed20945fbb049faa7e36" + "versions.yml:md5,d01878090b875a05b111ee8a68405491" ], "fastx": [ [ { "id": "test" }, - "test.fa.zst:md5,04d45a85c10933605cb5a289552c83a0" + "test.fa.zst:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "versions": [ - "versions.yml:md5,60fb327ac9a1ed20945fbb049faa7e36" + "versions.yml:md5,d01878090b875a05b111ee8a68405491" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-05-08T08:24:24.025365917" + "timestamp": "2025-01-15T12:20:30.19388" }, "fastq_gz": { "content": [ @@ -44,7 +44,7 @@ ] ], "1": [ - "versions.yml:md5,60fb327ac9a1ed20945fbb049faa7e36" + "versions.yml:md5,d01878090b875a05b111ee8a68405491" ], "fastx": [ [ @@ -55,15 +55,15 @@ ] ], "versions": [ - "versions.yml:md5,60fb327ac9a1ed20945fbb049faa7e36" + "versions.yml:md5,d01878090b875a05b111ee8a68405491" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-05-08T08:24:12.779036251" + "timestamp": "2025-01-15T12:20:25.318142" }, "fasta_gz": { "content": [ @@ -77,7 +77,7 @@ ] ], "1": [ - "versions.yml:md5,60fb327ac9a1ed20945fbb049faa7e36" + "versions.yml:md5,d01878090b875a05b111ee8a68405491" ], "fastx": [ [ @@ -88,15 +88,15 @@ ] ], "versions": [ - "versions.yml:md5,60fb327ac9a1ed20945fbb049faa7e36" + "versions.yml:md5,d01878090b875a05b111ee8a68405491" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-05-08T08:24:00.497912668" + "timestamp": "2025-01-15T12:20:19.111781" }, "fasta": { "content": [ @@ -110,7 +110,7 @@ ] ], "1": [ - "versions.yml:md5,60fb327ac9a1ed20945fbb049faa7e36" + "versions.yml:md5,d01878090b875a05b111ee8a68405491" ], "fastx": [ [ @@ -121,15 +121,15 @@ ] ], "versions": [ - "versions.yml:md5,60fb327ac9a1ed20945fbb049faa7e36" + "versions.yml:md5,d01878090b875a05b111ee8a68405491" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-05-08T08:23:31.940090506" + "timestamp": "2025-01-15T12:20:06.405339" }, "fastq": { "content": [ @@ -143,7 +143,7 @@ ] ], "1": [ - "versions.yml:md5,60fb327ac9a1ed20945fbb049faa7e36" + "versions.yml:md5,d01878090b875a05b111ee8a68405491" ], "fastx": [ [ @@ -154,14 +154,14 @@ ] ], "versions": [ - "versions.yml:md5,60fb327ac9a1ed20945fbb049faa7e36" + "versions.yml:md5,d01878090b875a05b111ee8a68405491" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.3" }, - "timestamp": "2024-05-08T08:23:46.059347765" + "timestamp": "2025-01-15T12:20:12.813847" } } \ No newline at end of file diff --git a/modules/nf-core/smoothxg/environment.yml b/modules/nf-core/smoothxg/environment.yml index a837203d000..1e49e2cf889 100644 --- a/modules/nf-core/smoothxg/environment.yml +++ b/modules/nf-core/smoothxg/environment.yml @@ -2,4 +2,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::smoothxg=0.7.2 + - bioconda::smoothxg=0.8.0 diff --git a/modules/nf-core/smoothxg/main.nf b/modules/nf-core/smoothxg/main.nf index 191e14cd1e5..e22060d60e7 100644 --- a/modules/nf-core/smoothxg/main.nf +++ b/modules/nf-core/smoothxg/main.nf @@ -4,8 +4,8 @@ process SMOOTHXG { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/smoothxg:0.7.2--h40c17d1_0' : - 'biocontainers/smoothxg:0.7.2--h40c17d1_0' }" + 'https://depot.galaxyproject.org/singularity/smoothxg:0.8.0--h40c17d1_0' : + 'biocontainers/smoothxg:0.8.0--h40c17d1_0' }" input: tuple val(meta), path(gfa) diff --git a/subworkflows/nf-core/abundance_differential_filter/main.nf b/subworkflows/nf-core/abundance_differential_filter/main.nf index 4930b708b55..8c11efa55eb 100644 --- a/subworkflows/nf-core/abundance_differential_filter/main.nf +++ b/subworkflows/nf-core/abundance_differential_filter/main.nf @@ -31,15 +31,16 @@ workflow ABUNDANCE_DIFFERENTIAL_FILTER { // Set up how the channels crossed below will be used to generate channels for processing def criteria = multiMapCriteria { meta_input, abundance, analysis_method, fc_threshold, stat_threshold, meta_exp, samplesheet, meta_contrasts, variable, reference, target -> + def meta_for_diff = mergeMaps(meta_contrasts, meta_input) + [ 'method': analysis_method ] + def meta_input_new = meta_input + [ 'method': analysis_method ] samples_and_matrix: - meta_map = meta_input + [ 'method': analysis_method ] - [meta_map, samplesheet, abundance] - contrasts: - meta_map = mergeMaps(meta_contrasts, meta_input) + [ 'method': analysis_method ] - [ meta_map, variable, reference, target ] + [ meta_input_new, samplesheet, abundance ] + contrasts_for_diff: + [ meta_for_diff, variable, reference, target ] filter_params: - meta_map = mergeMaps(meta_contrasts, meta_input) + [ 'method': analysis_method ] - [meta_map, [ 'fc_threshold': fc_threshold, 'stat_threshold': stat_threshold ]] + [ meta_for_diff, [ 'fc_threshold': fc_threshold, 'stat_threshold': stat_threshold ]] + contrasts_for_norm: + [ meta_input_new, variable, reference, target ] } // For DIFFERENTIAL modules we need to cross the things we're iterating so we @@ -70,13 +71,13 @@ workflow ABUNDANCE_DIFFERENTIAL_FILTER { // LIMMA_NORM directly. It internally runs normalization + DE analysis. LIMMA_NORM( - norm_inputs.contrasts.filter{it[0].method == 'limma'}.first(), + norm_inputs.contrasts_for_norm.filter{it[0].method == 'limma'}, norm_inputs.samples_and_matrix.filter{it[0].method == 'limma'} ) LIMMA_DIFFERENTIAL( - inputs.contrasts.filter{it[0].method == 'limma'}, - inputs.samples_and_matrix.filter { it[0].method == 'limma' } + inputs.contrasts_for_diff.filter{ it[0].method == 'limma' }, + inputs.samples_and_matrix.filter{ it[0].method == 'limma' } ) // ---------------------------------------------------- @@ -91,14 +92,14 @@ workflow ABUNDANCE_DIFFERENTIAL_FILTER { // DESEQ2_NORM directly. It internally runs normalization + DE analysis. DESEQ2_NORM( - norm_inputs.contrasts.filter{it[0].method == 'deseq2'}.first(), + norm_inputs.contrasts_for_norm.filter{it[0].method == 'deseq2'}, norm_inputs.samples_and_matrix.filter{it[0].method == 'deseq2'}, ch_control_features.first(), ch_transcript_lengths.first() ) DESEQ2_DIFFERENTIAL( - inputs.contrasts.filter{it[0].method == 'deseq2'}, + inputs.contrasts_for_diff.filter{it[0].method == 'deseq2'}, inputs.samples_and_matrix.filter{it[0].method == 'deseq2'}, ch_control_features.first(), ch_transcript_lengths.first() @@ -112,7 +113,7 @@ workflow ABUNDANCE_DIFFERENTIAL_FILTER { // not produce a normalized matrix. PROPR_PROPD( - inputs.contrasts.filter{it[0].method == 'propd'}, + inputs.contrasts_for_diff.filter{it[0].method == 'propd'}, inputs.samples_and_matrix.filter { it[0].method == 'propd' } ) diff --git a/subworkflows/nf-core/abundance_differential_filter/meta.yml b/subworkflows/nf-core/abundance_differential_filter/meta.yml index 509520f3ec3..cc22f805353 100644 --- a/subworkflows/nf-core/abundance_differential_filter/meta.yml +++ b/subworkflows/nf-core/abundance_differential_filter/meta.yml @@ -133,7 +133,7 @@ output: authors: - "@pinin4fjords" - "@bjlang" - - "@araiz2001" + - "@caraiz2001" - "@suzannejin" maintainers: - "@pinin4fjords" diff --git a/subworkflows/nf-core/abundance_differential_filter/tests/deseq2_basic.config b/subworkflows/nf-core/abundance_differential_filter/tests/deseq2_basic.config index 508fa04aedc..d6918e56f6a 100644 --- a/subworkflows/nf-core/abundance_differential_filter/tests/deseq2_basic.config +++ b/subworkflows/nf-core/abundance_differential_filter/tests/deseq2_basic.config @@ -1,10 +1,14 @@ process { withName: 'DESEQ2_DIFFERENTIAL' { - ext.args = { "--round_digits 5 --blocking_variables $meta.blocking --vs_method rlog" } + ext.args = { [ + "--round_digits 5", + "--vs_method rlog", + (meta.blocking == null) ? "" : "--blocking_variables $meta.blocking" + ].join(' ').trim() } ext.prefix = { "${meta.id}_${meta.method}" } } withName: 'DESEQ2_NORM' { - ext.prefix = { "${meta.id}_${meta.method}_voom_norm" } + ext.prefix = { "${meta.id}_${meta.method}_norm" } } } diff --git a/subworkflows/nf-core/abundance_differential_filter/tests/deseq2_limmavoom_basic.config b/subworkflows/nf-core/abundance_differential_filter/tests/deseq2_limmavoom_basic.config index a2b6e9efbd9..14fcfefa6dd 100644 --- a/subworkflows/nf-core/abundance_differential_filter/tests/deseq2_limmavoom_basic.config +++ b/subworkflows/nf-core/abundance_differential_filter/tests/deseq2_limmavoom_basic.config @@ -1,6 +1,10 @@ process { withName: 'DESEQ2_DIFFERENTIAL' { - ext.args = { "--round_digits 5 --blocking_variables $meta.blocking --vs_method rlog" } + ext.args = { [ + "--round_digits 5", + "--vs_method rlog", + (meta.blocking == null) ? "" : "--blocking_variables $meta.blocking" + ].join(' ').trim() } ext.prefix = { "${meta.id}_${meta.method}" } } diff --git a/subworkflows/nf-core/abundance_differential_filter/tests/deseq2_limmavoom_propd_basic.config b/subworkflows/nf-core/abundance_differential_filter/tests/deseq2_limmavoom_propd_basic.config index 8bd211bad64..dda5df4bcd4 100644 --- a/subworkflows/nf-core/abundance_differential_filter/tests/deseq2_limmavoom_propd_basic.config +++ b/subworkflows/nf-core/abundance_differential_filter/tests/deseq2_limmavoom_propd_basic.config @@ -1,6 +1,10 @@ process { withName: 'DESEQ2_DIFFERENTIAL' { - ext.args = { "--round_digits 5 --blocking_variables $meta.blocking --vs_method rlog" } + ext.args = { [ + "--round_digits 5", + "--vs_method rlog", + (meta.blocking == null) ? "" : "--blocking_variables $meta.blocking" + ].join(' ').trim() } ext.prefix = { "${meta.id}_${meta.method}" } } diff --git a/subworkflows/nf-core/abundance_differential_filter/tests/main.nf.test b/subworkflows/nf-core/abundance_differential_filter/tests/main.nf.test index 8cbb8cf8767..500a2e800fe 100644 --- a/subworkflows/nf-core/abundance_differential_filter/tests/main.nf.test +++ b/subworkflows/nf-core/abundance_differential_filter/tests/main.nf.test @@ -16,7 +16,7 @@ nextflow_workflow { test("deseq2 - mouse - basic") { config './deseq2_basic.config' - tag "deseq2" + tag "deseq2_basic" when { workflow { @@ -74,7 +74,7 @@ nextflow_workflow { test("limma - basic - microarray") { config './limma_basic_microarray.config' - tag "limma" + tag "limma_basic_microarray" setup { run("UNTAR") { diff --git a/subworkflows/nf-core/abundance_differential_filter/tests/main.nf.test.snap b/subworkflows/nf-core/abundance_differential_filter/tests/main.nf.test.snap index dba530f24eb..6795359ae88 100644 --- a/subworkflows/nf-core/abundance_differential_filter/tests/main.nf.test.snap +++ b/subworkflows/nf-core/abundance_differential_filter/tests/main.nf.test.snap @@ -28,7 +28,7 @@ ] ], [ - + ], [ [ @@ -48,9 +48,9 @@ ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nextflow": "24.10.3" }, - "timestamp": "2024-12-07T16:33:03.091762783" + "timestamp": "2025-01-14T16:51:17.162826924" }, "deseq2 and limma - mouse - basic": { "content": [ @@ -157,38 +157,26 @@ [ [ { - "id": "treatment_mCherry_hND6__test", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "", + "id": "test", "method": "deseq2" }, - "treatment_mCherry_hND6__test_deseq2_norm.normalised_counts.tsv:md5,46ab7200c626649ab6256ed797ef5071" + "test_deseq2_norm.normalised_counts.tsv:md5,46ab7200c626649ab6256ed797ef5071" ], [ { - "id": "treatment_mCherry_hND6__test", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "", + "id": "test", "method": "limma" }, - "treatment_mCherry_hND6__test_limma_voom_norm.normalised_counts.tsv:md5,2aa4880ba5ae246a728b25f4316ca2ca" + "test_limma_voom_norm.normalised_counts.tsv:md5,2aa4880ba5ae246a728b25f4316ca2ca" ] ], [ [ { - "id": "treatment_mCherry_hND6__test", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "", + "id": "test", "method": "deseq2" }, - "treatment_mCherry_hND6__test_deseq2_norm.rlog.tsv:md5,b1adc1fba6bd0c8b55973608f4b97030" + "test_deseq2_norm.rlog.tsv:md5,b1adc1fba6bd0c8b55973608f4b97030" ] ], [ @@ -246,9 +234,9 @@ ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nextflow": "24.10.3" }, - "timestamp": "2024-12-07T16:34:54.548033825" + "timestamp": "2025-01-14T16:53:11.245100955" }, "limma - voom": { "content": [ @@ -283,14 +271,10 @@ [ [ { - "id": "treatment_mCherry_hND6__test", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "", + "id": "test", "method": "limma" }, - "treatment_mCherry_hND6__test_limma_voom_norm.normalised_counts.tsv:md5,2aa4880ba5ae246a728b25f4316ca2ca" + "test_limma_voom_norm.normalised_counts.tsv:md5,2aa4880ba5ae246a728b25f4316ca2ca" ] ], [ @@ -324,9 +308,9 @@ ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nextflow": "24.10.3" }, - "timestamp": "2024-12-07T16:33:26.97858478" + "timestamp": "2025-01-14T16:51:32.460857013" }, "deseq2 + limma-voom + propd - mouse - basic": { "content": [ @@ -505,38 +489,26 @@ [ [ { - "id": "treatment_mCherry_hND6__test", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "", + "id": "test", "method": "deseq2" }, - "treatment_mCherry_hND6__test_deseq2_norm.normalised_counts.tsv:md5,46ab7200c626649ab6256ed797ef5071" + "test_deseq2_norm.normalised_counts.tsv:md5,46ab7200c626649ab6256ed797ef5071" ], [ { - "id": "treatment_mCherry_hND6__test", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "", + "id": "test", "method": "limma" }, - "treatment_mCherry_hND6__test_limma_voom_norm.normalised_counts.tsv:md5,2aa4880ba5ae246a728b25f4316ca2ca" + "test_limma_voom_norm.normalised_counts.tsv:md5,2aa4880ba5ae246a728b25f4316ca2ca" ] ], [ [ { - "id": "treatment_mCherry_hND6__test", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "", + "id": "test", "method": "deseq2" }, - "treatment_mCherry_hND6__test_deseq2_norm.rlog.tsv:md5,b1adc1fba6bd0c8b55973608f4b97030" + "test_deseq2_norm.rlog.tsv:md5,b1adc1fba6bd0c8b55973608f4b97030" ] ], [ @@ -596,9 +568,9 @@ ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nextflow": "24.10.3" }, - "timestamp": "2024-12-13T16:07:08.941008861" + "timestamp": "2025-01-14T16:53:54.80697542" }, "stub": { "content": [ @@ -656,32 +628,24 @@ ] ], "2": [ - + ], "3": [ [ { - "id": "treatment_mCherry_hND6__test", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "", + "id": "test", "method": "deseq2" }, - "treatment_mCherry_hND6__test.normalised_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.normalised_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "4": [ [ { - "id": "treatment_mCherry_hND6__test", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "", + "id": "test", "method": "deseq2" }, - "treatment_mCherry_hND6__test.rlog.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.rlog.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "5": [ @@ -713,7 +677,7 @@ "versions.yml:md5,05e3901f6d78f8839a7e07f422e9bc03" ], "adjacency": [ - + ], "model": [ [ @@ -742,14 +706,10 @@ "normalised_matrix": [ [ { - "id": "treatment_mCherry_hND6__test", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "", + "id": "test", "method": "deseq2" }, - "treatment_mCherry_hND6__test.normalised_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.normalised_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "results_genewise": [ @@ -807,14 +767,10 @@ "variance_stabilised_matrix": [ [ { - "id": "treatment_mCherry_hND6__test", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "", + "id": "test", "method": "deseq2" }, - "treatment_mCherry_hND6__test.rlog.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.rlog.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "versions": [ @@ -825,9 +781,9 @@ ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nextflow": "24.10.3" }, - "timestamp": "2024-12-13T15:08:45.989521056" + "timestamp": "2025-01-14T16:54:12.823125892" }, "deseq2 - mouse - basic": { "content": [ @@ -886,27 +842,19 @@ [ [ { - "id": "treatment_mCherry_hND6__test", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "", + "id": "test", "method": "deseq2" }, - "treatment_mCherry_hND6__test_deseq2_voom_norm.normalised_counts.tsv:md5,46ab7200c626649ab6256ed797ef5071" + "test_deseq2_norm.normalised_counts.tsv:md5,46ab7200c626649ab6256ed797ef5071" ] ], [ [ { - "id": "treatment_mCherry_hND6__test", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "", + "id": "test", "method": "deseq2" }, - "treatment_mCherry_hND6__test_deseq2_voom_norm.rlog.tsv:md5,b1adc1fba6bd0c8b55973608f4b97030" + "test_deseq2_norm.rlog.tsv:md5,b1adc1fba6bd0c8b55973608f4b97030" ] ], [ @@ -940,9 +888,9 @@ ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nextflow": "24.10.3" }, - "timestamp": "2024-12-07T16:32:17.301539736" + "timestamp": "2025-01-14T16:50:35.085607799" }, "deseq2 - with transcript lengths": { "content": [ @@ -1001,27 +949,19 @@ [ [ { - "id": "treatment_mCherry_hND6__test", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "", + "id": "test", "method": "deseq2" }, - "treatment_mCherry_hND6__test_deseq2_voom_norm.normalised_counts.tsv:md5,7050f44c460cc13e3f101d048d503527" + "test_deseq2_norm.normalised_counts.tsv:md5,7050f44c460cc13e3f101d048d503527" ] ], [ [ { - "id": "treatment_mCherry_hND6__test", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "", + "id": "test", "method": "deseq2" }, - "treatment_mCherry_hND6__test_deseq2_voom_norm.rlog.tsv:md5,22a4b117246b2317e0f4daf7919703f2" + "test_deseq2_norm.rlog.tsv:md5,22a4b117246b2317e0f4daf7919703f2" ] ], [ @@ -1055,9 +995,9 @@ ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nextflow": "24.10.3" }, - "timestamp": "2024-12-07T16:34:05.584119298" + "timestamp": "2025-01-14T16:52:07.822745077" }, "propd - mouse - basic": { "content": [ @@ -1144,8 +1084,8 @@ ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nextflow": "24.10.3" }, - "timestamp": "2024-12-13T15:02:45.903371649" + "timestamp": "2025-01-14T16:52:25.336720308" } -} +} \ No newline at end of file diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index a2300fb29f3..f8edf0986e5 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -266,12 +266,6 @@ kofamscan: krakentools/combinekreports: - modules/nf-core/krakentools/combinekreports/** - tests/modules/nf-core/krakentools/combinekreports/** -krakenuniq/build: - - modules/nf-core/krakenuniq/build/** - - tests/modules/nf-core/krakenuniq/build/** -krakenuniq/download: - - modules/nf-core/krakenuniq/download/** - - tests/modules/nf-core/krakenuniq/download/** krona/kronadb: - modules/nf-core/krona/kronadb/** - tests/modules/nf-core/krona/kronadb/** @@ -320,12 +314,6 @@ mitohifi/findmitoreference: mitohifi/mitohifi: - modules/nf-core/mitohifi/mitohifi/** - tests/modules/nf-core/mitohifi/mitohifi/** -mmseqs/easysearch: - - modules/nf-core/mmseqs/easysearch/** - - tests/modules/nf-core/mmseqs/easysearch/** -mmseqs/tsv2exprofiledb: - - modules/nf-core/mmseqs/tsv2exprofiledb/** - - tests/modules/nf-core/mmseqs/tsv2exprofiledb/** motus/downloaddb: - modules/nf-core/motus/downloaddb/** - tests/modules/nf-core/motus/downloaddb/** diff --git a/tests/modules/nf-core/krakenuniq/build/main.nf b/tests/modules/nf-core/krakenuniq/build/main.nf deleted file mode 100644 index 63fba4866cb..00000000000 --- a/tests/modules/nf-core/krakenuniq/build/main.nf +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { KRAKENUNIQ_DOWNLOAD } from '../../../../../modules/nf-core/krakenuniq/download/main.nf' -include { KRAKENUNIQ_BUILD } from '../../../../../modules/nf-core/krakenuniq/build/main.nf' - -workflow test_krakenuniq_build { - - ch_fastas = Channel.fromPath(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - ch_seqid2mapid = Channel.fromPath(params.test_data['sarscov2']['metagenome']['seqid2taxid_map'], checkIfExists: true) - KRAKENUNIQ_DOWNLOAD ( 'taxonomy' ) - - ch_input = ch_fastas - .combine(KRAKENUNIQ_DOWNLOAD.out.output) - .combine(ch_seqid2mapid) - .map { - fna, tax, map -> - - [ [id: "customdb"], fna, tax, map ] - } - - KRAKENUNIQ_BUILD ( ch_input ) -} diff --git a/tests/modules/nf-core/krakenuniq/build/nextflow.config b/tests/modules/nf-core/krakenuniq/build/nextflow.config deleted file mode 100644 index 113299318e5..00000000000 --- a/tests/modules/nf-core/krakenuniq/build/nextflow.config +++ /dev/null @@ -1,9 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: 'KRAKENUNIQ_BUILD' { - ext.args ="--work-on-disk" - } - -} diff --git a/tests/modules/nf-core/krakenuniq/build/test.yml b/tests/modules/nf-core/krakenuniq/build/test.yml deleted file mode 100644 index f36f385f174..00000000000 --- a/tests/modules/nf-core/krakenuniq/build/test.yml +++ /dev/null @@ -1,30 +0,0 @@ -- name: krakenuniq build test_krakenuniq_build - command: nextflow run ./tests/modules/nf-core/krakenuniq/build -entry test_krakenuniq_build -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/krakenuniq/build/nextflow.config - tags: - - krakenuniq/build - - krakenuniq - files: - - path: output/krakenuniq/customdb/database-build.log - contains: ["-d database.jdb -o database0.kdb.tmp -i database.idx"] - - path: output/krakenuniq/customdb/database.idx - md5sum: db9e8cd1f75cdedd70dd346b70658790 - - path: output/krakenuniq/customdb/database.jdb - md5sum: 8b4a9b8cbcacec61fc6a220f0cec59bd - - path: output/krakenuniq/customdb/database.kdb - md5sum: c6853c5d2f3a4a7ad05c2973a993b9b8 - - path: output/krakenuniq/customdb/database.kdb.counts - md5sum: a82149480a435210ec1e870f06b6cdb3 - - path: output/krakenuniq/customdb/database.kraken.tsv - md5sum: 8aafacd89a6aac98aaf512df0a7493d1 - - path: output/krakenuniq/customdb/database.report.tsv - contains: ["% reads taxReads kmers dup cov taxID rank taxName"] - - path: output/krakenuniq/customdb/database0.kdb - md5sum: c6853c5d2f3a4a7ad05c2973a993b9b8 - - path: output/krakenuniq/customdb/library-files.txt - md5sum: 8a9817d2de8465eb436aa3aa8696a717 - - path: output/krakenuniq/customdb/library/genome.fasta - md5sum: 6e9fe4042a72f2345f644f239272b7e6 - - path: output/krakenuniq/customdb/seqid2taxid.map - md5sum: fe738f2333d57dde0db32239c04a93b8 - - path: output/krakenuniq/customdb/taxDB - md5sum: 84213970a13958e612a0eb0f4681fbc4 diff --git a/tests/modules/nf-core/krakenuniq/download/main.nf b/tests/modules/nf-core/krakenuniq/download/main.nf deleted file mode 100644 index 418561dc320..00000000000 --- a/tests/modules/nf-core/krakenuniq/download/main.nf +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { KRAKENUNIQ_DOWNLOAD } from '../../../../../modules/nf-core/krakenuniq/download/main.nf' - -workflow test_krakenuniq_download { - - input = "taxonomy" - - KRAKENUNIQ_DOWNLOAD ( input ) -} diff --git a/tests/modules/nf-core/krakenuniq/download/nextflow.config b/tests/modules/nf-core/krakenuniq/download/nextflow.config deleted file mode 100644 index 50f50a7a357..00000000000 --- a/tests/modules/nf-core/krakenuniq/download/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file diff --git a/tests/modules/nf-core/krakenuniq/download/test.yml b/tests/modules/nf-core/krakenuniq/download/test.yml deleted file mode 100644 index 63fdcfc4cae..00000000000 --- a/tests/modules/nf-core/krakenuniq/download/test.yml +++ /dev/null @@ -1,12 +0,0 @@ -- name: krakenuniq download test_krakenuniq_download - command: nextflow run ./tests/modules/nf-core/krakenuniq/download -entry test_krakenuniq_download -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/krakenuniq/download/nextflow.config - tags: - - krakenuniq - - krakenuniq/download - files: - - path: output/krakenuniq/taxonomy/names.dmp - contains: ["scientific name"] - - path: output/krakenuniq/taxonomy/nodes.dmp - contains: ["superkingdom"] - - path: output/krakenuniq/taxonomy/taxdump.tar.gz - - path: output/krakenuniq/taxonomy/timestamp diff --git a/tests/modules/nf-core/mmseqs/easysearch/main.nf b/tests/modules/nf-core/mmseqs/easysearch/main.nf deleted file mode 100644 index 41ecf4f87db..00000000000 --- a/tests/modules/nf-core/mmseqs/easysearch/main.nf +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { MMSEQS_EASYSEARCH } from '../../../../../modules/nf-core/mmseqs/easysearch/main.nf' -include { MMSEQS_CREATEDB as MMSEQS_CREATEDB_TARGET } from '../../../../../modules/nf-core/mmseqs/createdb/main.nf' - - -workflow test_mmseqs_easysearch { - - input_query = [ - [ id:'test_query', single_end:true ], // meta map - file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true) - ] - - - input_target = [ - [ id:'test_target', single_end:true ], // meta map - file(params.test_data['sarscov2']['illumina']['scaffolds_fasta'], checkIfExists: true) - ] - ch_target_db = MMSEQS_CREATEDB_TARGET( input_target ).db - - MMSEQS_EASYSEARCH ( input_query, ch_target_db ) -} diff --git a/tests/modules/nf-core/mmseqs/easysearch/nextflow.config b/tests/modules/nf-core/mmseqs/easysearch/nextflow.config deleted file mode 100644 index 9b0cc3afaac..00000000000 --- a/tests/modules/nf-core/mmseqs/easysearch/nextflow.config +++ /dev/null @@ -1,12 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: MMSEQS_CREATEDB_TARGET { - publishDir = [ enabled: false ] - } - - withName: MMSEQS_EASYSEARCH { - ext.args = '--remove-tmp-files 1 --search-type 2' - } -} \ No newline at end of file diff --git a/tests/modules/nf-core/mmseqs/easysearch/test.yml b/tests/modules/nf-core/mmseqs/easysearch/test.yml deleted file mode 100644 index d15644212d8..00000000000 --- a/tests/modules/nf-core/mmseqs/easysearch/test.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: mmseqs easysearch test_mmseqs_easysearch - command: nextflow run ./tests/modules/nf-core/mmseqs/easysearch -entry test_mmseqs_easysearch -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/mmseqs/easysearch/nextflow.config - tags: - - mmseqs - - mmseqs/easysearch - files: - - path: output/mmseqs/test_query.tsv - md5sum: 98a6e138ad41ed04366808799fd6a4b8 - - path: output/mmseqs/versions.yml diff --git a/tests/modules/nf-core/mmseqs/tsv2exprofiledb/main.nf b/tests/modules/nf-core/mmseqs/tsv2exprofiledb/main.nf deleted file mode 100644 index c04092d863a..00000000000 --- a/tests/modules/nf-core/mmseqs/tsv2exprofiledb/main.nf +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { UNTAR } from '../../../../../modules/nf-core/untar/main.nf' -include { MMSEQS_TSV2EXPROFILEDB } from '../../../../../modules/nf-core/mmseqs/tsv2exprofiledb/main.nf' - -workflow test_mmseqs_tsv2exprofiledb { - - db = file(params.test_data['sarscov2']['genome']['mmseqs_tar_gz'], checkIfExists: true) - - ch_db = UNTAR ( [[:], db] ).untar - .map { it[1] } - MMSEQS_TSV2EXPROFILEDB ( ch_db ) -} diff --git a/tests/modules/nf-core/mmseqs/tsv2exprofiledb/nextflow.config b/tests/modules/nf-core/mmseqs/tsv2exprofiledb/nextflow.config deleted file mode 100644 index d5ca1bd6531..00000000000 --- a/tests/modules/nf-core/mmseqs/tsv2exprofiledb/nextflow.config +++ /dev/null @@ -1,9 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: UNTAR { - publishDir = [ enabled: false ] - } - -} diff --git a/tests/modules/nf-core/mmseqs/tsv2exprofiledb/test.yml b/tests/modules/nf-core/mmseqs/tsv2exprofiledb/test.yml deleted file mode 100644 index 5d98c44e45e..00000000000 --- a/tests/modules/nf-core/mmseqs/tsv2exprofiledb/test.yml +++ /dev/null @@ -1,105 +0,0 @@ -- name: mmseqs tsv2exprofiledb test_mmseqs_tsv2exprofiledb - command: nextflow run ./tests/modules/nf-core/mmseqs/tsv2exprofiledb -entry test_mmseqs_tsv2exprofiledb -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/mmseqs/tsv2exprofiledb/nextflow.config - tags: - - mmseqs/tsv2exprofiledb - - mmseqs - files: - - path: output/mmseqs/mmseqs/mmseqs - md5sum: a5ba5a88d2995da3522dddb4abca07ef - - path: output/mmseqs/mmseqs/mmseqs.dbtype - md5sum: f1d3ff8443297732862df21dc4e57262 - - path: output/mmseqs/mmseqs/mmseqs.fasta - md5sum: b40600ad3be77f076df716e6cf99c64c - - path: output/mmseqs/mmseqs/mmseqs.index - md5sum: c012bdab1c61eeafcb99d1b26650f3d0 - - path: output/mmseqs/mmseqs/mmseqs.lookup - md5sum: fa898551a6b303614ae6e29c237b7fc6 - - path: output/mmseqs/mmseqs/mmseqs.source - md5sum: 16bef02c30aadbfa8d035596502f0aa2 - - path: output/mmseqs/mmseqs/mmseqs.tsv - md5sum: 4e7ba50ce2879660dc6595286bf0d097 - - path: output/mmseqs/mmseqs/mmseqs_aln.0 - md5sum: 043e7e17756de6492a673c4b8c164892 - - path: output/mmseqs/mmseqs/mmseqs_aln.2 - md5sum: 41b5ec081780c45020674d12e57b927b - - path: output/mmseqs/mmseqs/mmseqs_aln.7 - md5sum: f1601f96061757d9f73d0e79ad7af70b - - path: output/mmseqs/mmseqs/mmseqs_aln.dbtype - md5sum: cbe23d9655fccd4311acdd6261c81bd8 - - path: output/mmseqs/mmseqs/mmseqs_aln.index - md5sum: 9e17db59a56719569d20f72f0f48924d - - path: output/mmseqs/mmseqs/mmseqs_aln.tsv - md5sum: e6fc24b66126dec818f89491edb79fec - - path: output/mmseqs/mmseqs/mmseqs_clu.0 - md5sum: 86256b3bd5cd46a4ce865c477a381e08 - - path: output/mmseqs/mmseqs/mmseqs_clu.dbtype - md5sum: b9d9c6dbc098c97ae446f612efd8eafd - - path: output/mmseqs/mmseqs/mmseqs_clu.index - md5sum: a0b78f31aee2c327d72f32919814baf1 - - path: output/mmseqs/mmseqs/mmseqs_db.dbtype - md5sum: 152afd7bf4dbe26f85032eee0269201a - - path: output/mmseqs/mmseqs/mmseqs_db.index - md5sum: 41ca8fb87475481709909380ec07fb00 - - path: output/mmseqs/mmseqs/mmseqs_db_aln.dbtype - md5sum: 596b18eb7c7e96754c16d5dac99ffea7 - - path: output/mmseqs/mmseqs/mmseqs_db_aln.index - md5sum: 67199af9a654fd0bc54d52333f7c41a7 - - path: output/mmseqs/mmseqs/mmseqs_db_h - md5sum: 7133e5a17c0c7a16e5a53748bb2bdff2 - - path: output/mmseqs/mmseqs/mmseqs_db_h.dbtype - md5sum: 740bab4f9ec8808aedb68d6b1281aeb2 - - path: output/mmseqs/mmseqs/mmseqs_db_h.index - md5sum: c292d4dbfd6579d9ad6c94882a2578d0 - - path: output/mmseqs/mmseqs/mmseqs_db_seq.dbtype - md5sum: 152afd7bf4dbe26f85032eee0269201a - - path: output/mmseqs/mmseqs/mmseqs_db_seq.index - md5sum: 41ca8fb87475481709909380ec07fb00 - - path: output/mmseqs/mmseqs/mmseqs_db_seq_h - md5sum: 7133e5a17c0c7a16e5a53748bb2bdff2 - - path: output/mmseqs/mmseqs/mmseqs_db_seq_h.dbtype - md5sum: 740bab4f9ec8808aedb68d6b1281aeb2 - - path: output/mmseqs/mmseqs/mmseqs_db_seq_h.index - md5sum: c292d4dbfd6579d9ad6c94882a2578d0 - - path: output/mmseqs/mmseqs/mmseqs_h - md5sum: 2b2cb13de706b3bb48a38942d851f452 - - path: output/mmseqs/mmseqs/mmseqs_h.dbtype - md5sum: 740bab4f9ec8808aedb68d6b1281aeb2 - - path: output/mmseqs/mmseqs/mmseqs_h.index - md5sum: 0040e6a02964914a87ef1efbe9011cbf - - path: output/mmseqs/mmseqs/mmseqs_h.tsv - md5sum: 8c733b4ef72b8c470ac30537cf6981bd - - path: output/mmseqs/mmseqs/mmseqs_profile - md5sum: 6c29ffea085c8c78e97533f9bcbedd98 - - path: output/mmseqs/mmseqs/mmseqs_profile.dbtype - md5sum: f2dd0dedb2c260419ece4a9e03b2e828 - - path: output/mmseqs/mmseqs/mmseqs_profile.index - md5sum: e09d927ca8d4779b7cfb937f435cf7d3 - - path: output/mmseqs/mmseqs/mmseqs_profile.lookup - md5sum: fa898551a6b303614ae6e29c237b7fc6 - - path: output/mmseqs/mmseqs/mmseqs_profile.source - md5sum: 16bef02c30aadbfa8d035596502f0aa2 - - path: output/mmseqs/mmseqs/mmseqs_profile_h - md5sum: 2b2cb13de706b3bb48a38942d851f452 - - path: output/mmseqs/mmseqs/mmseqs_profile_h.dbtype - md5sum: 740bab4f9ec8808aedb68d6b1281aeb2 - - path: output/mmseqs/mmseqs/mmseqs_profile_h.index - md5sum: 0040e6a02964914a87ef1efbe9011cbf - - path: output/mmseqs/mmseqs/mmseqs_seq - md5sum: e6c2c906a7ced527a75c7b175776f0b1 - - path: output/mmseqs/mmseqs/mmseqs_seq.dbtype - md5sum: 4352d88a78aa39750bf70cd6f27bcaa5 - - path: output/mmseqs/mmseqs/mmseqs_seq.index - md5sum: 09f8cf12406b814198156e56f5acd8dc - - path: output/mmseqs/mmseqs/mmseqs_seq.lookup - md5sum: fa898551a6b303614ae6e29c237b7fc6 - - path: output/mmseqs/mmseqs/mmseqs_seq.source - md5sum: 16bef02c30aadbfa8d035596502f0aa2 - - path: output/mmseqs/mmseqs/mmseqs_seq.tsv - md5sum: fcc20038fa951bc085463bb49ffa5e25 - - path: output/mmseqs/mmseqs/mmseqs_seq_h - md5sum: 2b2cb13de706b3bb48a38942d851f452 - - path: output/mmseqs/mmseqs/mmseqs_seq_h.dbtype - md5sum: 740bab4f9ec8808aedb68d6b1281aeb2 - - path: output/mmseqs/mmseqs/mmseqs_seq_h.index - md5sum: 0040e6a02964914a87ef1efbe9011cbf - - path: output/mmseqs/versions.yml