From 258992d6ab8d4457b23b0b9e23d9640c9efaebd3 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Sat, 21 Dec 2024 07:34:16 -0600 Subject: [PATCH] chore: nf-core subworkflows update homer_groseq --- modules.json | 4 +- .../homer/findpeaks/tests/main.nf.test | 44 ++++++++++++++++++- .../homer/findpeaks/tests/main.nf.test.snap | 35 +++++++++++++++ .../nf-core/homer_groseq/tests/main.nf.test | 16 ++++--- .../homer_groseq/tests/main.nf.test.snap | 24 +++++----- 5 files changed, 102 insertions(+), 21 deletions(-) diff --git a/modules.json b/modules.json index fe81c8d6..046bb78f 100644 --- a/modules.json +++ b/modules.json @@ -125,7 +125,7 @@ }, "homer/findpeaks": { "branch": "master", - "git_sha": "b108745a1d59778e21577c217a963e17b8ba9bc2", + "git_sha": "cac282aeb4099300e04b60167a3a12d8c96c4978", "installed_by": ["homer_groseq"] }, "homer/maketagdirectory": { @@ -315,7 +315,7 @@ }, "homer_groseq": { "branch": "master", - "git_sha": "b108745a1d59778e21577c217a963e17b8ba9bc2", + "git_sha": "cac282aeb4099300e04b60167a3a12d8c96c4978", "installed_by": ["subworkflows"] }, "utils_nextflow_pipeline": { diff --git a/modules/nf-core/homer/findpeaks/tests/main.nf.test b/modules/nf-core/homer/findpeaks/tests/main.nf.test index a2263990..a72a0fa5 100644 --- a/modules/nf-core/homer/findpeaks/tests/main.nf.test +++ b/modules/nf-core/homer/findpeaks/tests/main.nf.test @@ -8,6 +8,7 @@ nextflow_process { tag "modules" tag "modules_nfcore" tag "homer" + tag "unzip" tag "homer/findpeaks" tag "homer/maketagdirectory" @@ -27,6 +28,20 @@ nextflow_process { """ } } + run("UNZIP") { + script "../../../unzip/main.nf" + process { + """ + url = 'https://raw.githubusercontent.com/nf-core/test-datasets/nascent/reference/uniqmap.GRCh38_chr21.50nt.zip' + + input[0] = [ + [:], + file(url, checkIfExists: true) + ] + """ + + } + } } test("sarscov2 - tagdir") { @@ -69,6 +84,31 @@ nextflow_process { ) } } - // TODO Test uniqmap. Might need to make a small uniqmap but that could take a day or two. - // See https://github.com/Functional-Genomics-Lab/homer-uniqmap-nf if you're feeling adventurous! + + test("sarscov2 - tagdir - uniqmap") { + + tag "uniqmap" + + when { + process { + """ + input[0] = HOMER_MAKETAGDIRECTORY.out.tagdir + input[1] = UNZIP.out.unzipped_archive.map { it[1] } + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out, + // FIXME These are empty? + path(process.out.txt.get(0).get(1)).readLines()[31], + path(process.out.txt.get(0).get(1)).readLines()[33], + ).match() + } + ) + } + } } \ No newline at end of file diff --git a/modules/nf-core/homer/findpeaks/tests/main.nf.test.snap b/modules/nf-core/homer/findpeaks/tests/main.nf.test.snap index e2a44d5b..c658f18a 100644 --- a/modules/nf-core/homer/findpeaks/tests/main.nf.test.snap +++ b/modules/nf-core/homer/findpeaks/tests/main.nf.test.snap @@ -64,5 +64,40 @@ "nextflow": "24.03.0" }, "timestamp": "2024-05-17T13:56:22.119853182" + }, + "sarscov2 - tagdir - uniqmap": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test-uniqmap.GRCh38_chr21.peaks.txt:md5,d96e7bba4f4fe827a18acae200b422a4" + ] + ], + "1": [ + "versions.yml:md5,12c3e88a3eeb96208a1d352504ebebfa" + ], + "txt": [ + [ + { + "id": "test" + }, + "test-uniqmap.GRCh38_chr21.peaks.txt:md5,d96e7bba4f4fe827a18acae200b422a4" + ] + ], + "versions": [ + "versions.yml:md5,12c3e88a3eeb96208a1d352504ebebfa" + ] + }, + "# uniqMapDirectory = uniqmap.GRCh38_chr21.50nt", + "# cmd = findPeaks test_tagdir -style factor -o test-uniqmap.GRCh38_chr21.peaks.txt -uniqmap uniqmap.GRCh38_chr21.50nt" + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-07T18:32:39.16634" } } \ No newline at end of file diff --git a/subworkflows/nf-core/homer_groseq/tests/main.nf.test b/subworkflows/nf-core/homer_groseq/tests/main.nf.test index 3461de03..48e75981 100644 --- a/subworkflows/nf-core/homer_groseq/tests/main.nf.test +++ b/subworkflows/nf-core/homer_groseq/tests/main.nf.test @@ -72,7 +72,11 @@ nextflow_workflow { ) } } - test("Test files from tutorial") { + + test("Test files from GROseq tutorial with uniqmap") { + + tag "uniqmap" + config "./bed.config" when { @@ -80,11 +84,11 @@ nextflow_workflow { """ input[0] = [ [ id: 'test' ], - file('ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM340nnn/GSM340901/suppl/GSM340901_lib1_aligned.bed.gz', checkIfExists: true), - file('ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM340nnn/GSM340902/suppl/GSM340902_lib2_aligned.bed.gz', checkIfExists: true), + [file('ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM340nnn/GSM340901/suppl/GSM340901_lib1_aligned.bed.gz', checkIfExists: true), + file('ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM340nnn/GSM340902/suppl/GSM340902_lib2_aligned.bed.gz', checkIfExists: true)], ] input[1] = file('https://hgdownload.soe.ucsc.edu/goldenPath/hg18/chromosomes/chr14.fa.gz', checkIfExists: true) - input[2] = [] + input[2] = file('https://raw.githubusercontent.com/nf-core/test-datasets/nascent/reference/uniqmap.GRCh38_chr21.50nt.zip', checkIfExists: true) """ } } @@ -97,14 +101,14 @@ nextflow_workflow { path(workflow.out.bed_graph.get(0).get(1)).linesGzip.size(), workflow.out.peaks, workflow.out.bed, + path(workflow.out.bed.get(0).get(1)).readLines()[30], + path(workflow.out.bed.get(0).get(1)).readLines()[32], path(workflow.out.versions.get(0)).yaml, ).match() }, ) } } - // TODO Test uniqmap - test("sarscov2 - stub") { options "-stub" diff --git a/subworkflows/nf-core/homer_groseq/tests/main.nf.test.snap b/subworkflows/nf-core/homer_groseq/tests/main.nf.test.snap index ecb37fde..61e8eb64 100644 --- a/subworkflows/nf-core/homer_groseq/tests/main.nf.test.snap +++ b/subworkflows/nf-core/homer_groseq/tests/main.nf.test.snap @@ -75,15 +75,15 @@ }, "timestamp": "2024-11-23T20:47:40.376043" }, - "Test files from tutorial": { + "Should run HOMER_GROSEQ with BED input": { "content": [ - 7856998, + 6, [ [ { "id": "test" }, - "test.peaks.txt:md5,312199a96a41f67fe81b91289fefc6e1" + "test.peaks.txt:md5,0b0b174b135fd5404a9b462e27ab4ce1" ] ], [ @@ -91,7 +91,7 @@ { "id": "test" }, - "test.bed:md5,45b36116aa3f75ddd4f655f97ab8dfd6" + "test.bed:md5,0b0b174b135fd5404a9b462e27ab4ce1" ] ], { @@ -104,17 +104,17 @@ "nf-test": "0.9.2", "nextflow": "24.10.1" }, - "timestamp": "2024-11-24T15:36:33.428434" + "timestamp": "2024-11-23T20:47:47.733612" }, - "Should run HOMER_GROSEQ with BED input": { + "Test files from GROseq tutorial with uniqmap": { "content": [ - 6, + 15368354, [ [ { "id": "test" }, - "test.peaks.txt:md5,0b0b174b135fd5404a9b462e27ab4ce1" + "test-uniqmap.GRCh38_chr21.50nt.peaks.txt:md5,3220d07ce56785d77045282345ddf1cd" ] ], [ @@ -122,9 +122,11 @@ { "id": "test" }, - "test.bed:md5,0b0b174b135fd5404a9b462e27ab4ce1" + "test.bed:md5,49433f826697cd237dfdb740a0cb2c54" ] ], + "# uniqMapDirectory = uniqmap.GRCh38_chr21.50nt.zip", + "# cmd = findPeaks test_tagdir -o test-uniqmap.GRCh38_chr21.50nt.peaks.txt -uniqmap uniqmap.GRCh38_chr21.50nt.zip", { "HOMER_GROSEQ:HOMER_POS2BED": { "homer": 4.11 @@ -133,8 +135,8 @@ ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.1" + "nextflow": "24.10.2" }, - "timestamp": "2024-11-23T20:47:47.733612" + "timestamp": "2024-12-07T17:59:14.024175" } } \ No newline at end of file