From c621412d6c70e9407f718cba30bc4db7af47f9f2 Mon Sep 17 00:00:00 2001 From: subwaystation Date: Wed, 7 Feb 2024 15:43:33 +0100 Subject: [PATCH 1/5] update wfmash, multiqc --- modules.json | 4 +- modules/nf-core/multiqc/tests/main.nf.test | 13 ++++--- .../nf-core/multiqc/tests/main.nf.test.snap | 28 +++++++++++-- modules/nf-core/wfmash/environment.yml | 7 ++++ modules/nf-core/wfmash/main.nf | 6 +-- modules/nf-core/wfmash/meta.yml | 7 ++-- modules/nf-core/wfmash/tests/main.nf.test | 39 +++++++++++++++++++ .../nf-core/wfmash/tests/main.nf.test.snap | 33 ++++++++++++++++ modules/nf-core/wfmash/tests/nextflow.config | 12 ++++++ modules/nf-core/wfmash/tests/tags.yml | 2 + 10 files changed, 132 insertions(+), 19 deletions(-) create mode 100644 modules/nf-core/wfmash/environment.yml create mode 100644 modules/nf-core/wfmash/tests/main.nf.test create mode 100644 modules/nf-core/wfmash/tests/main.nf.test.snap create mode 100644 modules/nf-core/wfmash/tests/nextflow.config create mode 100644 modules/nf-core/wfmash/tests/tags.yml diff --git a/modules.json b/modules.json index fb1833c..07b78a0 100644 --- a/modules.json +++ b/modules.json @@ -17,7 +17,7 @@ }, "multiqc": { "branch": "master", - "git_sha": "8ec825f465b9c17f9d83000022995b4f7de6fe93", + "git_sha": "9e71d8519dfbfc328c078bba14d4bd4c99e39a94", "installed_by": ["modules"] }, "odgi/build": { @@ -87,7 +87,7 @@ }, "wfmash": { "branch": "master", - "git_sha": "96fadda088c6e79777ba8eef939e36bb03a69c65", + "git_sha": "0c49f318ec4701b891a87f25fb07b34713c90203", "installed_by": ["modules"] } } diff --git a/modules/nf-core/multiqc/tests/main.nf.test b/modules/nf-core/multiqc/tests/main.nf.test index d0438ed..f1c4242 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test +++ b/modules/nf-core/multiqc/tests/main.nf.test @@ -3,6 +3,7 @@ nextflow_process { name "Test Process MULTIQC" script "../main.nf" process "MULTIQC" + tag "modules" tag "modules_nfcore" tag "multiqc" @@ -12,7 +13,7 @@ nextflow_process { when { process { """ - input[0] = Channel.of([file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz_fastqc_zip'], checkIfExists: true)]) + input[0] = Channel.of(file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastqc/test_fastqc.zip', checkIfExists: true)) input[1] = [] input[2] = [] input[3] = [] @@ -25,7 +26,7 @@ nextflow_process { { assert process.success }, { assert process.out.report[0] ==~ ".*/multiqc_report.html" }, { assert process.out.data[0] ==~ ".*/multiqc_data" }, - { assert snapshot(process.out.versions).match("versions") } + { assert snapshot(process.out.versions).match("multiqc_versions_single") } ) } @@ -36,7 +37,7 @@ nextflow_process { when { process { """ - input[0] = Channel.of([file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz_fastqc_zip'], checkIfExists: true)]) + input[0] = Channel.of(file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastqc/test_fastqc.zip', checkIfExists: true)) input[1] = Channel.of(file("https://github.com/nf-core/tools/raw/dev/nf_core/pipeline-template/assets/multiqc_config.yml", checkIfExists: true)) input[2] = [] input[3] = [] @@ -49,7 +50,7 @@ nextflow_process { { assert process.success }, { assert process.out.report[0] ==~ ".*/multiqc_report.html" }, { assert process.out.data[0] ==~ ".*/multiqc_data" }, - { assert snapshot(process.out.versions).match("versions") } + { assert snapshot(process.out.versions).match("multiqc_versions_config") } ) } } @@ -61,7 +62,7 @@ nextflow_process { when { process { """ - input[0] = Channel.of([file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz_fastqc_zip'], checkIfExists: true)]) + input[0] = Channel.of(file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastqc/test_fastqc.zip', checkIfExists: true)) input[1] = [] input[2] = [] input[3] = [] @@ -75,7 +76,7 @@ nextflow_process { { assert snapshot(process.out.report.collect { file(it).getName() } + process.out.data.collect { file(it).getName() } + process.out.plots.collect { file(it).getName() } + - process.out.versions ).match() } + process.out.versions ).match("multiqc_stub") } ) } diff --git a/modules/nf-core/multiqc/tests/main.nf.test.snap b/modules/nf-core/multiqc/tests/main.nf.test.snap index d37e730..549ba79 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test.snap +++ b/modules/nf-core/multiqc/tests/main.nf.test.snap @@ -1,13 +1,17 @@ { - "versions": { + "multiqc_versions_single": { "content": [ [ "versions.yml:md5,14e9a2661241abd828f4f06a7b5c222d" ] ], - "timestamp": "2024-01-09T23:02:49.911994" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-01-31T17:43:40.529579" }, - "sarscov2 single-end [fastqc] - stub": { + "multiqc_stub": { "content": [ [ "multiqc_report.html", @@ -16,6 +20,22 @@ "versions.yml:md5,14e9a2661241abd828f4f06a7b5c222d" ] ], - "timestamp": "2024-01-09T23:03:14.524346" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-01-31T17:45:09.605359" + }, + "multiqc_versions_config": { + "content": [ + [ + "versions.yml:md5,14e9a2661241abd828f4f06a7b5c222d" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-01-31T17:44:53.535994" } } \ No newline at end of file diff --git a/modules/nf-core/wfmash/environment.yml b/modules/nf-core/wfmash/environment.yml new file mode 100644 index 0000000..071aa5a --- /dev/null +++ b/modules/nf-core/wfmash/environment.yml @@ -0,0 +1,7 @@ +name: wfmash +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::wfmash=0.12.6 diff --git a/modules/nf-core/wfmash/main.nf b/modules/nf-core/wfmash/main.nf index 0f9c581..7c64148 100644 --- a/modules/nf-core/wfmash/main.nf +++ b/modules/nf-core/wfmash/main.nf @@ -2,10 +2,10 @@ process WFMASH { tag "$meta.id" label 'process_medium' - conda "bioconda::wfmash=0.10.5" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/wfmash:0.10.5--h94f6cfe_0': - 'biocontainers/wfmash:0.10.5--h94f6cfe_0' }" + 'https://depot.galaxyproject.org/singularity/wfmash:0.12.6--h11f254b_0': + 'biocontainers/wfmash:0.12.6--h11f254b_0' }" input: tuple val(meta), path(fasta_gz), path(paf), path(gzi), path(fai) diff --git a/modules/nf-core/wfmash/meta.yml b/modules/nf-core/wfmash/meta.yml index 80e630c..dc5cd5a 100644 --- a/modules/nf-core/wfmash/meta.yml +++ b/modules/nf-core/wfmash/meta.yml @@ -13,8 +13,7 @@ tools: documentation: https://github.com/waveygang/wfmash tool_dev_url: https://github.com/waveygang/wfmash doi: 10.5281/zenodo.6949373 - licence: "['MIT']" - + licence: ["MIT"] input: - meta: type: map @@ -44,7 +43,6 @@ input: type: file description: Optional inpute file in FASTA format specifying the query sequences as a list. pattern: "*.{fa,fna,fasta}" - output: - meta: type: map @@ -59,6 +57,7 @@ output: type: file description: File containing software versions pattern: "versions.yml" - authors: - "@subwaystation" +maintainers: + - "@subwaystation" diff --git a/modules/nf-core/wfmash/tests/main.nf.test b/modules/nf-core/wfmash/tests/main.nf.test new file mode 100644 index 0000000..41d8c23 --- /dev/null +++ b/modules/nf-core/wfmash/tests/main.nf.test @@ -0,0 +1,39 @@ +nextflow_process { + + name "Test Process WFMASH" + script "../main.nf" + process "WFMASH" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "wfmash" + + test("homo_sapiens - pangenome - pangenome_fa_bgzip") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['pangenome']['pangenome_fa_bgzip'], checkIfExists: true), + [], // empty paf input + file(params.test_data['homo_sapiens']['pangenome']['pangenome_fa_bgzip_gzi'], checkIfExists: true), // gzi + file(params.test_data['homo_sapiens']['pangenome']['pangenome_fa_bgzip_fai'], checkIfExists: true) // fai + ] + input[1] = true // empty paf input + input[2] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, +// { assert snapshot(process.out).exists() } // if run on more than 1 thread the lines in the resulting PAF will appear in a different order + ) + } + + } + +} diff --git a/modules/nf-core/wfmash/tests/main.nf.test.snap b/modules/nf-core/wfmash/tests/main.nf.test.snap new file mode 100644 index 0000000..97a51e4 --- /dev/null +++ b/modules/nf-core/wfmash/tests/main.nf.test.snap @@ -0,0 +1,33 @@ +{ + "homo_sapiens - pangenome - pangenome_fa_bgzip": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paf:md5,aa6629548e32b2d036c0767c9086a6dd" + ] + ], + "1": [ + "versions.yml:md5,0da45b7a6424a967e2f39225fb020140" + ], + "paf": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paf:md5,aa6629548e32b2d036c0767c9086a6dd" + ] + ], + "versions": [ + "versions.yml:md5,0da45b7a6424a967e2f39225fb020140" + ] + } + ], + "timestamp": "2024-01-25T15:12:21.284828212" + } +} \ No newline at end of file diff --git a/modules/nf-core/wfmash/tests/nextflow.config b/modules/nf-core/wfmash/tests/nextflow.config new file mode 100644 index 0000000..b7e9c98 --- /dev/null +++ b/modules/nf-core/wfmash/tests/nextflow.config @@ -0,0 +1,12 @@ +process { + + withName: WFMASH { + ext.args = { + [ + "-s 500", // necessary because of https://github.com/waveygang/wfmash/issues/218 + "-X" + ].join(" ").trim() + } + } + +} diff --git a/modules/nf-core/wfmash/tests/tags.yml b/modules/nf-core/wfmash/tests/tags.yml new file mode 100644 index 0000000..7001b08 --- /dev/null +++ b/modules/nf-core/wfmash/tests/tags.yml @@ -0,0 +1,2 @@ +wfmash: + - "modules/nf-core/wfmash/**" From 59b0113f5517ab7f71541a45e8fdd652f5e9f423 Mon Sep 17 00:00:00 2001 From: subwaystation Date: Wed, 7 Feb 2024 15:51:31 +0100 Subject: [PATCH 2/5] bug fix --- modules/local/split_approx_mappings_in_chunks/main.nf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/local/split_approx_mappings_in_chunks/main.nf b/modules/local/split_approx_mappings_in_chunks/main.nf index 3d61ab5..2cd3c76 100644 --- a/modules/local/split_approx_mappings_in_chunks/main.nf +++ b/modules/local/split_approx_mappings_in_chunks/main.nf @@ -2,10 +2,10 @@ process SPLIT_APPROX_MAPPINGS_IN_CHUNKS { tag "$meta.id" label 'process_single' - conda "bioconda::pggb=0.5.4" + conda "bioconda::wfmash=0.12.6" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/pggb:0.5.4--hdfd78af_0': - 'biocontainers/pggb:0.5.4--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/wfmash:0.12.6--h11f254b_0': + 'biocontainers/wfmash:0.12.6--h11f254b_0' }" input: tuple val(meta), path(paf) From e41a5256afc3601c505e8bf973066c520e9a8a7d Mon Sep 17 00:00:00 2001 From: subwaystation Date: Wed, 7 Feb 2024 16:00:45 +0100 Subject: [PATCH 3/5] another try --- modules/local/split_approx_mappings_in_chunks/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/local/split_approx_mappings_in_chunks/main.nf b/modules/local/split_approx_mappings_in_chunks/main.nf index 2cd3c76..ad573b0 100644 --- a/modules/local/split_approx_mappings_in_chunks/main.nf +++ b/modules/local/split_approx_mappings_in_chunks/main.nf @@ -21,7 +21,7 @@ process SPLIT_APPROX_MAPPINGS_IN_CHUNKS { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ - split_approx_mappings_in_chunks.py $paf \\ + python split_approx_mappings_in_chunks.py $paf \\ $args cat <<-END_VERSIONS > versions.yml From c873b108abb782f2752b56567f4a166c56113b00 Mon Sep 17 00:00:00 2001 From: subwaystation Date: Thu, 8 Feb 2024 11:45:51 +0100 Subject: [PATCH 4/5] another wfmash update --- modules/local/split_approx_mappings_in_chunks/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/local/split_approx_mappings_in_chunks/main.nf b/modules/local/split_approx_mappings_in_chunks/main.nf index ad573b0..878afe7 100644 --- a/modules/local/split_approx_mappings_in_chunks/main.nf +++ b/modules/local/split_approx_mappings_in_chunks/main.nf @@ -4,8 +4,8 @@ process SPLIT_APPROX_MAPPINGS_IN_CHUNKS { conda "bioconda::wfmash=0.12.6" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/wfmash:0.12.6--h11f254b_0': - 'biocontainers/wfmash:0.12.6--h11f254b_0' }" + 'https://depot.galaxyproject.org/singularity/wfmash:0.12.6--h11f254b_1': + 'biocontainers/wfmash:0.12.6--h11f254b_1' }" input: tuple val(meta), path(paf) From e3bd04c02a2b111fc90ca7aa72d4291d8c64e40b Mon Sep 17 00:00:00 2001 From: subwaystation Date: Thu, 8 Feb 2024 11:54:23 +0100 Subject: [PATCH 5/5] another wfmash update --- modules/local/split_approx_mappings_in_chunks/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/local/split_approx_mappings_in_chunks/main.nf b/modules/local/split_approx_mappings_in_chunks/main.nf index 878afe7..66f7e1f 100644 --- a/modules/local/split_approx_mappings_in_chunks/main.nf +++ b/modules/local/split_approx_mappings_in_chunks/main.nf @@ -21,7 +21,7 @@ process SPLIT_APPROX_MAPPINGS_IN_CHUNKS { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ - python split_approx_mappings_in_chunks.py $paf \\ + split_approx_mappings_in_chunks.py $paf \\ $args cat <<-END_VERSIONS > versions.yml