From 9f8daa30ac3afa7ef1c1c36c44549860e8369b3f Mon Sep 17 00:00:00 2001 From: Lili Andersson-Li <64467552+LilyAnderssonLee@users.noreply.github.com> Date: Fri, 28 Jun 2024 10:57:09 +0200 Subject: [PATCH 01/10] Add the new module nanoq --- modules/nf-core/nanoq/environment.yml | 9 + modules/nf-core/nanoq/main.nf | 74 +++++ modules/nf-core/nanoq/meta.yml | 61 ++++ modules/nf-core/nanoq/tests/main.nf.test | 122 +++++++ modules/nf-core/nanoq/tests/main.nf.test.snap | 307 ++++++++++++++++++ modules/nf-core/nanoq/tests/tags.yml | 2 + 6 files changed, 575 insertions(+) create mode 100644 modules/nf-core/nanoq/environment.yml create mode 100644 modules/nf-core/nanoq/main.nf create mode 100644 modules/nf-core/nanoq/meta.yml create mode 100644 modules/nf-core/nanoq/tests/main.nf.test create mode 100644 modules/nf-core/nanoq/tests/main.nf.test.snap create mode 100644 modules/nf-core/nanoq/tests/tags.yml diff --git a/modules/nf-core/nanoq/environment.yml b/modules/nf-core/nanoq/environment.yml new file mode 100644 index 00000000000..41448d5b31d --- /dev/null +++ b/modules/nf-core/nanoq/environment.yml @@ -0,0 +1,9 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +name: "nanoq" +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - "bioconda::nanoq=0.10.0" diff --git a/modules/nf-core/nanoq/main.nf b/modules/nf-core/nanoq/main.nf new file mode 100644 index 00000000000..3024e2845fd --- /dev/null +++ b/modules/nf-core/nanoq/main.nf @@ -0,0 +1,74 @@ +process NANOQ { + + tag "$meta.id" + label 'process_low' + + conda "${moduleDir}/environment.yml" + + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/nanoq:0.10.0--h031d066_2' : + 'biocontainers/nanoq:0.10.0--h031d066_2'}" + + input: + tuple val(meta), path(ontreads) + val(output_type) // u: uncompressed; b: Bzip2; g: Gzip; l: Lzma + + output: + tuple val(meta), path("*.stats") , emit: stats + tuple val(meta), path("*") , emit: reads + 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}" + def seq_type = ontreads.baseName.split("\\.")[1] + + if (output_type == 'u') { + output_ext = "" + } else if (output_type == 'b') { + output_ext = ".bz2" + } else if (output_type == 'g') { + output_ext = ".gz" + } else if (output_type == 'l') { + output_ext = ".lzma" + } + + """ + nanoq -i $ontreads \\ + -r ${prefix}.stats \\ + -O $output_type \\ + -o ${prefix}_nanoq.${seq_type}${output_ext} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + nanoq: \$(nanoq --version | sed -e 's/nanoq //g') + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def seq_type = ontreads.baseName.split("\\.")[1] + if (output_type == 'u') { + output_ext = "" + } else if (output_type == 'b') { + output_ext = ".bz2" + } else if (output_type == 'g') { + output_ext = ".gz" + } else if (output_type == 'l') { + output_ext = ".lzma" + } + + """ + touch ${prefix}_nanoq.${seq_type}${output_ext} + touch ${prefix}.stats + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + nanoq: \$(nanoq --version | sed -e 's/nanoq //g') + END_VERSIONS + """ +} diff --git a/modules/nf-core/nanoq/meta.yml b/modules/nf-core/nanoq/meta.yml new file mode 100644 index 00000000000..4910bfd9a0e --- /dev/null +++ b/modules/nf-core/nanoq/meta.yml @@ -0,0 +1,61 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: "nanoq" +description: Nanoq implements ultra-fast read filters and summary reports for high-throughput nanopore reads. +keywords: + - nanoq + - Read filters + - Read trimming + - Read report +tools: + - "nanoq": + description: "Ultra-fast quality control and summary reports for nanopore reads" + homepage: "https://github.com/esteinig/nanoq" + documentation: "https://github.com/esteinig/nanoq" + tool_dev_url: "https://github.com/esteinig/nanoq" + doi: "10.21105/joss.02991" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + + - ontreads: + type: file + description: Compressed or uncompressed nanopore reads in fasta or fastq formats. + pattern: "*.{fa,fna,faa,fasta,fq,fastq}{,.gz,.bz2,.xz}" + + - output_type: + type: string + description: "Specifies the output compression type: 'b' for Bzip2, 'g' for gzip, 'l' for Lzma, and 'u' for uncompressed." + pattern: "*.{fa,fna,faa,fasta,fq,fastq}{,.gz,.bz2,.lzma}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + + - stats: + type: file + description: Summary report of reads statistics. + pattern: "*.stats" + + - reads: + type: file + description: Filtered reads. + pattern: "*.{fa,fna,faa,fasta,fq,fastq}{,.gz,.bz2,.lzma}" + + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@LilyAnderssonLee" +maintainers: + - "@LilyAnderssonLee" diff --git a/modules/nf-core/nanoq/tests/main.nf.test b/modules/nf-core/nanoq/tests/main.nf.test new file mode 100644 index 00000000000..9f551cb982f --- /dev/null +++ b/modules/nf-core/nanoq/tests/main.nf.test @@ -0,0 +1,122 @@ +nextflow_process { + + name "Test Process NANOQ" + script "../main.nf" + process "NANOQ" + + tag "modules" + tag "modules_nfcore" + tag "nanoq" + + test("sarscov2 - nanopore_uncompressed") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) + ] + + input[1] = 'u' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 - nanopore_compressed_gz") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) + ] + input[1] = 'g' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + test("sarscov2 - nanopore_uncompressed_bz2") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) + ] + input[1] = 'b' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + test("sarscov2 - nanopore_uncompressed_lzma") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) + ] + input[1] = 'l' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 - nanopore - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) + ] + input[1] = 'g' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } +} diff --git a/modules/nf-core/nanoq/tests/main.nf.test.snap b/modules/nf-core/nanoq/tests/main.nf.test.snap new file mode 100644 index 00000000000..6963c22fd2e --- /dev/null +++ b/modules/nf-core/nanoq/tests/main.nf.test.snap @@ -0,0 +1,307 @@ +{ + "sarscov2 - nanopore_compressed_gz": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe", + "test_nanoq.fastq.gz:md5,7567d853ada6ac142332619d0b541d76", + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ] + ] + ], + "2": [ + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe", + "test_nanoq.fastq.gz:md5,7567d853ada6ac142332619d0b541d76", + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ] + ] + ], + "stats": [ + [ + { + "id": "test", + "single_end": true + }, + "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" + ] + ], + "versions": [ + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.04.1" + }, + "timestamp": "2024-06-28T10:54:00.467634" + }, + "sarscov2 - nanopore_uncompressed_bz2": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe", + "test_nanoq.fastq.bz2:md5,b53cf14fd4eb5b16c459c41f03cc8a4b", + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ] + ] + ], + "2": [ + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe", + "test_nanoq.fastq.bz2:md5,b53cf14fd4eb5b16c459c41f03cc8a4b", + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ] + ] + ], + "stats": [ + [ + { + "id": "test", + "single_end": true + }, + "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" + ] + ], + "versions": [ + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.04.1" + }, + "timestamp": "2024-06-28T10:54:04.660873" + }, + "sarscov2 - nanopore - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e", + "/Users/lili.li.2/modules/.nf-test/tests/9d4f60427672ca3da40466350f6c67ae/work/08/8e3658c9a4909104a7edb60966757c/test_nanoq.fastq.gz", + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ] + ] + ], + "2": [ + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e", + "/Users/lili.li.2/modules/.nf-test/tests/9d4f60427672ca3da40466350f6c67ae/work/08/8e3658c9a4909104a7edb60966757c/test_nanoq.fastq.gz", + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ] + ] + ], + "stats": [ + [ + { + "id": "test", + "single_end": true + }, + "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.04.1" + }, + "timestamp": "2024-06-28T10:55:28.522754" + }, + "sarscov2 - nanopore_uncompressed_lzma": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe", + "test_nanoq.fastq.lzma:md5,65dda701689f913734dc245b68c89e07", + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ] + ] + ], + "2": [ + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe", + "test_nanoq.fastq.lzma:md5,65dda701689f913734dc245b68c89e07", + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ] + ] + ], + "stats": [ + [ + { + "id": "test", + "single_end": true + }, + "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" + ] + ], + "versions": [ + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.04.1" + }, + "timestamp": "2024-06-28T10:54:08.886135" + }, + "sarscov2 - nanopore_uncompressed": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe", + "test_nanoq.fastq:md5,7567d853ada6ac142332619d0b541d76", + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ] + ] + ], + "2": [ + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe", + "test_nanoq.fastq:md5,7567d853ada6ac142332619d0b541d76", + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ] + ] + ], + "stats": [ + [ + { + "id": "test", + "single_end": true + }, + "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" + ] + ], + "versions": [ + "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.04.1" + }, + "timestamp": "2024-06-28T10:53:56.126459" + } +} \ No newline at end of file diff --git a/modules/nf-core/nanoq/tests/tags.yml b/modules/nf-core/nanoq/tests/tags.yml new file mode 100644 index 00000000000..37457df1765 --- /dev/null +++ b/modules/nf-core/nanoq/tests/tags.yml @@ -0,0 +1,2 @@ +nanoq: + - "modules/nf-core/nanoq/**" From e3f932a6d1563421db82ba4dd380167762c78e69 Mon Sep 17 00:00:00 2001 From: Lili Andersson-Li <64467552+LilyAnderssonLee@users.noreply.github.com> Date: Fri, 28 Jun 2024 12:55:15 +0200 Subject: [PATCH 02/10] Update modules/nf-core/nanoq/main.nf Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --- modules/nf-core/nanoq/main.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/nf-core/nanoq/main.nf b/modules/nf-core/nanoq/main.nf index 3024e2845fd..67eb742016f 100644 --- a/modules/nf-core/nanoq/main.nf +++ b/modules/nf-core/nanoq/main.nf @@ -4,7 +4,6 @@ process NANOQ { label 'process_low' conda "${moduleDir}/environment.yml" - container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/nanoq:0.10.0--h031d066_2' : 'biocontainers/nanoq:0.10.0--h031d066_2'}" From a26f675236e2bad2c82f5f0c9b7822ee22abe1a3 Mon Sep 17 00:00:00 2001 From: Lili Andersson-Li <64467552+LilyAnderssonLee@users.noreply.github.com> Date: Fri, 28 Jun 2024 12:55:20 +0200 Subject: [PATCH 03/10] Update modules/nf-core/nanoq/main.nf Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --- modules/nf-core/nanoq/main.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/nf-core/nanoq/main.nf b/modules/nf-core/nanoq/main.nf index 67eb742016f..479791607fb 100644 --- a/modules/nf-core/nanoq/main.nf +++ b/modules/nf-core/nanoq/main.nf @@ -1,5 +1,4 @@ process NANOQ { - tag "$meta.id" label 'process_low' From b06b9a46517c17767a21ffd853b153a092461027 Mon Sep 17 00:00:00 2001 From: Lili Andersson-Li <64467552+LilyAnderssonLee@users.noreply.github.com> Date: Fri, 28 Jun 2024 15:03:03 +0200 Subject: [PATCH 04/10] define the output_format --- modules/nf-core/nanoq/main.nf | 30 +------ modules/nf-core/nanoq/meta.yml | 7 +- modules/nf-core/nanoq/tests/main.nf.test | 16 ++-- modules/nf-core/nanoq/tests/main.nf.test.snap | 84 +++++-------------- 4 files changed, 37 insertions(+), 100 deletions(-) diff --git a/modules/nf-core/nanoq/main.nf b/modules/nf-core/nanoq/main.nf index 479791607fb..a2bfeec5c1d 100644 --- a/modules/nf-core/nanoq/main.nf +++ b/modules/nf-core/nanoq/main.nf @@ -9,11 +9,11 @@ process NANOQ { input: tuple val(meta), path(ontreads) - val(output_type) // u: uncompressed; b: Bzip2; g: Gzip; l: Lzma + val(output_format) //One of the following: fastq, fastq.gz, fastq.bz2, fastq.lzma, fasta, fasta.gz, fasta.bz2, fasta.lzma. output: tuple val(meta), path("*.stats") , emit: stats - tuple val(meta), path("*") , emit: reads + tuple val(meta), path("*_nanoq.${output_format}") , emit: reads path "versions.yml" , emit: versions when: @@ -22,23 +22,11 @@ process NANOQ { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def seq_type = ontreads.baseName.split("\\.")[1] - - if (output_type == 'u') { - output_ext = "" - } else if (output_type == 'b') { - output_ext = ".bz2" - } else if (output_type == 'g') { - output_ext = ".gz" - } else if (output_type == 'l') { - output_ext = ".lzma" - } """ nanoq -i $ontreads \\ -r ${prefix}.stats \\ - -O $output_type \\ - -o ${prefix}_nanoq.${seq_type}${output_ext} + -o ${prefix}_nanoq.$output_format cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -49,19 +37,9 @@ process NANOQ { stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def seq_type = ontreads.baseName.split("\\.")[1] - if (output_type == 'u') { - output_ext = "" - } else if (output_type == 'b') { - output_ext = ".bz2" - } else if (output_type == 'g') { - output_ext = ".gz" - } else if (output_type == 'l') { - output_ext = ".lzma" - } """ - touch ${prefix}_nanoq.${seq_type}${output_ext} + touch ${prefix}_nanoq.$output_format touch ${prefix}.stats cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/nanoq/meta.yml b/modules/nf-core/nanoq/meta.yml index 4910bfd9a0e..87fd2f41d9e 100644 --- a/modules/nf-core/nanoq/meta.yml +++ b/modules/nf-core/nanoq/meta.yml @@ -28,10 +28,9 @@ input: description: Compressed or uncompressed nanopore reads in fasta or fastq formats. pattern: "*.{fa,fna,faa,fasta,fq,fastq}{,.gz,.bz2,.xz}" - - output_type: + - output_format: type: string - description: "Specifies the output compression type: 'b' for Bzip2, 'g' for gzip, 'l' for Lzma, and 'u' for uncompressed." - pattern: "*.{fa,fna,faa,fasta,fq,fastq}{,.gz,.bz2,.lzma}" + description: "Specifies the output format. One of these formats: fasta, fastq; fasta.gz, fastq.gz; fasta.bz2, fastq.bz2; fasta.lzma, fastq.lzma." output: - meta: @@ -48,7 +47,7 @@ output: - reads: type: file description: Filtered reads. - pattern: "*.{fa,fna,faa,fasta,fq,fastq}{,.gz,.bz2,.lzma}" + pattern: "*.{fasta,fastq}{,.gz,.bz2,.lzma}" - versions: type: file diff --git a/modules/nf-core/nanoq/tests/main.nf.test b/modules/nf-core/nanoq/tests/main.nf.test index 9f551cb982f..1dfbae33740 100644 --- a/modules/nf-core/nanoq/tests/main.nf.test +++ b/modules/nf-core/nanoq/tests/main.nf.test @@ -18,7 +18,7 @@ nextflow_process { file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) ] - input[1] = 'u' + input[1] = 'fastq' """ } } @@ -40,7 +40,7 @@ nextflow_process { [ id:'test', single_end:true ], // meta map file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) ] - input[1] = 'g' + input[1] = 'fastq.gz' """ } } @@ -52,7 +52,7 @@ nextflow_process { ) } } - test("sarscov2 - nanopore_uncompressed_bz2") { + test("sarscov2 - nanopore_compressed_bz2") { when { process { @@ -61,7 +61,7 @@ nextflow_process { [ id:'test', single_end:true ], // meta map file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) ] - input[1] = 'b' + input[1] = 'fastq.bz2' """ } } @@ -73,7 +73,7 @@ nextflow_process { ) } } - test("sarscov2 - nanopore_uncompressed_lzma") { + test("sarscov2 - nanopore_compressed_lzma") { when { process { @@ -82,7 +82,7 @@ nextflow_process { [ id:'test', single_end:true ], // meta map file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) ] - input[1] = 'l' + input[1] = 'fastq.lzma' """ } } @@ -95,7 +95,7 @@ nextflow_process { } } - test("sarscov2 - nanopore - stub") { + test("sarscov2 - nanopore_compressed_gz - stub") { options "-stub" @@ -106,7 +106,7 @@ nextflow_process { [ id:'test', single_end:true ], // meta map file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) ] - input[1] = 'g' + input[1] = 'fastq.gz' """ } } diff --git a/modules/nf-core/nanoq/tests/main.nf.test.snap b/modules/nf-core/nanoq/tests/main.nf.test.snap index 6963c22fd2e..7c1c4b8e17e 100644 --- a/modules/nf-core/nanoq/tests/main.nf.test.snap +++ b/modules/nf-core/nanoq/tests/main.nf.test.snap @@ -17,11 +17,7 @@ "id": "test", "single_end": true }, - [ - "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe", - "test_nanoq.fastq.gz:md5,7567d853ada6ac142332619d0b541d76", - "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" - ] + "test_nanoq.fastq.gz:md5,7567d853ada6ac142332619d0b541d76" ] ], "2": [ @@ -33,11 +29,7 @@ "id": "test", "single_end": true }, - [ - "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe", - "test_nanoq.fastq.gz:md5,7567d853ada6ac142332619d0b541d76", - "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" - ] + "test_nanoq.fastq.gz:md5,7567d853ada6ac142332619d0b541d76" ] ], "stats": [ @@ -58,9 +50,9 @@ "nf-test": "0.8.4", "nextflow": "23.04.1" }, - "timestamp": "2024-06-28T10:54:00.467634" + "timestamp": "2024-06-28T15:00:12.054286" }, - "sarscov2 - nanopore_uncompressed_bz2": { + "sarscov2 - nanopore_compressed_gz - stub": { "content": [ { "0": [ @@ -69,7 +61,7 @@ "id": "test", "single_end": true }, - "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" + "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "1": [ @@ -78,11 +70,7 @@ "id": "test", "single_end": true }, - [ - "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe", - "test_nanoq.fastq.bz2:md5,b53cf14fd4eb5b16c459c41f03cc8a4b", - "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" - ] + "/Users/lili.li.2/modules/.nf-test/tests/e49c0ef96ddc521ecea9b6c6c7044d8f/work/2f/376d5b8d15822f792cec16483ce364/test_nanoq.fastq.gz" ] ], "2": [ @@ -94,11 +82,7 @@ "id": "test", "single_end": true }, - [ - "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe", - "test_nanoq.fastq.bz2:md5,b53cf14fd4eb5b16c459c41f03cc8a4b", - "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" - ] + "/Users/lili.li.2/modules/.nf-test/tests/e49c0ef96ddc521ecea9b6c6c7044d8f/work/2f/376d5b8d15822f792cec16483ce364/test_nanoq.fastq.gz" ] ], "stats": [ @@ -107,7 +91,7 @@ "id": "test", "single_end": true }, - "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" + "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "versions": [ @@ -119,9 +103,9 @@ "nf-test": "0.8.4", "nextflow": "23.04.1" }, - "timestamp": "2024-06-28T10:54:04.660873" + "timestamp": "2024-06-28T15:01:40.834668" }, - "sarscov2 - nanopore - stub": { + "sarscov2 - nanopore_compressed_bz2": { "content": [ { "0": [ @@ -130,7 +114,7 @@ "id": "test", "single_end": true }, - "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" ] ], "1": [ @@ -139,11 +123,7 @@ "id": "test", "single_end": true }, - [ - "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e", - "/Users/lili.li.2/modules/.nf-test/tests/9d4f60427672ca3da40466350f6c67ae/work/08/8e3658c9a4909104a7edb60966757c/test_nanoq.fastq.gz", - "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" - ] + "test_nanoq.fastq.bz2:md5,b53cf14fd4eb5b16c459c41f03cc8a4b" ] ], "2": [ @@ -155,11 +135,7 @@ "id": "test", "single_end": true }, - [ - "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e", - "/Users/lili.li.2/modules/.nf-test/tests/9d4f60427672ca3da40466350f6c67ae/work/08/8e3658c9a4909104a7edb60966757c/test_nanoq.fastq.gz", - "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" - ] + "test_nanoq.fastq.bz2:md5,b53cf14fd4eb5b16c459c41f03cc8a4b" ] ], "stats": [ @@ -168,7 +144,7 @@ "id": "test", "single_end": true }, - "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" ] ], "versions": [ @@ -180,9 +156,9 @@ "nf-test": "0.8.4", "nextflow": "23.04.1" }, - "timestamp": "2024-06-28T10:55:28.522754" + "timestamp": "2024-06-28T15:00:16.575041" }, - "sarscov2 - nanopore_uncompressed_lzma": { + "sarscov2 - nanopore_compressed_lzma": { "content": [ { "0": [ @@ -200,11 +176,7 @@ "id": "test", "single_end": true }, - [ - "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe", - "test_nanoq.fastq.lzma:md5,65dda701689f913734dc245b68c89e07", - "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" - ] + "test_nanoq.fastq.lzma:md5,65dda701689f913734dc245b68c89e07" ] ], "2": [ @@ -216,11 +188,7 @@ "id": "test", "single_end": true }, - [ - "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe", - "test_nanoq.fastq.lzma:md5,65dda701689f913734dc245b68c89e07", - "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" - ] + "test_nanoq.fastq.lzma:md5,65dda701689f913734dc245b68c89e07" ] ], "stats": [ @@ -241,7 +209,7 @@ "nf-test": "0.8.4", "nextflow": "23.04.1" }, - "timestamp": "2024-06-28T10:54:08.886135" + "timestamp": "2024-06-28T15:00:20.907827" }, "sarscov2 - nanopore_uncompressed": { "content": [ @@ -261,11 +229,7 @@ "id": "test", "single_end": true }, - [ - "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe", - "test_nanoq.fastq:md5,7567d853ada6ac142332619d0b541d76", - "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" - ] + "test_nanoq.fastq:md5,7567d853ada6ac142332619d0b541d76" ] ], "2": [ @@ -277,11 +241,7 @@ "id": "test", "single_end": true }, - [ - "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe", - "test_nanoq.fastq:md5,7567d853ada6ac142332619d0b541d76", - "versions.yml:md5,7a40efe417ff7dbb9e91e9c1629a04e6" - ] + "test_nanoq.fastq:md5,7567d853ada6ac142332619d0b541d76" ] ], "stats": [ @@ -302,6 +262,6 @@ "nf-test": "0.8.4", "nextflow": "23.04.1" }, - "timestamp": "2024-06-28T10:53:56.126459" + "timestamp": "2024-06-28T15:00:07.933329" } } \ No newline at end of file From 4ea90b5de2d8ec4d7ea4fe8db8614b6d080468bb Mon Sep 17 00:00:00 2001 From: Lili Andersson-Li <64467552+LilyAnderssonLee@users.noreply.github.com> Date: Tue, 2 Jul 2024 09:47:46 +0200 Subject: [PATCH 05/10] Update modules/nf-core/nanoq/main.nf Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --- modules/nf-core/nanoq/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/nanoq/main.nf b/modules/nf-core/nanoq/main.nf index a2bfeec5c1d..248b0dd18b4 100644 --- a/modules/nf-core/nanoq/main.nf +++ b/modules/nf-core/nanoq/main.nf @@ -26,7 +26,7 @@ process NANOQ { """ nanoq -i $ontreads \\ -r ${prefix}.stats \\ - -o ${prefix}_nanoq.$output_format + -o ${prefix}.$output_format cat <<-END_VERSIONS > versions.yml "${task.process}": From 4f184dccac57dce02e155c8380d9e6a04e31cc4b Mon Sep 17 00:00:00 2001 From: Lili Andersson-Li <64467552+LilyAnderssonLee@users.noreply.github.com> Date: Tue, 2 Jul 2024 09:47:51 +0200 Subject: [PATCH 06/10] Update modules/nf-core/nanoq/main.nf Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --- modules/nf-core/nanoq/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/nanoq/main.nf b/modules/nf-core/nanoq/main.nf index 248b0dd18b4..e5d0261063f 100644 --- a/modules/nf-core/nanoq/main.nf +++ b/modules/nf-core/nanoq/main.nf @@ -21,7 +21,7 @@ process NANOQ { script: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}_nanoq" """ nanoq -i $ontreads \\ From 0b35d7eaecb53ba70e42864a8e006ec720ff881d Mon Sep 17 00:00:00 2001 From: Lili Andersson-Li <64467552+LilyAnderssonLee@users.noreply.github.com> Date: Tue, 2 Jul 2024 09:48:07 +0200 Subject: [PATCH 07/10] Update modules/nf-core/nanoq/main.nf Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --- modules/nf-core/nanoq/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/nanoq/main.nf b/modules/nf-core/nanoq/main.nf index e5d0261063f..3fbb1963624 100644 --- a/modules/nf-core/nanoq/main.nf +++ b/modules/nf-core/nanoq/main.nf @@ -39,7 +39,7 @@ process NANOQ { def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}_nanoq.$output_format + echo "" | gzip > ${prefix}_nanoq.$output_format touch ${prefix}.stats cat <<-END_VERSIONS > versions.yml From d1b11c99c08335691b8a7bbdccb3bdeb26a10434 Mon Sep 17 00:00:00 2001 From: Lili Andersson-Li <64467552+LilyAnderssonLee@users.noreply.github.com> Date: Tue, 2 Jul 2024 10:02:55 +0200 Subject: [PATCH 08/10] update the stub run with gzip --- modules/nf-core/nanoq/main.nf | 6 ++-- modules/nf-core/nanoq/tests/main.nf.test.snap | 34 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/modules/nf-core/nanoq/main.nf b/modules/nf-core/nanoq/main.nf index 3fbb1963624..3b6d719ab6a 100644 --- a/modules/nf-core/nanoq/main.nf +++ b/modules/nf-core/nanoq/main.nf @@ -13,7 +13,7 @@ process NANOQ { output: tuple val(meta), path("*.stats") , emit: stats - tuple val(meta), path("*_nanoq.${output_format}") , emit: reads + tuple val(meta), path("*_nanoq.${output_format}") , emit: reads path "versions.yml" , emit: versions when: @@ -36,10 +36,10 @@ process NANOQ { stub: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}_nanoq" """ - echo "" | gzip > ${prefix}_nanoq.$output_format + echo "" | gzip > ${prefix}.$output_format touch ${prefix}.stats cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/nanoq/tests/main.nf.test.snap b/modules/nf-core/nanoq/tests/main.nf.test.snap index 7c1c4b8e17e..e9f6b8b5453 100644 --- a/modules/nf-core/nanoq/tests/main.nf.test.snap +++ b/modules/nf-core/nanoq/tests/main.nf.test.snap @@ -8,7 +8,7 @@ "id": "test", "single_end": true }, - "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" + "test_nanoq.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" ] ], "1": [ @@ -38,7 +38,7 @@ "id": "test", "single_end": true }, - "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" + "test_nanoq.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" ] ], "versions": [ @@ -50,7 +50,7 @@ "nf-test": "0.8.4", "nextflow": "23.04.1" }, - "timestamp": "2024-06-28T15:00:12.054286" + "timestamp": "2024-07-02T10:00:12.328317" }, "sarscov2 - nanopore_compressed_gz - stub": { "content": [ @@ -61,7 +61,7 @@ "id": "test", "single_end": true }, - "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" + "test_nanoq.stats:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "1": [ @@ -70,7 +70,7 @@ "id": "test", "single_end": true }, - "/Users/lili.li.2/modules/.nf-test/tests/e49c0ef96ddc521ecea9b6c6c7044d8f/work/2f/376d5b8d15822f792cec16483ce364/test_nanoq.fastq.gz" + "test_nanoq.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], "2": [ @@ -82,7 +82,7 @@ "id": "test", "single_end": true }, - "/Users/lili.li.2/modules/.nf-test/tests/e49c0ef96ddc521ecea9b6c6c7044d8f/work/2f/376d5b8d15822f792cec16483ce364/test_nanoq.fastq.gz" + "test_nanoq.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], "stats": [ @@ -91,7 +91,7 @@ "id": "test", "single_end": true }, - "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" + "test_nanoq.stats:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "versions": [ @@ -103,7 +103,7 @@ "nf-test": "0.8.4", "nextflow": "23.04.1" }, - "timestamp": "2024-06-28T15:01:40.834668" + "timestamp": "2024-07-02T10:00:24.873908" }, "sarscov2 - nanopore_compressed_bz2": { "content": [ @@ -114,7 +114,7 @@ "id": "test", "single_end": true }, - "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" + "test_nanoq.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" ] ], "1": [ @@ -144,7 +144,7 @@ "id": "test", "single_end": true }, - "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" + "test_nanoq.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" ] ], "versions": [ @@ -156,7 +156,7 @@ "nf-test": "0.8.4", "nextflow": "23.04.1" }, - "timestamp": "2024-06-28T15:00:16.575041" + "timestamp": "2024-07-02T10:00:16.460467" }, "sarscov2 - nanopore_compressed_lzma": { "content": [ @@ -167,7 +167,7 @@ "id": "test", "single_end": true }, - "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" + "test_nanoq.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" ] ], "1": [ @@ -197,7 +197,7 @@ "id": "test", "single_end": true }, - "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" + "test_nanoq.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" ] ], "versions": [ @@ -209,7 +209,7 @@ "nf-test": "0.8.4", "nextflow": "23.04.1" }, - "timestamp": "2024-06-28T15:00:20.907827" + "timestamp": "2024-07-02T10:00:20.825269" }, "sarscov2 - nanopore_uncompressed": { "content": [ @@ -220,7 +220,7 @@ "id": "test", "single_end": true }, - "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" + "test_nanoq.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" ] ], "1": [ @@ -250,7 +250,7 @@ "id": "test", "single_end": true }, - "test.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" + "test_nanoq.stats:md5,5ab32af3352dfeca8268e10edf6e4dbe" ] ], "versions": [ @@ -262,6 +262,6 @@ "nf-test": "0.8.4", "nextflow": "23.04.1" }, - "timestamp": "2024-06-28T15:00:07.933329" + "timestamp": "2024-07-02T10:00:07.8772" } } \ No newline at end of file From df9cfc4a7a837acb055582782debdf18f05fc275 Mon Sep 17 00:00:00 2001 From: Lili Andersson-Li <64467552+LilyAnderssonLee@users.noreply.github.com> Date: Tue, 2 Jul 2024 13:41:28 +0200 Subject: [PATCH 09/10] Update modules/nf-core/nanoq/main.nf Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --- modules/nf-core/nanoq/main.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/nf-core/nanoq/main.nf b/modules/nf-core/nanoq/main.nf index 3b6d719ab6a..f0fff961f63 100644 --- a/modules/nf-core/nanoq/main.nf +++ b/modules/nf-core/nanoq/main.nf @@ -37,7 +37,6 @@ process NANOQ { stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}_nanoq" - """ echo "" | gzip > ${prefix}.$output_format touch ${prefix}.stats From a74803dfea652f2d3b0081a13d466cc0806213c1 Mon Sep 17 00:00:00 2001 From: Lili Andersson-Li <64467552+LilyAnderssonLee@users.noreply.github.com> Date: Tue, 2 Jul 2024 13:41:35 +0200 Subject: [PATCH 10/10] Update modules/nf-core/nanoq/main.nf Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --- modules/nf-core/nanoq/main.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/nf-core/nanoq/main.nf b/modules/nf-core/nanoq/main.nf index f0fff961f63..298ede2b7bc 100644 --- a/modules/nf-core/nanoq/main.nf +++ b/modules/nf-core/nanoq/main.nf @@ -22,7 +22,6 @@ process NANOQ { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}_nanoq" - """ nanoq -i $ontreads \\ -r ${prefix}.stats \\