From cf3ed075695639b0a0924eb0901146df1996dc08 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> Date: Fri, 17 May 2024 15:37:07 +0200 Subject: [PATCH] use conda-forge instead of anaconda (#5626) * use conda-forge instead of anaconda * Update modules/nf-core/homer/maketagdirectory/environment.yml Co-authored-by: Phil Ewels * nf-test homer/findpeaks * nf-test homer/maketagdirectory * nf-test homer/pos2bed * fix perl version? * Update modules/nf-core/gawk/environment.yml Co-authored-by: Phil Ewels * fix gawk --------- Co-authored-by: Phil Ewels --- modules/nf-core/cadd/environment.yml | 2 +- modules/nf-core/gawk/environment.yml | 2 +- modules/nf-core/gawk/main.nf | 4 +- modules/nf-core/gawk/tests/main.nf.test.snap | 16 +- modules/nf-core/homer/findpeaks/main.nf | 13 ++ .../homer/findpeaks/tests/main.nf.test | 73 +++++++ .../homer/findpeaks/tests/main.nf.test.snap | 68 +++++++ .../homer/findpeaks/tests}/nextflow.config | 5 - .../nf-core/homer/findpeaks/tests/tags.yml | 2 + .../homer/maketagdirectory/environment.yml | 2 +- .../homer/maketagdirectory/tests/bed.config | 3 + .../homer/maketagdirectory/tests/main.nf.test | 97 +++++++++ .../maketagdirectory/tests/main.nf.test.snap | 185 ++++++++++++++++++ .../homer/maketagdirectory/tests/sam.config | 3 + .../homer/maketagdirectory/tests/tags.yml | 2 + .../nf-core/homer/pos2bed/tests/main.nf.test | 82 ++++++++ .../homer/pos2bed/tests/main.nf.test.snap | 68 +++++++ .../homer/pos2bed/tests/nextflow.config | 5 + modules/nf-core/homer/pos2bed/tests/tags.yml | 2 + tests/config/pytest_modules.yml | 12 -- tests/modules/nf-core/homer/findpeaks/main.nf | 17 -- .../modules/nf-core/homer/findpeaks/test.yml | 8 - .../nf-core/homer/maketagdirectory/main.nf | 41 ---- .../homer/maketagdirectory/nextflow.config | 13 -- .../nf-core/homer/maketagdirectory/test.yml | 50 ----- tests/modules/nf-core/homer/pos2bed/main.nf | 19 -- .../nf-core/homer/pos2bed/nextflow.config | 9 - tests/modules/nf-core/homer/pos2bed/test.yml | 10 - 28 files changed, 616 insertions(+), 197 deletions(-) create mode 100644 modules/nf-core/homer/findpeaks/tests/main.nf.test create mode 100644 modules/nf-core/homer/findpeaks/tests/main.nf.test.snap rename {tests/modules/nf-core/homer/findpeaks => modules/nf-core/homer/findpeaks/tests}/nextflow.config (59%) create mode 100644 modules/nf-core/homer/findpeaks/tests/tags.yml create mode 100644 modules/nf-core/homer/maketagdirectory/tests/bed.config create mode 100644 modules/nf-core/homer/maketagdirectory/tests/main.nf.test create mode 100644 modules/nf-core/homer/maketagdirectory/tests/main.nf.test.snap create mode 100644 modules/nf-core/homer/maketagdirectory/tests/sam.config create mode 100644 modules/nf-core/homer/maketagdirectory/tests/tags.yml create mode 100644 modules/nf-core/homer/pos2bed/tests/main.nf.test create mode 100644 modules/nf-core/homer/pos2bed/tests/main.nf.test.snap create mode 100644 modules/nf-core/homer/pos2bed/tests/nextflow.config create mode 100644 modules/nf-core/homer/pos2bed/tests/tags.yml delete mode 100644 tests/modules/nf-core/homer/findpeaks/main.nf delete mode 100644 tests/modules/nf-core/homer/findpeaks/test.yml delete mode 100644 tests/modules/nf-core/homer/maketagdirectory/main.nf delete mode 100644 tests/modules/nf-core/homer/maketagdirectory/nextflow.config delete mode 100644 tests/modules/nf-core/homer/maketagdirectory/test.yml delete mode 100644 tests/modules/nf-core/homer/pos2bed/main.nf delete mode 100644 tests/modules/nf-core/homer/pos2bed/nextflow.config delete mode 100644 tests/modules/nf-core/homer/pos2bed/test.yml diff --git a/modules/nf-core/cadd/environment.yml b/modules/nf-core/cadd/environment.yml index 516199ad299..26f170e9ddd 100644 --- a/modules/nf-core/cadd/environment.yml +++ b/modules/nf-core/cadd/environment.yml @@ -5,5 +5,5 @@ channels: - defaults dependencies: - bioconda::cadd-scripts=1.6.post1 - - anaconda::conda=4.14.0 + - conda-forge::conda=4.14.0 - conda-forge::mamba=1.4.0 diff --git a/modules/nf-core/gawk/environment.yml b/modules/nf-core/gawk/environment.yml index 34513c7f4a5..3d98a08b0c8 100644 --- a/modules/nf-core/gawk/environment.yml +++ b/modules/nf-core/gawk/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - anaconda::gawk=5.1.0 + - conda-forge::gawk=5.3.0 diff --git a/modules/nf-core/gawk/main.nf b/modules/nf-core/gawk/main.nf index 578b448c4f6..ca4689297c9 100644 --- a/modules/nf-core/gawk/main.nf +++ b/modules/nf-core/gawk/main.nf @@ -4,8 +4,8 @@ process GAWK { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gawk:5.1.0' : - 'biocontainers/gawk:5.1.0' }" + 'https://depot.galaxyproject.org/singularity/gawk:5.3.0' : + 'biocontainers/gawk:5.3.0' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/gawk/tests/main.nf.test.snap b/modules/nf-core/gawk/tests/main.nf.test.snap index ce207478906..4f3a759c628 100644 --- a/modules/nf-core/gawk/tests/main.nf.test.snap +++ b/modules/nf-core/gawk/tests/main.nf.test.snap @@ -11,7 +11,7 @@ ] ], "1": [ - "versions.yml:md5,4c320d8c98ca80690afd7651da1ba520" + "versions.yml:md5,842acc9870dc8ac280954047cb2aa23a" ], "output": [ [ @@ -22,15 +22,15 @@ ] ], "versions": [ - "versions.yml:md5,4c320d8c98ca80690afd7651da1ba520" + "versions.yml:md5,842acc9870dc8ac280954047cb2aa23a" ] } ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nextflow": "24.03.0" }, - "timestamp": "2024-04-05T11:00:28.097563" + "timestamp": "2024-05-17T15:20:02.495430346" }, "convert fasta to bed": { "content": [ @@ -44,7 +44,7 @@ ] ], "1": [ - "versions.yml:md5,4c320d8c98ca80690afd7651da1ba520" + "versions.yml:md5,842acc9870dc8ac280954047cb2aa23a" ], "output": [ [ @@ -55,14 +55,14 @@ ] ], "versions": [ - "versions.yml:md5,4c320d8c98ca80690afd7651da1ba520" + "versions.yml:md5,842acc9870dc8ac280954047cb2aa23a" ] } ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.02.0" + "nextflow": "24.03.0" }, - "timestamp": "2024-04-05T10:28:15.625869" + "timestamp": "2024-05-17T15:19:53.291809648" } } \ No newline at end of file diff --git a/modules/nf-core/homer/findpeaks/main.nf b/modules/nf-core/homer/findpeaks/main.nf index e70ca74bd87..f18e80d0a22 100644 --- a/modules/nf-core/homer/findpeaks/main.nf +++ b/modules/nf-core/homer/findpeaks/main.nf @@ -34,4 +34,17 @@ process HOMER_FINDPEAKS { homer: $VERSION END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '4.11' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + + """ + touch ${prefix}.peaks.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + homer: $VERSION + END_VERSIONS + """ } diff --git a/modules/nf-core/homer/findpeaks/tests/main.nf.test b/modules/nf-core/homer/findpeaks/tests/main.nf.test new file mode 100644 index 00000000000..4f7e100f13b --- /dev/null +++ b/modules/nf-core/homer/findpeaks/tests/main.nf.test @@ -0,0 +1,73 @@ +nextflow_process { + + name "Test Process HOMER_FINDPEAKS" + script "../main.nf" + process "HOMER_FINDPEAKS" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "homer" + tag "homer/findpeaks" + tag "homer/maketagdirectory" + + setup { + run("HOMER_MAKETAGDIRECTORY") { + script "../../maketagdirectory/main.nf" + process { + """ + input[0] = [ + [ id:'test' ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test2.bed', checkIfExists: true) + ] + ] + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + """ + } + } + + } + + test("sarscov2 - tagdir") { + + when { + process { + """ + input[0] = HOMER_MAKETAGDIRECTORY.out.tagdir + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match("tagdir") } + ) + } + + } + + test("sarscov2 - tagdir - stub") { + + options "-stub" + + when { + process { + """ + input[0] = HOMER_MAKETAGDIRECTORY.out.tagdir + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match("stub") } + ) + } + + } + +} diff --git a/modules/nf-core/homer/findpeaks/tests/main.nf.test.snap b/modules/nf-core/homer/findpeaks/tests/main.nf.test.snap new file mode 100644 index 00000000000..05b9c7862aa --- /dev/null +++ b/modules/nf-core/homer/findpeaks/tests/main.nf.test.snap @@ -0,0 +1,68 @@ +{ + "stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.peaks.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,12c3e88a3eeb96208a1d352504ebebfa" + ], + "txt": [ + [ + { + "id": "test" + }, + "test.peaks.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,12c3e88a3eeb96208a1d352504ebebfa" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.03.0" + }, + "timestamp": "2024-05-17T13:57:52.208349083" + }, + "tagdir": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.peaks.txt:md5,86e15beaa4b439585786478e58418c0c" + ] + ], + "1": [ + "versions.yml:md5,12c3e88a3eeb96208a1d352504ebebfa" + ], + "txt": [ + [ + { + "id": "test" + }, + "test.peaks.txt:md5,86e15beaa4b439585786478e58418c0c" + ] + ], + "versions": [ + "versions.yml:md5,12c3e88a3eeb96208a1d352504ebebfa" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.03.0" + }, + "timestamp": "2024-05-17T13:56:22.119853182" + } +} \ No newline at end of file diff --git a/tests/modules/nf-core/homer/findpeaks/nextflow.config b/modules/nf-core/homer/findpeaks/tests/nextflow.config similarity index 59% rename from tests/modules/nf-core/homer/findpeaks/nextflow.config rename to modules/nf-core/homer/findpeaks/tests/nextflow.config index 9a921a3c96f..67a4a3f1cd4 100644 --- a/tests/modules/nf-core/homer/findpeaks/nextflow.config +++ b/modules/nf-core/homer/findpeaks/tests/nextflow.config @@ -1,13 +1,8 @@ process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: HOMER_MAKETAGDIRECTORY { ext.args = '-format bed' } - withName: HOMER_FINDPEAKS { ext.args = '-style factor' } - } diff --git a/modules/nf-core/homer/findpeaks/tests/tags.yml b/modules/nf-core/homer/findpeaks/tests/tags.yml new file mode 100644 index 00000000000..00f92a75afa --- /dev/null +++ b/modules/nf-core/homer/findpeaks/tests/tags.yml @@ -0,0 +1,2 @@ +homer/findpeaks: + - "modules/nf-core/homer/findpeaks/**" diff --git a/modules/nf-core/homer/maketagdirectory/environment.yml b/modules/nf-core/homer/maketagdirectory/environment.yml index 6a32f8e632d..c3ad2cc9db4 100644 --- a/modules/nf-core/homer/maketagdirectory/environment.yml +++ b/modules/nf-core/homer/maketagdirectory/environment.yml @@ -9,4 +9,4 @@ dependencies: - conda-forge::r-base=4.0.2 - bioconda::bioconductor-deseq2=1.30.0 - bioconda::bioconductor-edger=3.32.0 - - anaconda::perl=5.26.2 + - conda-forge::perl=5.26.2 diff --git a/modules/nf-core/homer/maketagdirectory/tests/bed.config b/modules/nf-core/homer/maketagdirectory/tests/bed.config new file mode 100644 index 00000000000..9feb726531a --- /dev/null +++ b/modules/nf-core/homer/maketagdirectory/tests/bed.config @@ -0,0 +1,3 @@ +process { + ext.args = '-format bed' +} diff --git a/modules/nf-core/homer/maketagdirectory/tests/main.nf.test b/modules/nf-core/homer/maketagdirectory/tests/main.nf.test new file mode 100644 index 00000000000..6bf570b6940 --- /dev/null +++ b/modules/nf-core/homer/maketagdirectory/tests/main.nf.test @@ -0,0 +1,97 @@ +nextflow_process { + + name "Test Process HOMER_MAKETAGDIRECTORY" + script "../main.nf" + process "HOMER_MAKETAGDIRECTORY" + + tag "modules" + tag "modules_nfcore" + tag "homer" + tag "homer/maketagdirectory" + + test("sarscov2 - [bed, bed], fasta") { + + config "./bed.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test2.bed', checkIfExists: true) + ] + ] + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match("bed") } + ) + } + + } + + test("sarscov2 - [bam, bam], fasta") { + + config "./sam.config" + + when { + process { + """ + input[0] = [ + [ id:'test' ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.single_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) + ] + ] + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match("bam") } + ) + } + + } + + test("sarscov2 - [bed, bed], fasta - stub") { + + config "./bed.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test2.bed', checkIfExists: true) + ] + ] + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match("stub") } + ) + } + + } + +} diff --git a/modules/nf-core/homer/maketagdirectory/tests/main.nf.test.snap b/modules/nf-core/homer/maketagdirectory/tests/main.nf.test.snap new file mode 100644 index 00000000000..72349e2205c --- /dev/null +++ b/modules/nf-core/homer/maketagdirectory/tests/main.nf.test.snap @@ -0,0 +1,185 @@ +{ + "bed": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "MT192765.1.tags.tsv:md5,e29522171ca2169b57396495f8b97485", + "tagAutocorrelation.txt:md5,62b107c4971b94126fb89a0bc2800455", + "tagCountDistribution.txt:md5,fd4ee7ce7c5dfd7c9d739534b8180578", + "tagInfo.txt:md5,c9bb2ca53bb101d74c1ec92d2b0ad26e", + "tagLengthDistribution.txt:md5,e5aa2b9843ca9c04ace297280aed6af4" + ] + ] + ], + "1": [ + [ + { + "id": "test" + }, + "tagInfo.txt:md5,c9bb2ca53bb101d74c1ec92d2b0ad26e" + ] + ], + "2": [ + "versions.yml:md5,59961acdd0fec163cc57095a1b058c31" + ], + "tagdir": [ + [ + { + "id": "test" + }, + [ + "MT192765.1.tags.tsv:md5,e29522171ca2169b57396495f8b97485", + "tagAutocorrelation.txt:md5,62b107c4971b94126fb89a0bc2800455", + "tagCountDistribution.txt:md5,fd4ee7ce7c5dfd7c9d739534b8180578", + "tagInfo.txt:md5,c9bb2ca53bb101d74c1ec92d2b0ad26e", + "tagLengthDistribution.txt:md5,e5aa2b9843ca9c04ace297280aed6af4" + ] + ] + ], + "taginfo": [ + [ + { + "id": "test" + }, + "tagInfo.txt:md5,c9bb2ca53bb101d74c1ec92d2b0ad26e" + ] + ], + "versions": [ + "versions.yml:md5,59961acdd0fec163cc57095a1b058c31" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.03.0" + }, + "timestamp": "2024-05-17T14:25:33.3566233" + }, + "stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "MT192765.1.tags.tsv:md5,e29522171ca2169b57396495f8b97485", + "tagAutocorrelation.txt:md5,62b107c4971b94126fb89a0bc2800455", + "tagCountDistribution.txt:md5,fd4ee7ce7c5dfd7c9d739534b8180578", + "tagInfo.txt:md5,c9bb2ca53bb101d74c1ec92d2b0ad26e", + "tagLengthDistribution.txt:md5,e5aa2b9843ca9c04ace297280aed6af4" + ] + ] + ], + "1": [ + [ + { + "id": "test" + }, + "tagInfo.txt:md5,c9bb2ca53bb101d74c1ec92d2b0ad26e" + ] + ], + "2": [ + "versions.yml:md5,59961acdd0fec163cc57095a1b058c31" + ], + "tagdir": [ + [ + { + "id": "test" + }, + [ + "MT192765.1.tags.tsv:md5,e29522171ca2169b57396495f8b97485", + "tagAutocorrelation.txt:md5,62b107c4971b94126fb89a0bc2800455", + "tagCountDistribution.txt:md5,fd4ee7ce7c5dfd7c9d739534b8180578", + "tagInfo.txt:md5,c9bb2ca53bb101d74c1ec92d2b0ad26e", + "tagLengthDistribution.txt:md5,e5aa2b9843ca9c04ace297280aed6af4" + ] + ] + ], + "taginfo": [ + [ + { + "id": "test" + }, + "tagInfo.txt:md5,c9bb2ca53bb101d74c1ec92d2b0ad26e" + ] + ], + "versions": [ + "versions.yml:md5,59961acdd0fec163cc57095a1b058c31" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.03.0" + }, + "timestamp": "2024-05-17T14:25:52.525282663" + }, + "bam": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "MT192765.1.tags.tsv:md5,365808c4751ef6dd7085ac52037a22bc", + "tagAutocorrelation.txt:md5,8b396f2aef1cdd3af4fab57b142d3250", + "tagCountDistribution.txt:md5,afc6d007096c3872bbe84c9dc8edb832", + "tagInfo.txt:md5,aebf6ff15fd0a238ee6a94d623c578ca", + "tagLengthDistribution.txt:md5,44f231adb2a705ae81950808c55cf248" + ] + ] + ], + "1": [ + [ + { + "id": "test" + }, + "tagInfo.txt:md5,aebf6ff15fd0a238ee6a94d623c578ca" + ] + ], + "2": [ + "versions.yml:md5,59961acdd0fec163cc57095a1b058c31" + ], + "tagdir": [ + [ + { + "id": "test" + }, + [ + "MT192765.1.tags.tsv:md5,365808c4751ef6dd7085ac52037a22bc", + "tagAutocorrelation.txt:md5,8b396f2aef1cdd3af4fab57b142d3250", + "tagCountDistribution.txt:md5,afc6d007096c3872bbe84c9dc8edb832", + "tagInfo.txt:md5,aebf6ff15fd0a238ee6a94d623c578ca", + "tagLengthDistribution.txt:md5,44f231adb2a705ae81950808c55cf248" + ] + ] + ], + "taginfo": [ + [ + { + "id": "test" + }, + "tagInfo.txt:md5,aebf6ff15fd0a238ee6a94d623c578ca" + ] + ], + "versions": [ + "versions.yml:md5,59961acdd0fec163cc57095a1b058c31" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.03.0" + }, + "timestamp": "2024-05-17T14:28:11.567501705" + } +} \ No newline at end of file diff --git a/modules/nf-core/homer/maketagdirectory/tests/sam.config b/modules/nf-core/homer/maketagdirectory/tests/sam.config new file mode 100644 index 00000000000..1299a296a87 --- /dev/null +++ b/modules/nf-core/homer/maketagdirectory/tests/sam.config @@ -0,0 +1,3 @@ +process { + ext.args = "-format sam" +} \ No newline at end of file diff --git a/modules/nf-core/homer/maketagdirectory/tests/tags.yml b/modules/nf-core/homer/maketagdirectory/tests/tags.yml new file mode 100644 index 00000000000..41f7d644ba0 --- /dev/null +++ b/modules/nf-core/homer/maketagdirectory/tests/tags.yml @@ -0,0 +1,2 @@ +homer/maketagdirectory: + - "modules/nf-core/homer/maketagdirectory/**" diff --git a/modules/nf-core/homer/pos2bed/tests/main.nf.test b/modules/nf-core/homer/pos2bed/tests/main.nf.test new file mode 100644 index 00000000000..906d5719e5b --- /dev/null +++ b/modules/nf-core/homer/pos2bed/tests/main.nf.test @@ -0,0 +1,82 @@ +nextflow_process { + + name "Test Process HOMER_POS2BED" + script "../main.nf" + process "HOMER_POS2BED" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "homer" + tag "homer/pos2bed" + tag "homer/findpeaks" + tag "homer/maketagdirectory" + + setup { + run("HOMER_MAKETAGDIRECTORY") { + script "../../maketagdirectory/main.nf" + process { + """ + input[0] = [ + [ id:'test' ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test2.bed', checkIfExists: true) + ] + ] + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + """ + } + } + + run("HOMER_FINDPEAKS") { + script "../../findpeaks/main.nf" + process { + """ + input[0] = HOMER_MAKETAGDIRECTORY.out.tagdir + """ + } + } + } + + test("sarscov2 - peaks") { + + when { + process { + """ + input[0] = HOMER_FINDPEAKS.out.txt + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match("peaks") } + ) + } + + } + + test("sarscov2 - peaks - stub") { + + options "-stub" + + when { + process { + """ + input[0] = HOMER_FINDPEAKS.out.txt + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match("stub") } + ) + } + + } + +} diff --git a/modules/nf-core/homer/pos2bed/tests/main.nf.test.snap b/modules/nf-core/homer/pos2bed/tests/main.nf.test.snap new file mode 100644 index 00000000000..8ae3948ebf7 --- /dev/null +++ b/modules/nf-core/homer/pos2bed/tests/main.nf.test.snap @@ -0,0 +1,68 @@ +{ + "stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.bed:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,19077eb73823974278868e3e7930d3f6" + ], + "bed": [ + [ + { + "id": "test" + }, + "test.bed:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,19077eb73823974278868e3e7930d3f6" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.03.0" + }, + "timestamp": "2024-05-17T14:35:47.996620099" + }, + "peaks": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.bed:md5,5d6ddd9c7e621a66f6f045b9b5abecb4" + ] + ], + "1": [ + "versions.yml:md5,19077eb73823974278868e3e7930d3f6" + ], + "bed": [ + [ + { + "id": "test" + }, + "test.bed:md5,5d6ddd9c7e621a66f6f045b9b5abecb4" + ] + ], + "versions": [ + "versions.yml:md5,19077eb73823974278868e3e7930d3f6" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.03.0" + }, + "timestamp": "2024-05-17T14:35:30.500600143" + } +} \ No newline at end of file diff --git a/modules/nf-core/homer/pos2bed/tests/nextflow.config b/modules/nf-core/homer/pos2bed/tests/nextflow.config new file mode 100644 index 00000000000..9d683050c4b --- /dev/null +++ b/modules/nf-core/homer/pos2bed/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: HOMER_MAKETAGDIRECTORY { + ext.args = '-format bed' + } +} diff --git a/modules/nf-core/homer/pos2bed/tests/tags.yml b/modules/nf-core/homer/pos2bed/tests/tags.yml new file mode 100644 index 00000000000..5fb217da403 --- /dev/null +++ b/modules/nf-core/homer/pos2bed/tests/tags.yml @@ -0,0 +1,2 @@ +homer/pos2bed: + - "modules/nf-core/homer/pos2bed/**" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 148ddfa1926..74f7fefdb15 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -852,21 +852,9 @@ hmtnote/annotate: homer/annotatepeaks: - modules/nf-core/homer/annotatepeaks/** - tests/modules/nf-core/homer/annotatepeaks/** -homer/findpeaks: - - modules/nf-core/homer/findpeaks/** - - modules/nf-core/homer/maketagdirectory/** - - tests/modules/nf-core/homer/findpeaks/** -homer/maketagdirectory: - - modules/nf-core/homer/maketagdirectory/** - - tests/modules/nf-core/homer/maketagdirectory/** homer/makeucscfile: - modules/nf-core/homer/makeucscfile/** - tests/modules/nf-core/homer/makeucscfile/** -homer/pos2bed: - - modules/nf-core/homer/pos2bed/** - - modules/nf-core/homer/maketagdirectory/** - - modules/nf-core/homer/findpeaks/** - - tests/modules/nf-core/homer/pos2bed/** hpsuissero: - modules/nf-core/hpsuissero/** - tests/modules/nf-core/hpsuissero/** diff --git a/tests/modules/nf-core/homer/findpeaks/main.nf b/tests/modules/nf-core/homer/findpeaks/main.nf deleted file mode 100644 index 2e9002bd6c7..00000000000 --- a/tests/modules/nf-core/homer/findpeaks/main.nf +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { HOMER_MAKETAGDIRECTORY } from '../../../../../modules/nf-core/homer/maketagdirectory/main.nf' -include { HOMER_FINDPEAKS } from '../../../../../modules/nf-core/homer/findpeaks/main.nf' - -workflow test_homer_findpeaks { - input = [[id:'test'], - [file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true), - file(params.test_data['sarscov2']['genome']['test2_bed'], checkIfExists: true)]] - fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - - HOMER_MAKETAGDIRECTORY (input, fasta) - HOMER_FINDPEAKS ( HOMER_MAKETAGDIRECTORY.out.tagdir ) -} - diff --git a/tests/modules/nf-core/homer/findpeaks/test.yml b/tests/modules/nf-core/homer/findpeaks/test.yml deleted file mode 100644 index efd55b38289..00000000000 --- a/tests/modules/nf-core/homer/findpeaks/test.yml +++ /dev/null @@ -1,8 +0,0 @@ -- name: homer findpeaks - command: nextflow run ./tests/modules/nf-core/homer/findpeaks -entry test_homer_findpeaks -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/homer/findpeaks/nextflow.config - tags: - - homer - - homer/findpeaks - files: - - path: output/homer/test.peaks.txt - md5sum: 86e15beaa4b439585786478e58418c0c diff --git a/tests/modules/nf-core/homer/maketagdirectory/main.nf b/tests/modules/nf-core/homer/maketagdirectory/main.nf deleted file mode 100644 index 1359fa5430c..00000000000 --- a/tests/modules/nf-core/homer/maketagdirectory/main.nf +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { - HOMER_MAKETAGDIRECTORY as HOMER_MAKETAGDIRECTORY_BED - HOMER_MAKETAGDIRECTORY as HOMER_MAKETAGDIRECTORY_BAM -} from '../../../../../modules/nf-core/homer/maketagdirectory/main.nf' - -workflow test_homer_maketagdirectory_bed { - input = [[id:'test'], - [file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true), - file(params.test_data['sarscov2']['genome']['test2_bed'], checkIfExists: true)]] - fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - - HOMER_MAKETAGDIRECTORY_BED (input, fasta) -} - - -workflow test_homer_maketagdirectory_meta { - input = - [[[ id:'test1'], - [file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)]], - [[ id:'test2'], - [file(params.test_data['sarscov2']['genome']['test2_bed'], checkIfExists: true)]]] - - fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - - meta_input = [[id: 'meta_test']] + [ input.collect{it[1]}.flatten() ] - - HOMER_MAKETAGDIRECTORY_BED (meta_input, fasta) -} - -workflow test_homer_maketagdirectory_bam { - input = [[id:'test'], - [file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)]] - fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - - HOMER_MAKETAGDIRECTORY_BAM (input, fasta) -} diff --git a/tests/modules/nf-core/homer/maketagdirectory/nextflow.config b/tests/modules/nf-core/homer/maketagdirectory/nextflow.config deleted file mode 100644 index 9d7a3f9f574..00000000000 --- a/tests/modules/nf-core/homer/maketagdirectory/nextflow.config +++ /dev/null @@ -1,13 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: HOMER_MAKETAGDIRECTORY_BED { - ext.args = '-format bed' - } - - withName: HOMER_MAKETAGDIRECTORY_BAM { - ext.args = '-format sam' - } - -} diff --git a/tests/modules/nf-core/homer/maketagdirectory/test.yml b/tests/modules/nf-core/homer/maketagdirectory/test.yml deleted file mode 100644 index f4b40bdfe93..00000000000 --- a/tests/modules/nf-core/homer/maketagdirectory/test.yml +++ /dev/null @@ -1,50 +0,0 @@ -- name: homer maketagdirectory bed - command: nextflow run ./tests/modules/nf-core/homer/maketagdirectory -entry test_homer_maketagdirectory_bed -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/homer/maketagdirectory/nextflow.config - tags: - - homer - - homer/maketagdirectory - files: - - path: output/homer/test_tagdir/MT192765.1.tags.tsv - md5sum: e29522171ca2169b57396495f8b97485 - - path: output/homer/test_tagdir/tagAutocorrelation.txt - md5sum: 62b107c4971b94126fb89a0bc2800455 - - path: output/homer/test_tagdir/tagCountDistribution.txt - md5sum: fd4ee7ce7c5dfd7c9d739534b8180578 - - path: output/homer/test_tagdir/tagInfo.txt - md5sum: c9bb2ca53bb101d74c1ec92d2b0ad26e - - path: output/homer/test_tagdir/tagLengthDistribution.txt - md5sum: e5aa2b9843ca9c04ace297280aed6af4 - -- name: homer maketagdirectory meta - command: nextflow run ./tests/modules/nf-core/homer/maketagdirectory -entry test_homer_maketagdirectory_meta -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/homer/maketagdirectory/nextflow.config - tags: - - homer - - homer/maketagdirectory - files: - - path: output/homer/meta_test_tagdir/MT192765.1.tags.tsv - md5sum: e29522171ca2169b57396495f8b97485 - - path: output/homer/meta_test_tagdir/tagAutocorrelation.txt - md5sum: 62b107c4971b94126fb89a0bc2800455 - - path: output/homer/meta_test_tagdir/tagCountDistribution.txt - md5sum: fd4ee7ce7c5dfd7c9d739534b8180578 - - path: output/homer/meta_test_tagdir/tagInfo.txt - md5sum: cb907ebf9afc042bb61196d624e793c8 - - path: output/homer/meta_test_tagdir/tagLengthDistribution.txt - md5sum: e5aa2b9843ca9c04ace297280aed6af4 - -- name: homer maketagdirectory bam - command: nextflow run ./tests/modules/nf-core/homer/maketagdirectory -entry test_homer_maketagdirectory_bam -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/homer/maketagdirectory/nextflow.config - tags: - - homer - - homer/maketagdirectory - files: - - path: output/homer/test_tagdir/MT192765.1.tags.tsv - md5sum: 365808c4751ef6dd7085ac52037a22bc - - path: output/homer/test_tagdir/tagAutocorrelation.txt - md5sum: 8b396f2aef1cdd3af4fab57b142d3250 - - path: output/homer/test_tagdir/tagCountDistribution.txt - md5sum: afc6d007096c3872bbe84c9dc8edb832 - - path: output/homer/test_tagdir/tagInfo.txt - md5sum: aebf6ff15fd0a238ee6a94d623c578ca - - path: output/homer/test_tagdir/tagLengthDistribution.txt - md5sum: 44f231adb2a705ae81950808c55cf248 diff --git a/tests/modules/nf-core/homer/pos2bed/main.nf b/tests/modules/nf-core/homer/pos2bed/main.nf deleted file mode 100644 index 4eb9269541d..00000000000 --- a/tests/modules/nf-core/homer/pos2bed/main.nf +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { HOMER_MAKETAGDIRECTORY } from '../../../../../modules/nf-core/homer/maketagdirectory/main.nf' -include { HOMER_FINDPEAKS } from '../../../../../modules/nf-core/homer/findpeaks/main.nf' -include { HOMER_POS2BED } from '../../../../../modules/nf-core/homer/pos2bed/main.nf' - -workflow test_homer_pos2bed { - input = [[id:'test'], - [file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true), - file(params.test_data['sarscov2']['genome']['test2_bed'], checkIfExists: true)]] - fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - - HOMER_MAKETAGDIRECTORY (input, fasta) - HOMER_FINDPEAKS ( HOMER_MAKETAGDIRECTORY.out.tagdir ) - - HOMER_POS2BED ( HOMER_FINDPEAKS.out.txt ) -} diff --git a/tests/modules/nf-core/homer/pos2bed/nextflow.config b/tests/modules/nf-core/homer/pos2bed/nextflow.config deleted file mode 100644 index a4c88475fca..00000000000 --- a/tests/modules/nf-core/homer/pos2bed/nextflow.config +++ /dev/null @@ -1,9 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: HOMER_MAKETAGDIRECTORY { - ext.args = '-format bed' - } - -} diff --git a/tests/modules/nf-core/homer/pos2bed/test.yml b/tests/modules/nf-core/homer/pos2bed/test.yml deleted file mode 100644 index 68ee9192cee..00000000000 --- a/tests/modules/nf-core/homer/pos2bed/test.yml +++ /dev/null @@ -1,10 +0,0 @@ -- name: "homer pos2bed" - command: nextflow run ./tests/modules/nf-core/homer/pos2bed -entry test_homer_pos2bed -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/homer/pos2bed/nextflow.config - tags: - - "homer" - - "homer/pos2bed" - files: - - path: output/homer/test.bed - md5sum: 5d6ddd9c7e621a66f6f045b9b5abecb4 - - path: output/homer/versions.yml - md5sum: 1485f4b2d76484e8fe3310e2505de2fd