From ed6e7437c3109383cd574e478f12649dd44ec29a Mon Sep 17 00:00:00 2001 From: Adam Talbot Date: Fri, 30 Jun 2023 17:09:57 +0100 Subject: [PATCH 01/10] snakemake: Add module --- modules/nf-core/snakemake/main.nf | 51 ++++++++++++++++ modules/nf-core/snakemake/meta.yml | 60 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/nf-core/snakemake/Snakefile | 6 ++ tests/modules/nf-core/snakemake/main.nf | 37 ++++++++++++ .../modules/nf-core/snakemake/nextflow.config | 8 +++ tests/modules/nf-core/snakemake/test.yml | 10 ++++ 7 files changed, 176 insertions(+) create mode 100644 modules/nf-core/snakemake/main.nf create mode 100644 modules/nf-core/snakemake/meta.yml create mode 100644 tests/modules/nf-core/snakemake/Snakefile create mode 100644 tests/modules/nf-core/snakemake/main.nf create mode 100644 tests/modules/nf-core/snakemake/nextflow.config create mode 100644 tests/modules/nf-core/snakemake/test.yml diff --git a/modules/nf-core/snakemake/main.nf b/modules/nf-core/snakemake/main.nf new file mode 100644 index 00000000000..358394b45b4 --- /dev/null +++ b/modules/nf-core/snakemake/main.nf @@ -0,0 +1,51 @@ +process SNAKEMAKE { + tag "$meta.id" + label 'process_low' + + // You will have to add all modules to this Conda definition and + // replace the container definition for one that suits your needs + conda "bioconda::snakemake=7.30.1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/snakemake:7.30.1--hdfd78af_0' : + 'biocontainers/snakemake:7.30.1--hdfd78af_0' }" + + input: + tuple val(meta), path(inputs) + tuple val(meta2), path(snakemake) + + output: + tuple val(meta), path("**[.snakemake]") , emit: outputs + tuple val(meta), path(".snakemake", type: 'dir', hidden: true), emit: snakemake_dir + 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}" + """ + snakemake \\ + $args \\ + --snakefile $snakemake + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + snakemake: \$(snakemake --version) + END_VERSIONS + """ + + stub: + """ + snakemake \\ + $args \\ + --snakefile $snakemake \\ + --cores ${task.cores} \\ + --dry-run + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + snakemake: \$(snakemake --version) + END_VERSIONS + """ +} diff --git a/modules/nf-core/snakemake/meta.yml b/modules/nf-core/snakemake/meta.yml new file mode 100644 index 00000000000..afad2811ce0 --- /dev/null +++ b/modules/nf-core/snakemake/meta.yml @@ -0,0 +1,60 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json +name: "snakemake" +description: The Snakemake workflow management system is a tool to create reproducible and scalable data analyses. This module runs a simple Snakemake pipeline based on input snakefile. Expect severe limitations." +keywords: + - snakemake + - workflow + - workflow_mode +tools: + - "snakemake": + description: "A popular workflow management system aiming at full in-silico reproducibility." + homepage: "https://snakemake.readthedocs.io/en/stable/" + documentation: "https://snakemake.readthedocs.io/en/stable/" + tool_dev_url: "https://github.com/snakemake/snakemake" + doi: "10.1093/bioinformatics/bty350" + licence: "['MIT']" + +input: + # Only when we have meta + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Any input file required by Snakemake + pattern: "*" + - meta2: + type: map + description: | + Meta information for Snakefile + e.g. [ id: 'snakefile' ] + - snakefile: + type: file + description: | + Snakefile to use with Snakemake. This is required for proper execution of Snakemake. + +output: + #Only when we have meta + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - outputs: + type: file + description: | + Any file generated by Snakemake, excluding the inputs, hidden files and Snakemake log directory (.snakemake). + - snakemake_dir: + type: directory + description: | + Snakemake log directory (.snakemake). Can be used to capture logs of Snakemake execution. + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@adamrtalbot" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 39a14960902..2f27c552f76 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -3412,6 +3412,10 @@ smoove/call: - modules/nf-core/smoove/call/** - tests/modules/nf-core/smoove/call/** +snakemake: + - modules/nf-core/snakemake/** + - tests/modules/nf-core/snakemake/** + snapaligner/align: - modules/nf-core/snapaligner/align/** - tests/modules/nf-core/snapaligner/align/** diff --git a/tests/modules/nf-core/snakemake/Snakefile b/tests/modules/nf-core/snakemake/Snakefile new file mode 100644 index 00000000000..bd8c98ec850 --- /dev/null +++ b/tests/modules/nf-core/snakemake/Snakefile @@ -0,0 +1,6 @@ +rule all: + input: "hello.txt" + +rule hello_world: + output: "hello.txt" + shell: "echo Hello World > hello.txt" diff --git a/tests/modules/nf-core/snakemake/main.nf b/tests/modules/nf-core/snakemake/main.nf new file mode 100644 index 00000000000..68f96cd4690 --- /dev/null +++ b/tests/modules/nf-core/snakemake/main.nf @@ -0,0 +1,37 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SNAKEMAKE } from '../../../../modules/nf-core/snakemake/main.nf' + +workflow test_snakemake { + + input = [ + [ id: 'input'], + [] + ] + +// This generates a Snakefile for use with Snakemake. +// In real use, you should probably access this via a +// a file stored within the repository. + Channel.of(''' +rule all: + input: "hello.txt" + +rule hello_world: + output: "hello.txt" + shell: "echo Hello World > hello.txt" + +''' + ) + .collectFile(name: 'Snakefile') + .map { file -> + [ + [id: 'Snakefile'], + file + ]} + .set{ snakefile } + snakefile.view() + + SNAKEMAKE ( input, snakefile) +} diff --git a/tests/modules/nf-core/snakemake/nextflow.config b/tests/modules/nf-core/snakemake/nextflow.config new file mode 100644 index 00000000000..afd291fcffb --- /dev/null +++ b/tests/modules/nf-core/snakemake/nextflow.config @@ -0,0 +1,8 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: "SNAKEMAKE" { + ext.args = { "--cores ${task.cpus}" } + } + +} diff --git a/tests/modules/nf-core/snakemake/test.yml b/tests/modules/nf-core/snakemake/test.yml new file mode 100644 index 00000000000..4d23d8e57bb --- /dev/null +++ b/tests/modules/nf-core/snakemake/test.yml @@ -0,0 +1,10 @@ +- name: snakemake test_snakemake + command: nextflow run ./tests/modules/nf-core/snakemake -entry test_snakemake -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/snakemake/nextflow.config + tags: + - snakemake + files: + - path: output/snakemake/.snakemake/ + - path: output/snakemake/.snakemake/ + - path: output/snakemake/hello.txt + md5sum: e59ff97941044f85df5297e1c302d260 + - path: output/snakemake/versions.yml From ddbf1d13d66dd5b3abb9c322bfd164fd492d08e8 Mon Sep 17 00:00:00 2001 From: Adam Talbot Date: Fri, 30 Jun 2023 17:22:32 +0100 Subject: [PATCH 02/10] snakemake: Updates to testing and modules. --- modules/nf-core/snakemake/main.nf | 11 ++++++++--- modules/nf-core/snakemake/meta.yml | 4 ++-- tests/modules/nf-core/snakemake/main.nf | 1 - tests/modules/nf-core/snakemake/nextflow.config | 3 --- tests/modules/nf-core/snakemake/test.yml | 9 ++++++++- 5 files changed, 18 insertions(+), 10 deletions(-) diff --git a/modules/nf-core/snakemake/main.nf b/modules/nf-core/snakemake/main.nf index 358394b45b4..54157124a33 100644 --- a/modules/nf-core/snakemake/main.nf +++ b/modules/nf-core/snakemake/main.nf @@ -14,7 +14,7 @@ process SNAKEMAKE { tuple val(meta2), path(snakemake) output: - tuple val(meta), path("**[.snakemake]") , emit: outputs + tuple val(meta), path("**[!.snakemake]"), optional: true , emit: outputs tuple val(meta), path(".snakemake", type: 'dir', hidden: true), emit: snakemake_dir path "versions.yml" , emit: versions @@ -22,11 +22,13 @@ process SNAKEMAKE { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' + def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def cores = task.cpus ? "--cores ${task.cpus}" : "--cores all" """ snakemake \\ $args \\ + $cores \\ --snakefile $snakemake cat <<-END_VERSIONS > versions.yml @@ -36,11 +38,14 @@ process SNAKEMAKE { """ stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def cores = task.cpus ? "--cores ${task.cpus}" : "--cores all" """ snakemake \\ $args \\ --snakefile $snakemake \\ - --cores ${task.cores} \\ + $cores \\ --dry-run cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/snakemake/meta.yml b/modules/nf-core/snakemake/meta.yml index afad2811ce0..03da2bfaa2f 100644 --- a/modules/nf-core/snakemake/meta.yml +++ b/modules/nf-core/snakemake/meta.yml @@ -1,7 +1,7 @@ --- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: "snakemake" -description: The Snakemake workflow management system is a tool to create reproducible and scalable data analyses. This module runs a simple Snakemake pipeline based on input snakefile. Expect severe limitations." +description: The Snakemake workflow management system is a tool to create reproducible and scalable data analyses. This module runs a simple Snakemake pipeline based on input snakefile. Expect many limitations." keywords: - snakemake - workflow @@ -46,7 +46,7 @@ output: - outputs: type: file description: | - Any file generated by Snakemake, excluding the inputs, hidden files and Snakemake log directory (.snakemake). + Any file generated by Snakemake, excluding the inputs, hidden files and Snakemake log directory (.snakemake). This is set to optional because Snakemake can be used to run arbitrary commands, and we cannot know what files will be generated. - snakemake_dir: type: directory description: | diff --git a/tests/modules/nf-core/snakemake/main.nf b/tests/modules/nf-core/snakemake/main.nf index 68f96cd4690..1b65740d8d9 100644 --- a/tests/modules/nf-core/snakemake/main.nf +++ b/tests/modules/nf-core/snakemake/main.nf @@ -31,7 +31,6 @@ rule hello_world: file ]} .set{ snakefile } - snakefile.view() SNAKEMAKE ( input, snakefile) } diff --git a/tests/modules/nf-core/snakemake/nextflow.config b/tests/modules/nf-core/snakemake/nextflow.config index afd291fcffb..8730f1c4b93 100644 --- a/tests/modules/nf-core/snakemake/nextflow.config +++ b/tests/modules/nf-core/snakemake/nextflow.config @@ -1,8 +1,5 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: "SNAKEMAKE" { - ext.args = { "--cores ${task.cpus}" } - } } diff --git a/tests/modules/nf-core/snakemake/test.yml b/tests/modules/nf-core/snakemake/test.yml index 4d23d8e57bb..fc6e9427fbb 100644 --- a/tests/modules/nf-core/snakemake/test.yml +++ b/tests/modules/nf-core/snakemake/test.yml @@ -3,8 +3,15 @@ tags: - snakemake files: - - path: output/snakemake/.snakemake/ - path: output/snakemake/.snakemake/ - path: output/snakemake/hello.txt md5sum: e59ff97941044f85df5297e1c302d260 - path: output/snakemake/versions.yml + +- name: snakemake test_snakemake_stub + command: nextflow run ./tests/modules/nf-core/snakemake -entry test_snakemake -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/snakemake/nextflow.config -stub + tags: + - snakemake + files: + - path: output/snakemake/.snakemake/ + - path: output/snakemake/versions.yml From 5dd6f6ad43782e115dfca5b009719ae8a3d64c5e Mon Sep 17 00:00:00 2001 From: Adam Talbot Date: Mon, 31 Jul 2023 10:05:16 +0100 Subject: [PATCH 03/10] Add Snakemake nf-test --- tests/config/nftest_modules.yml | 4 ++ tests/modules/nf-core/snakemake/main.nf.test | 48 ++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 tests/modules/nf-core/snakemake/main.nf.test diff --git a/tests/config/nftest_modules.yml b/tests/config/nftest_modules.yml index 33e3e2046d9..bfb4bc98182 100644 --- a/tests/config/nftest_modules.yml +++ b/tests/config/nftest_modules.yml @@ -1,3 +1,7 @@ fastqc: - modules/nf-core/fastqc/** - tests/modules/nf-core/fastqc/** + +snakemake: + - modules/nf-core/snakemake/** + - tests/modules/nf-core/snakemake/** diff --git a/tests/modules/nf-core/snakemake/main.nf.test b/tests/modules/nf-core/snakemake/main.nf.test new file mode 100644 index 00000000000..60b6064e536 --- /dev/null +++ b/tests/modules/nf-core/snakemake/main.nf.test @@ -0,0 +1,48 @@ +nextflow_process { + + name "Test Process SNAKEMAKE" + script "modules/nf-core/snakemake/main.nf" + process "SNAKEMAKE" + + test("Should run without failures") { + + when { + process { + """ + // Input file + input[0] = [ + [ id: 'input'], + [] + ] +// Snakefile + Channel.of(''' +rule all: + input: "hello.txt" + +rule hello_world: + output: "hello.txt" + shell: "echo Hello World > hello.txt" + +''' + ) + .collectFile(name: 'Snakefile') + .map { file -> + [ + [id: 'Snakefile'], + file + ]} + .set{ snakefile } + + input[1] = snakefile + """ + } + } + + then { + assert process.success + // assert snapshot(process.out).match() + } + + } + +} From 7ecc4206e058f0df05656e1ebffb44097dd0742f Mon Sep 17 00:00:00 2001 From: Adam Talbot Date: Mon, 31 Jul 2023 10:34:10 +0100 Subject: [PATCH 04/10] Add tag to snakemake nf-test --- tests/modules/nf-core/snakemake/main.nf.test | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/modules/nf-core/snakemake/main.nf.test b/tests/modules/nf-core/snakemake/main.nf.test index 60b6064e536..1de065db1f4 100644 --- a/tests/modules/nf-core/snakemake/main.nf.test +++ b/tests/modules/nf-core/snakemake/main.nf.test @@ -3,6 +3,7 @@ nextflow_process { name "Test Process SNAKEMAKE" script "modules/nf-core/snakemake/main.nf" process "SNAKEMAKE" + tag "snakemake" test("Should run without failures") { From 396a917642731acaf29d988228a035d9d88df823 Mon Sep 17 00:00:00 2001 From: Adam Talbot Date: Mon, 31 Jul 2023 10:35:40 +0100 Subject: [PATCH 05/10] Bump snakemake version --- modules/nf-core/snakemake/main.nf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/nf-core/snakemake/main.nf b/modules/nf-core/snakemake/main.nf index 54157124a33..7d7844f77d1 100644 --- a/modules/nf-core/snakemake/main.nf +++ b/modules/nf-core/snakemake/main.nf @@ -4,10 +4,10 @@ process SNAKEMAKE { // You will have to add all modules to this Conda definition and // replace the container definition for one that suits your needs - conda "bioconda::snakemake=7.30.1" + conda "bioconda::snakemake=7.31.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/snakemake:7.30.1--hdfd78af_0' : - 'biocontainers/snakemake:7.30.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/snakemake:7.31.0--hdfd78af_1' : + 'biocontainers/snakemake:7.31.0--hdfd78af_1' }" input: tuple val(meta), path(inputs) From 4033bd6d87f5830eac94c19bc0bb121ee4629818 Mon Sep 17 00:00:00 2001 From: Adam Talbot Date: Mon, 31 Jul 2023 10:38:12 +0100 Subject: [PATCH 06/10] Update snakemake nf-test with snap --- tests/modules/nf-core/snakemake/main.nf.test | 2 +- .../nf-core/snakemake/main.nf.test.snap | 113 ++++++++++++++++++ 2 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 tests/modules/nf-core/snakemake/main.nf.test.snap diff --git a/tests/modules/nf-core/snakemake/main.nf.test b/tests/modules/nf-core/snakemake/main.nf.test index 1de065db1f4..213b5343520 100644 --- a/tests/modules/nf-core/snakemake/main.nf.test +++ b/tests/modules/nf-core/snakemake/main.nf.test @@ -41,7 +41,7 @@ rule hello_world: then { assert process.success - // assert snapshot(process.out).match() + assert snapshot(process.out).match() } } diff --git a/tests/modules/nf-core/snakemake/main.nf.test.snap b/tests/modules/nf-core/snakemake/main.nf.test.snap new file mode 100644 index 00000000000..110b48f791a --- /dev/null +++ b/tests/modules/nf-core/snakemake/main.nf.test.snap @@ -0,0 +1,113 @@ +{ + "Should run without failures": { + "content": [ + { + "0": [ + [ + { + "id": "input" + }, + [ + "2023-07-31T093650.969680.snakemake.log:md5,1ba1e5b1f45fd77c0a0b2fced5597c9a", + "aGVsbG8udHh0:md5,5d5b69e1a49e8d8aeac628ee5526e94e", + "hello.txt:md5,e59ff97941044f85df5297e1c302d260", + "versions.yml:md5,91f038cba572e2b7b6dfe06e0e088ce5" + ] + ] + ], + "1": [ + [ + { + "id": "input" + }, + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + "2023-07-31T093650.969680.snakemake.log:md5,1ba1e5b1f45fd77c0a0b2fced5597c9a" + ], + [ + "aGVsbG8udHh0:md5,5d5b69e1a49e8d8aeac628ee5526e94e" + ], + [ + + ], + [ + + ] + ] + ] + ], + "2": [ + "versions.yml:md5,91f038cba572e2b7b6dfe06e0e088ce5" + ], + "outputs": [ + [ + { + "id": "input" + }, + [ + "2023-07-31T093650.969680.snakemake.log:md5,1ba1e5b1f45fd77c0a0b2fced5597c9a", + "aGVsbG8udHh0:md5,5d5b69e1a49e8d8aeac628ee5526e94e", + "hello.txt:md5,e59ff97941044f85df5297e1c302d260", + "versions.yml:md5,91f038cba572e2b7b6dfe06e0e088ce5" + ] + ] + ], + "snakemake_dir": [ + [ + { + "id": "input" + }, + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + "2023-07-31T093650.969680.snakemake.log:md5,1ba1e5b1f45fd77c0a0b2fced5597c9a" + ], + [ + "aGVsbG8udHh0:md5,5d5b69e1a49e8d8aeac628ee5526e94e" + ], + [ + + ], + [ + + ] + ] + ] + ], + "versions": [ + "versions.yml:md5,91f038cba572e2b7b6dfe06e0e088ce5" + ] + } + ], + "timestamp": "2023-07-31T09:36:55+0000" + } +} \ No newline at end of file From c0242668d457f54b3dc1e185671403b0a3b296a7 Mon Sep 17 00:00:00 2001 From: Adam Talbot Date: Mon, 31 Jul 2023 10:54:32 +0100 Subject: [PATCH 07/10] Select only relevant output channel in snakemake nf-test --- modules/nf-core/snakemake/main.nf | 2 +- tests/modules/nf-core/snakemake/main.nf.test | 2 +- .../nf-core/snakemake/main.nf.test.snap | 111 +----------------- 3 files changed, 4 insertions(+), 111 deletions(-) diff --git a/modules/nf-core/snakemake/main.nf b/modules/nf-core/snakemake/main.nf index 7d7844f77d1..61a140aea23 100644 --- a/modules/nf-core/snakemake/main.nf +++ b/modules/nf-core/snakemake/main.nf @@ -14,7 +14,7 @@ process SNAKEMAKE { tuple val(meta2), path(snakemake) output: - tuple val(meta), path("**[!.snakemake]"), optional: true , emit: outputs + tuple val(meta), path("**[!.snakemake]"), optional: true , emit: outputs tuple val(meta), path(".snakemake", type: 'dir', hidden: true), emit: snakemake_dir path "versions.yml" , emit: versions diff --git a/tests/modules/nf-core/snakemake/main.nf.test b/tests/modules/nf-core/snakemake/main.nf.test index 213b5343520..9c5f07c9fc2 100644 --- a/tests/modules/nf-core/snakemake/main.nf.test +++ b/tests/modules/nf-core/snakemake/main.nf.test @@ -41,7 +41,7 @@ rule hello_world: then { assert process.success - assert snapshot(process.out).match() + assert snapshot(process.out.ouputs).match() } } diff --git a/tests/modules/nf-core/snakemake/main.nf.test.snap b/tests/modules/nf-core/snakemake/main.nf.test.snap index 110b48f791a..66862e7054a 100644 --- a/tests/modules/nf-core/snakemake/main.nf.test.snap +++ b/tests/modules/nf-core/snakemake/main.nf.test.snap @@ -1,113 +1,6 @@ { "Should run without failures": { - "content": [ - { - "0": [ - [ - { - "id": "input" - }, - [ - "2023-07-31T093650.969680.snakemake.log:md5,1ba1e5b1f45fd77c0a0b2fced5597c9a", - "aGVsbG8udHh0:md5,5d5b69e1a49e8d8aeac628ee5526e94e", - "hello.txt:md5,e59ff97941044f85df5297e1c302d260", - "versions.yml:md5,91f038cba572e2b7b6dfe06e0e088ce5" - ] - ] - ], - "1": [ - [ - { - "id": "input" - }, - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - "2023-07-31T093650.969680.snakemake.log:md5,1ba1e5b1f45fd77c0a0b2fced5597c9a" - ], - [ - "aGVsbG8udHh0:md5,5d5b69e1a49e8d8aeac628ee5526e94e" - ], - [ - - ], - [ - - ] - ] - ] - ], - "2": [ - "versions.yml:md5,91f038cba572e2b7b6dfe06e0e088ce5" - ], - "outputs": [ - [ - { - "id": "input" - }, - [ - "2023-07-31T093650.969680.snakemake.log:md5,1ba1e5b1f45fd77c0a0b2fced5597c9a", - "aGVsbG8udHh0:md5,5d5b69e1a49e8d8aeac628ee5526e94e", - "hello.txt:md5,e59ff97941044f85df5297e1c302d260", - "versions.yml:md5,91f038cba572e2b7b6dfe06e0e088ce5" - ] - ] - ], - "snakemake_dir": [ - [ - { - "id": "input" - }, - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - "2023-07-31T093650.969680.snakemake.log:md5,1ba1e5b1f45fd77c0a0b2fced5597c9a" - ], - [ - "aGVsbG8udHh0:md5,5d5b69e1a49e8d8aeac628ee5526e94e" - ], - [ - - ], - [ - - ] - ] - ] - ], - "versions": [ - "versions.yml:md5,91f038cba572e2b7b6dfe06e0e088ce5" - ] - } - ], - "timestamp": "2023-07-31T09:36:55+0000" + "content": null, + "timestamp": "2023-07-31T09:50:07+0000" } } \ No newline at end of file From 10d348bd059b3073e4f133576b6c6b0a514a609b Mon Sep 17 00:00:00 2001 From: Adam Talbot Date: Mon, 31 Jul 2023 10:58:15 +0100 Subject: [PATCH 08/10] Prettier on nf_test_modules.yml --- tests/config/nftest_modules.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/config/nftest_modules.yml b/tests/config/nftest_modules.yml index bfb4bc98182..ccd24bcdb45 100644 --- a/tests/config/nftest_modules.yml +++ b/tests/config/nftest_modules.yml @@ -3,5 +3,5 @@ fastqc: - tests/modules/nf-core/fastqc/** snakemake: - - modules/nf-core/snakemake/** - - tests/modules/nf-core/snakemake/** + - modules/nf-core/snakemake/** + - tests/modules/nf-core/snakemake/** From c728fa7957afb40ab64db12eb4aaabf8e95ef21a Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Wed, 2 Aug 2023 14:56:05 +0100 Subject: [PATCH 09/10] Apply suggestions from code review Co-authored-by: Friederike Hanssen --- modules/nf-core/snakemake/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/snakemake/main.nf b/modules/nf-core/snakemake/main.nf index 61a140aea23..22694b72f14 100644 --- a/modules/nf-core/snakemake/main.nf +++ b/modules/nf-core/snakemake/main.nf @@ -11,7 +11,7 @@ process SNAKEMAKE { input: tuple val(meta), path(inputs) - tuple val(meta2), path(snakemake) + tuple val(meta2), path(snakefile) output: tuple val(meta), path("**[!.snakemake]"), optional: true , emit: outputs @@ -29,7 +29,7 @@ process SNAKEMAKE { snakemake \\ $args \\ $cores \\ - --snakefile $snakemake + --snakefile $snakefile cat <<-END_VERSIONS > versions.yml "${task.process}": From 730174fdda924e852d5e55bb7986776abc89f994 Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Wed, 2 Aug 2023 15:00:11 +0100 Subject: [PATCH 10/10] Apply suggestions from code review Co-authored-by: Jonathan Manning --- modules/nf-core/snakemake/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/snakemake/main.nf b/modules/nf-core/snakemake/main.nf index 22694b72f14..e3c42222eaf 100644 --- a/modules/nf-core/snakemake/main.nf +++ b/modules/nf-core/snakemake/main.nf @@ -44,7 +44,7 @@ process SNAKEMAKE { """ snakemake \\ $args \\ - --snakefile $snakemake \\ + --snakefile $snakefile \\ $cores \\ --dry-run