From 8f16c73fab1a0e9a07d38ce1f111ad8540871ef9 Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Wed, 11 Dec 2024 19:52:28 +0000 Subject: [PATCH 01/14] Added nf-tests --- modules/nf-core/custom/matrixfilter/main.nf | 12 +- .../custom/matrixfilter/tests/main.nf.test | 51 +++++++ .../matrixfilter/tests/main.nf.test.snap | 132 ++++++++++++++++++ .../custom/matrixfilter/tests/nextflow.config | 21 +++ .../nf-core/custom/tabulartogseacls/main.nf | 10 ++ .../tabulartogseacls/tests/main.nf.test | 49 +++++++ .../tabulartogseacls/tests/main.nf.test.snap | 84 +++++++++++ .../tabulartogseacls/tests/nextflow.config | 3 + .../nf-core/custom/tabulartogseagct/main.nf | 9 ++ .../tabulartogseagct/tests/main.nf.test | 48 +++++++ .../tabulartogseagct/tests/main.nf.test.snap | 84 +++++++++++ 11 files changed, 500 insertions(+), 3 deletions(-) create mode 100644 modules/nf-core/custom/matrixfilter/tests/main.nf.test create mode 100644 modules/nf-core/custom/matrixfilter/tests/main.nf.test.snap create mode 100644 modules/nf-core/custom/matrixfilter/tests/nextflow.config create mode 100644 modules/nf-core/custom/tabulartogseacls/tests/main.nf.test create mode 100644 modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap create mode 100644 modules/nf-core/custom/tabulartogseacls/tests/nextflow.config create mode 100644 modules/nf-core/custom/tabulartogseagct/tests/main.nf.test create mode 100644 modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap diff --git a/modules/nf-core/custom/matrixfilter/main.nf b/modules/nf-core/custom/matrixfilter/main.nf index c31a45be97f..c5f2d8fcfb6 100644 --- a/modules/nf-core/custom/matrixfilter/main.nf +++ b/modules/nf-core/custom/matrixfilter/main.nf @@ -2,9 +2,7 @@ process CUSTOM_MATRIXFILTER { tag "$meta" label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-base:4.2.1' : - 'biocontainers/r-base:4.2.1' }" + container "community.wave.seqera.io/library/r-base:4.2.1--b0b5476e2e7a0872" input: tuple val(meta), path(abundance) @@ -27,4 +25,12 @@ process CUSTOM_MATRIXFILTER { // (new variables defined here don't seem to be available in templates, so // we have to access $task directly) template 'matrixfilter.R' + + stub: + """ + touch mock.filtered.tsv + touch mock.tests.tsv + touch R_sessionInfo.log + touch versions.yml + """ } diff --git a/modules/nf-core/custom/matrixfilter/tests/main.nf.test b/modules/nf-core/custom/matrixfilter/tests/main.nf.test new file mode 100644 index 00000000000..1c1a9bf81ce --- /dev/null +++ b/modules/nf-core/custom/matrixfilter/tests/main.nf.test @@ -0,0 +1,51 @@ +nextflow_process { + + name "Test Process CUSTOM_MATRIXFILTER" + script "../main.nf" + process "CUSTOM_MATRIXFILTER" + config "./nextflow.config" + tag "modules" + tag "modules_nfcore" + tag "custom_matrixfilter" + + test("test_custom_matrixfilter") { + + when { + process { + """ + input[0] = [ [id:"test"], file("https://github.com/nf-core/test-datasets/raw/refs/heads/differentialabundance/modules_testdata/SRP254919.salmon.merged.gene_counts.top1000cov.assay.tsv",checkIfExists: true) ] + input[1] = [ [id:"test"], file("https://github.com/nf-core/test-datasets/raw/refs/heads/differentialabundance/modules_testdata/SRP254919.samplesheet.sample_metadata.tsv",checkIfExists: true) ] + """ + + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } + } + + test("test_custom_matrixfilter - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ [id:"test"], file("https://github.com/nf-core/test-datasets/raw/refs/heads/differentialabundance/modules_testdata/SRP254919.salmon.merged.gene_counts.top1000cov.assay.tsv",checkIfExists: true) ] + input[1] = [ [id:"test"], file("https://github.com/nf-core/test-datasets/raw/refs/heads/differentialabundance/modules_testdata/SRP254919.samplesheet.sample_metadata.tsv",checkIfExists: true) ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } + } +} diff --git a/modules/nf-core/custom/matrixfilter/tests/main.nf.test.snap b/modules/nf-core/custom/matrixfilter/tests/main.nf.test.snap new file mode 100644 index 00000000000..b34f0f622b8 --- /dev/null +++ b/modules/nf-core/custom/matrixfilter/tests/main.nf.test.snap @@ -0,0 +1,132 @@ +{ + "test_custom_matrixfilter": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.filtered.tsv:md5,ecc3ca4c6538f9248dce844108474a66" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test.tests.tsv:md5,9a0f14988df8c1b8975039eed91b85e2" + ] + ], + "2": [ + [ + { + "id": "test" + }, + "R_sessionInfo.log:md5,e19eea53ec9086b4ac47332e354c4cc1" + ] + ], + "3": [ + "versions.yml:md5,275e382be9ca5bdd30ff5d6fc4340616" + ], + "filtered": [ + [ + { + "id": "test" + }, + "test.filtered.tsv:md5,ecc3ca4c6538f9248dce844108474a66" + ] + ], + "session_info": [ + [ + { + "id": "test" + }, + "R_sessionInfo.log:md5,e19eea53ec9086b4ac47332e354c4cc1" + ] + ], + "tests": [ + [ + { + "id": "test" + }, + "test.tests.tsv:md5,9a0f14988df8c1b8975039eed91b85e2" + ] + ], + "versions": [ + "versions.yml:md5,275e382be9ca5bdd30ff5d6fc4340616" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-11T19:46:57.516473857" + }, + "test_custom_matrixfilter - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "mock.filtered.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "mock.tests.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test" + }, + "R_sessionInfo.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "filtered": [ + [ + { + "id": "test" + }, + "mock.filtered.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "session_info": [ + [ + { + "id": "test" + }, + "R_sessionInfo.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tests": [ + [ + { + "id": "test" + }, + "mock.tests.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-11T15:31:03.847264377" + } +} \ No newline at end of file diff --git a/modules/nf-core/custom/matrixfilter/tests/nextflow.config b/modules/nf-core/custom/matrixfilter/tests/nextflow.config new file mode 100644 index 00000000000..256de960c9a --- /dev/null +++ b/modules/nf-core/custom/matrixfilter/tests/nextflow.config @@ -0,0 +1,21 @@ +params { + observations_id_col = 'sample' + filtering_min_samples = 1.0 + filtering_min_abundance = 10 + filtering_min_proportion = null + filtering_grouping_var = null + filtering_min_proportion_not_na = 0.5 + filtering_min_samples_not_na = null +} +process { + ext.prefix = { "${meta.id}" } + ext.args = [ + "--sample_id_col \"${params.observations_id_col}\"", + "--minimum_samples ${params.filtering_min_samples}", + "--minimum_abundance ${params.filtering_min_abundance}", + (params.filtering_min_proportion ? "--minimum_proportion ${params.filtering_min_proportion}" : ''), + (params.filtering_grouping_var ? "--grouping_variable \"${params.filtering_grouping_var}\"" : ''), + (params.filtering_min_proportion_not_na ? "--minimum_proportion_not_na \"${params.filtering_min_proportion_not_na}\"" : ''), + (params.filtering_min_samples_not_na ? "--minimum_samples_not_na \"${params.filtering_min_samples_not_na}\"" : '') + ].join(' ').trim() + } diff --git a/modules/nf-core/custom/tabulartogseacls/main.nf b/modules/nf-core/custom/tabulartogseacls/main.nf index 5e6fd37a63c..23cc3f4d973 100644 --- a/modules/nf-core/custom/tabulartogseacls/main.nf +++ b/modules/nf-core/custom/tabulartogseacls/main.nf @@ -41,4 +41,14 @@ process CUSTOM_TABULARTOGSEACLS { bash: \$(echo \$(bash --version | grep -Eo 'version [[:alnum:].]+' | sed 's/version //')) END_VERSIONS """ + + stub: + """ + touch mock.cls + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bash: \$(echo \$(bash --version | grep -Eo 'version [[:alnum:].]+' | sed 's/version //')) + END_VERSIONS + """ + } diff --git a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test new file mode 100644 index 00000000000..19672156dc1 --- /dev/null +++ b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test @@ -0,0 +1,49 @@ +nextflow_process { + + name "Test Process CUSTOM_TABULARTOGSEACLS" + script "../main.nf" + process "CUSTOM_TABULARTOGSEACLS" + config "./nextflow.config" + tag "modules" + tag "modules_nfcore" + tag "custom_tabulartogseacls" + + test("test_custom_tabulartogseacls") { + + when { + process { + """ + input[0] = [ [id:'treatment_mCherry_hND6_sample_number', variable:'treatment', reference:'mCherry', target:'hND6', blocking:'sample_number'], file("https://github.com/nf-core/test-datasets/raw/refs/heads/differentialabundance/modules_testdata/SRP254919.samplesheet.sample_metadata.tsv",checkIfExists: true) ] + """ + + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } + } + + test("test_custom_tabulartogseacls - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ [id:'treatment_mCherry_hND6_sample_number', variable:'treatment', reference:'mCherry', target:'hND6', blocking:'sample_number'], file("https://github.com/nf-core/test-datasets/raw/refs/heads/differentialabundance/modules_testdata/SRP254919.samplesheet.sample_metadata.tsv",checkIfExists: true) ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } + } +} diff --git a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap new file mode 100644 index 00000000000..55d8c5a5755 --- /dev/null +++ b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap @@ -0,0 +1,84 @@ +{ + "test_custom_tabulartogseacls - stub": { + "content": [ + { + "0": [ + [ + { + "id": "treatment_mCherry_hND6_sample_number", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "sample_number" + }, + "mock.cls:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,3374690b043ab72b21680ff1f196841e" + ], + "cls": [ + [ + { + "id": "treatment_mCherry_hND6_sample_number", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "sample_number" + }, + "mock.cls:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,3374690b043ab72b21680ff1f196841e" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-11T15:49:29.416602434" + }, + "test_custom_tabulartogseacls": { + "content": [ + { + "0": [ + [ + { + "id": "treatment_mCherry_hND6_sample_number", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "sample_number" + }, + "treatment_mCherry_hND6_sample_number.cls:md5,7b887159417842b1fe87afebe4f8c2b7" + ] + ], + "1": [ + "versions.yml:md5,3374690b043ab72b21680ff1f196841e" + ], + "cls": [ + [ + { + "id": "treatment_mCherry_hND6_sample_number", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "sample_number" + }, + "treatment_mCherry_hND6_sample_number.cls:md5,7b887159417842b1fe87afebe4f8c2b7" + ] + ], + "versions": [ + "versions.yml:md5,3374690b043ab72b21680ff1f196841e" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-11T15:49:20.965285853" + } +} \ No newline at end of file diff --git a/modules/nf-core/custom/tabulartogseacls/tests/nextflow.config b/modules/nf-core/custom/tabulartogseacls/tests/nextflow.config new file mode 100644 index 00000000000..035b67de8f8 --- /dev/null +++ b/modules/nf-core/custom/tabulartogseacls/tests/nextflow.config @@ -0,0 +1,3 @@ +process { + ext.args = { [ "separator": "\t", "variable": "$meta.variable" ] } +} diff --git a/modules/nf-core/custom/tabulartogseagct/main.nf b/modules/nf-core/custom/tabulartogseagct/main.nf index 4f2fa7b5fc9..768305b271d 100644 --- a/modules/nf-core/custom/tabulartogseagct/main.nf +++ b/modules/nf-core/custom/tabulartogseagct/main.nf @@ -37,4 +37,13 @@ process CUSTOM_TABULARTOGSEAGCT { bash: \$(echo \$(bash --version | grep -Eo 'version [[:alnum:].]+' | sed 's/version //')) END_VERSIONS """ + + stub: + """ + touch mock.gct + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bash: \$(echo \$(bash --version | grep -Eo 'version [[:alnum:].]+' | sed 's/version //')) + END_VERSIONS + """ } diff --git a/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test new file mode 100644 index 00000000000..0bfd0fb7e14 --- /dev/null +++ b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test @@ -0,0 +1,48 @@ +nextflow_process { + + name "Test Process CUSTOM_TABULARTOGSEAGCT" + script "../main.nf" + process "CUSTOM_TABULARTOGSEAGCT" + tag "modules" + tag "modules_nfcore" + tag "custom_tabulartogseagct" + + test("test_custom_tabulartogseagct") { + + when { + process { + """ + input[0] = [ [id:'treatment_mCherry_hND6_', variable:'treatment', reference:'mCherry', target:'hND6', blocking:''], file("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/differentialabundance/modules_testdata/all.normalised_counts.tsv",checkIfExists: true) ] + """ + + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } + } + + test("test_custom_tabulartogseagct - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ [id:'treatment_mCherry_hND6_', variable:'treatment', reference:'mCherry', target:'hND6', blocking:''], file("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/differentialabundance/modules_testdata/all.normalised_counts.tsv",checkIfExists: true) ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } + } +} diff --git a/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap new file mode 100644 index 00000000000..bbf73b8f883 --- /dev/null +++ b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap @@ -0,0 +1,84 @@ +{ + "test_custom_tabulartogseagct": { + "content": [ + { + "0": [ + [ + { + "id": "treatment_mCherry_hND6_", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "" + }, + "treatment_mCherry_hND6_.gct:md5,9727aca45da7ebe619a1f964c9813eee" + ] + ], + "1": [ + "versions.yml:md5,de91ab15d8517772e8dc9e8c12c8b552" + ], + "gct": [ + [ + { + "id": "treatment_mCherry_hND6_", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "" + }, + "treatment_mCherry_hND6_.gct:md5,9727aca45da7ebe619a1f964c9813eee" + ] + ], + "versions": [ + "versions.yml:md5,de91ab15d8517772e8dc9e8c12c8b552" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-11T17:35:50.398934861" + }, + "test_custom_tabulartogseagct - stub": { + "content": [ + { + "0": [ + [ + { + "id": "treatment_mCherry_hND6_", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "" + }, + "mock.gct:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,de91ab15d8517772e8dc9e8c12c8b552" + ], + "gct": [ + [ + { + "id": "treatment_mCherry_hND6_", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "" + }, + "mock.gct:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,de91ab15d8517772e8dc9e8c12c8b552" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-11T17:35:58.084545848" + } +} \ No newline at end of file From 22db11cff821f0b4bb0d253b687da90f6b118211 Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Wed, 11 Dec 2024 19:57:05 +0000 Subject: [PATCH 02/14] Add missing tags --- modules/nf-core/custom/matrixfilter/tests/main.nf.test | 2 ++ modules/nf-core/custom/tabulartogseacls/tests/main.nf.test | 2 ++ modules/nf-core/custom/tabulartogseagct/tests/main.nf.test | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/nf-core/custom/matrixfilter/tests/main.nf.test b/modules/nf-core/custom/matrixfilter/tests/main.nf.test index 1c1a9bf81ce..fc4c8ad69bb 100644 --- a/modules/nf-core/custom/matrixfilter/tests/main.nf.test +++ b/modules/nf-core/custom/matrixfilter/tests/main.nf.test @@ -7,6 +7,8 @@ nextflow_process { tag "modules" tag "modules_nfcore" tag "custom_matrixfilter" + tag "custom" + tag "custom/matrixfilter" test("test_custom_matrixfilter") { diff --git a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test index 19672156dc1..c31288b174b 100644 --- a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test +++ b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test @@ -7,6 +7,8 @@ nextflow_process { tag "modules" tag "modules_nfcore" tag "custom_tabulartogseacls" + tag "custom" + tag "custom/tabulartogseacls" test("test_custom_tabulartogseacls") { diff --git a/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test index 0bfd0fb7e14..2c3cd77552b 100644 --- a/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test +++ b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test @@ -6,6 +6,8 @@ nextflow_process { tag "modules" tag "modules_nfcore" tag "custom_tabulartogseagct" + tag "custom" + tag "custom/tabulartogseagct" test("test_custom_tabulartogseagct") { @@ -14,7 +16,7 @@ nextflow_process { """ input[0] = [ [id:'treatment_mCherry_hND6_', variable:'treatment', reference:'mCherry', target:'hND6', blocking:''], file("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/differentialabundance/modules_testdata/all.normalised_counts.tsv",checkIfExists: true) ] """ - + } } From e54ce38e5713720b6f0aa76bd1ea6dcb84630ef1 Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Wed, 11 Dec 2024 20:55:52 +0000 Subject: [PATCH 03/14] Fix conda tests --- .../custom/matrixfilter/tests/main.nf.test | 8 +- .../matrixfilter/tests/main.nf.test.snap | 192 +++++++----------- .../nf-core/custom/tabulartogseacls/main.nf | 4 +- .../tabulartogseacls/tests/main.nf.test | 6 +- .../tabulartogseacls/tests/main.nf.test.snap | 96 +++------ .../nf-core/custom/tabulartogseagct/main.nf | 4 +- .../tabulartogseagct/tests/main.nf.test | 4 +- .../tabulartogseagct/tests/main.nf.test.snap | 96 +++------ 8 files changed, 147 insertions(+), 263 deletions(-) diff --git a/modules/nf-core/custom/matrixfilter/tests/main.nf.test b/modules/nf-core/custom/matrixfilter/tests/main.nf.test index fc4c8ad69bb..c574fc2927d 100644 --- a/modules/nf-core/custom/matrixfilter/tests/main.nf.test +++ b/modules/nf-core/custom/matrixfilter/tests/main.nf.test @@ -25,7 +25,9 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, + { assert snapshot(process.out.filtered).match("filtered") }, + { assert snapshot(process.out.tests).match("tests") }, + { assert snapshot(process.out.versions).match("versions") } ) } } @@ -46,7 +48,9 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, + { assert snapshot(process.out.filtered).match("filtered_stub") }, + { assert snapshot(process.out.tests).match("tests_stub") }, + { assert snapshot(process.out.versions).match("versions_stub") } ) } } diff --git a/modules/nf-core/custom/matrixfilter/tests/main.nf.test.snap b/modules/nf-core/custom/matrixfilter/tests/main.nf.test.snap index b34f0f622b8..520efac0ca7 100644 --- a/modules/nf-core/custom/matrixfilter/tests/main.nf.test.snap +++ b/modules/nf-core/custom/matrixfilter/tests/main.nf.test.snap @@ -1,132 +1,94 @@ { - "test_custom_matrixfilter": { + "filtered_stub": { "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.filtered.tsv:md5,ecc3ca4c6538f9248dce844108474a66" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "test.tests.tsv:md5,9a0f14988df8c1b8975039eed91b85e2" - ] - ], - "2": [ - [ - { - "id": "test" - }, - "R_sessionInfo.log:md5,e19eea53ec9086b4ac47332e354c4cc1" - ] - ], - "3": [ - "versions.yml:md5,275e382be9ca5bdd30ff5d6fc4340616" - ], - "filtered": [ - [ - { - "id": "test" - }, - "test.filtered.tsv:md5,ecc3ca4c6538f9248dce844108474a66" - ] - ], - "session_info": [ - [ - { - "id": "test" - }, - "R_sessionInfo.log:md5,e19eea53ec9086b4ac47332e354c4cc1" - ] - ], - "tests": [ - [ - { - "id": "test" - }, - "test.tests.tsv:md5,9a0f14988df8c1b8975039eed91b85e2" - ] - ], - "versions": [ - "versions.yml:md5,275e382be9ca5bdd30ff5d6fc4340616" + [ + [ + { + "id": "test" + }, + "mock.filtered.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] - } + ] ], "meta": { "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-11T19:46:57.516473857" + "timestamp": "2024-12-11T20:24:23.270885558" }, - "test_custom_matrixfilter - stub": { + "versions_stub": { "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "mock.filtered.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "mock.tests.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test" - }, - "R_sessionInfo.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - "versions.yml:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - "filtered": [ - [ - { - "id": "test" - }, - "mock.filtered.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "session_info": [ - [ - { - "id": "test" - }, - "R_sessionInfo.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "tests": [ - [ - { - "id": "test" - }, - "mock.tests.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + "versions.yml:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-11T20:24:23.286233277" + }, + "tests": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.tests.tsv:md5,9a0f14988df8c1b8975039eed91b85e2" + ] + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-11T20:24:15.105582542" + }, + "tests_stub": { + "content": [ + [ + [ + { + "id": "test" + }, + "mock.tests.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] - } + ] ], "meta": { - "nf-test": "0.9.0", + "nf-test": "0.9.2", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-11T20:24:23.278625607" + }, + "filtered": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.filtered.tsv:md5,ecc3ca4c6538f9248dce844108474a66" + ] + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-11T20:24:15.091697173" + }, + "versions": { + "content": [ + [ + "versions.yml:md5,275e382be9ca5bdd30ff5d6fc4340616" + ] + ], + "meta": { + "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-11T15:31:03.847264377" + "timestamp": "2024-12-11T20:24:15.113337441" } } \ No newline at end of file diff --git a/modules/nf-core/custom/tabulartogseacls/main.nf b/modules/nf-core/custom/tabulartogseacls/main.nf index 23cc3f4d973..43dcd2367ee 100644 --- a/modules/nf-core/custom/tabulartogseacls/main.nf +++ b/modules/nf-core/custom/tabulartogseacls/main.nf @@ -3,9 +3,7 @@ process CUSTOM_TABULARTOGSEACLS { label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'nf-core/ubuntu:20.04' }" + container "community.wave.seqera.io/library/coreutils:8.30--b947da103164f84b" input: tuple val(meta), path(samples) diff --git a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test index c31288b174b..894bae6d8c5 100644 --- a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test +++ b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test @@ -24,7 +24,8 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, + { assert snapshot(process.out.cls).match("cls") } + //not asserting versions - bash version differs between conda and container ) } } @@ -44,7 +45,8 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, + { assert snapshot(process.out.cls).match("cls_stub") } + //not asserting versions - bash version differs between conda and container ) } } diff --git a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap index 55d8c5a5755..5379ef2f857 100644 --- a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap +++ b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap @@ -1,84 +1,44 @@ { - "test_custom_tabulartogseacls - stub": { + "cls_stub": { "content": [ - { - "0": [ - [ - { - "id": "treatment_mCherry_hND6_sample_number", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "sample_number" - }, - "mock.cls:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - "versions.yml:md5,3374690b043ab72b21680ff1f196841e" - ], - "cls": [ - [ - { - "id": "treatment_mCherry_hND6_sample_number", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "sample_number" - }, - "mock.cls:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,3374690b043ab72b21680ff1f196841e" + [ + [ + { + "id": "treatment_mCherry_hND6_sample_number", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "sample_number" + }, + "mock.cls:md5,d41d8cd98f00b204e9800998ecf8427e" ] - } + ] ], "meta": { - "nf-test": "0.9.0", + "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-11T15:49:29.416602434" + "timestamp": "2024-12-11T20:52:24.849486391" }, - "test_custom_tabulartogseacls": { + "cls": { "content": [ - { - "0": [ - [ - { - "id": "treatment_mCherry_hND6_sample_number", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "sample_number" - }, - "treatment_mCherry_hND6_sample_number.cls:md5,7b887159417842b1fe87afebe4f8c2b7" - ] - ], - "1": [ - "versions.yml:md5,3374690b043ab72b21680ff1f196841e" - ], - "cls": [ - [ - { - "id": "treatment_mCherry_hND6_sample_number", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "sample_number" - }, - "treatment_mCherry_hND6_sample_number.cls:md5,7b887159417842b1fe87afebe4f8c2b7" - ] - ], - "versions": [ - "versions.yml:md5,3374690b043ab72b21680ff1f196841e" + [ + [ + { + "id": "treatment_mCherry_hND6_sample_number", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "sample_number" + }, + "treatment_mCherry_hND6_sample_number.cls:md5,7b887159417842b1fe87afebe4f8c2b7" ] - } + ] ], "meta": { - "nf-test": "0.9.0", + "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-11T15:49:20.965285853" + "timestamp": "2024-12-11T20:52:12.548858633" } } \ No newline at end of file diff --git a/modules/nf-core/custom/tabulartogseagct/main.nf b/modules/nf-core/custom/tabulartogseagct/main.nf index 768305b271d..5a4b30f0fd2 100644 --- a/modules/nf-core/custom/tabulartogseagct/main.nf +++ b/modules/nf-core/custom/tabulartogseagct/main.nf @@ -3,9 +3,7 @@ process CUSTOM_TABULARTOGSEAGCT { label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'nf-core/ubuntu:20.04' }" + container "community.wave.seqera.io/library/coreutils:8.30--b947da103164f84b" input: tuple val(meta), path(tabular) diff --git a/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test index 2c3cd77552b..a7def1fe75b 100644 --- a/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test +++ b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test @@ -23,7 +23,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, + { assert snapshot(process.out.gct).match("gct") } ) } } @@ -43,7 +43,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, + { assert snapshot(process.out.gct).match("gct_stub") } ) } } diff --git a/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap index bbf73b8f883..b6c67f0074c 100644 --- a/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap +++ b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap @@ -1,84 +1,44 @@ { - "test_custom_tabulartogseagct": { + "gct_stub": { "content": [ - { - "0": [ - [ - { - "id": "treatment_mCherry_hND6_", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "" - }, - "treatment_mCherry_hND6_.gct:md5,9727aca45da7ebe619a1f964c9813eee" - ] - ], - "1": [ - "versions.yml:md5,de91ab15d8517772e8dc9e8c12c8b552" - ], - "gct": [ - [ - { - "id": "treatment_mCherry_hND6_", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "" - }, - "treatment_mCherry_hND6_.gct:md5,9727aca45da7ebe619a1f964c9813eee" - ] - ], - "versions": [ - "versions.yml:md5,de91ab15d8517772e8dc9e8c12c8b552" + [ + [ + { + "id": "treatment_mCherry_hND6_", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "" + }, + "mock.gct:md5,d41d8cd98f00b204e9800998ecf8427e" ] - } + ] ], "meta": { - "nf-test": "0.9.0", + "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-11T17:35:50.398934861" + "timestamp": "2024-12-11T20:55:04.058475275" }, - "test_custom_tabulartogseagct - stub": { + "gct": { "content": [ - { - "0": [ - [ - { - "id": "treatment_mCherry_hND6_", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "" - }, - "mock.gct:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - "versions.yml:md5,de91ab15d8517772e8dc9e8c12c8b552" - ], - "gct": [ - [ - { - "id": "treatment_mCherry_hND6_", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "" - }, - "mock.gct:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,de91ab15d8517772e8dc9e8c12c8b552" + [ + [ + { + "id": "treatment_mCherry_hND6_", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "" + }, + "treatment_mCherry_hND6_.gct:md5,9727aca45da7ebe619a1f964c9813eee" ] - } + ] ], "meta": { - "nf-test": "0.9.0", + "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-11T17:35:58.084545848" + "timestamp": "2024-12-11T20:54:51.98922569" } } \ No newline at end of file From 3ae8c7cdb1626eaed094c85b46dfbe02aea766e2 Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Thu, 12 Dec 2024 16:39:01 +0000 Subject: [PATCH 04/14] Update versions.yml file --- .../nf-core/custom/tabulartogseacls/main.nf | 4 +- .../tabulartogseacls/tests/main.nf.test | 6 +- .../tabulartogseacls/tests/main.nf.test.snap | 92 +++++++++++++------ .../nf-core/custom/tabulartogseagct/main.nf | 4 +- .../tabulartogseagct/tests/main.nf.test | 4 +- .../tabulartogseagct/tests/main.nf.test.snap | 92 +++++++++++++------ 6 files changed, 140 insertions(+), 62 deletions(-) diff --git a/modules/nf-core/custom/tabulartogseacls/main.nf b/modules/nf-core/custom/tabulartogseacls/main.nf index 43dcd2367ee..57cc682809b 100644 --- a/modules/nf-core/custom/tabulartogseacls/main.nf +++ b/modules/nf-core/custom/tabulartogseacls/main.nf @@ -36,7 +36,7 @@ process CUSTOM_TABULARTOGSEACLS { cat <<-END_VERSIONS > versions.yml "${task.process}": - bash: \$(echo \$(bash --version | grep -Eo 'version [[:alnum:].]+' | sed 's/version //')) + awk: " \$(awk --version | head -n 1 | awk '{print \$2}')" END_VERSIONS """ @@ -45,7 +45,7 @@ process CUSTOM_TABULARTOGSEACLS { touch mock.cls cat <<-END_VERSIONS > versions.yml "${task.process}": - bash: \$(echo \$(bash --version | grep -Eo 'version [[:alnum:].]+' | sed 's/version //')) + awk: " \$(awk --version | head -n 1 | awk '{print \$2}')" END_VERSIONS """ diff --git a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test index 894bae6d8c5..3ccb455e33c 100644 --- a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test +++ b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test @@ -24,8 +24,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out.cls).match("cls") } - //not asserting versions - bash version differs between conda and container + { assert snapshot(process.out).match() } ) } } @@ -45,8 +44,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out.cls).match("cls_stub") } - //not asserting versions - bash version differs between conda and container + { assert snapshot(process.out).match() } ) } } diff --git a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap index 5379ef2f857..37cf679fc48 100644 --- a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap +++ b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap @@ -1,44 +1,84 @@ { - "cls_stub": { + "test_custom_tabulartogseacls - stub": { "content": [ - [ - [ - { - "id": "treatment_mCherry_hND6_sample_number", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "sample_number" - }, - "mock.cls:md5,d41d8cd98f00b204e9800998ecf8427e" + { + "0": [ + [ + { + "id": "treatment_mCherry_hND6_sample_number", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "sample_number" + }, + "mock.cls:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,11279ab8dbaaae901af42e4f6374f843" + ], + "cls": [ + [ + { + "id": "treatment_mCherry_hND6_sample_number", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "sample_number" + }, + "mock.cls:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,11279ab8dbaaae901af42e4f6374f843" ] - ] + } ], "meta": { "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-11T20:52:24.849486391" + "timestamp": "2024-12-12T16:38:40.035347462" }, - "cls": { + "test_custom_tabulartogseacls": { "content": [ - [ - [ - { - "id": "treatment_mCherry_hND6_sample_number", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "sample_number" - }, - "treatment_mCherry_hND6_sample_number.cls:md5,7b887159417842b1fe87afebe4f8c2b7" + { + "0": [ + [ + { + "id": "treatment_mCherry_hND6_sample_number", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "sample_number" + }, + "treatment_mCherry_hND6_sample_number.cls:md5,7b887159417842b1fe87afebe4f8c2b7" + ] + ], + "1": [ + "versions.yml:md5,11279ab8dbaaae901af42e4f6374f843" + ], + "cls": [ + [ + { + "id": "treatment_mCherry_hND6_sample_number", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "sample_number" + }, + "treatment_mCherry_hND6_sample_number.cls:md5,7b887159417842b1fe87afebe4f8c2b7" + ] + ], + "versions": [ + "versions.yml:md5,11279ab8dbaaae901af42e4f6374f843" ] - ] + } ], "meta": { "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-11T20:52:12.548858633" + "timestamp": "2024-12-12T16:38:24.062368024" } } \ No newline at end of file diff --git a/modules/nf-core/custom/tabulartogseagct/main.nf b/modules/nf-core/custom/tabulartogseagct/main.nf index 5a4b30f0fd2..0528c68f133 100644 --- a/modules/nf-core/custom/tabulartogseagct/main.nf +++ b/modules/nf-core/custom/tabulartogseagct/main.nf @@ -32,7 +32,7 @@ process CUSTOM_TABULARTOGSEAGCT { cat <<-END_VERSIONS > versions.yml "${task.process}": - bash: \$(echo \$(bash --version | grep -Eo 'version [[:alnum:].]+' | sed 's/version //')) + awk: " \$(awk --version | head -n 1 | awk '{print \$2}')" END_VERSIONS """ @@ -41,7 +41,7 @@ process CUSTOM_TABULARTOGSEAGCT { touch mock.gct cat <<-END_VERSIONS > versions.yml "${task.process}": - bash: \$(echo \$(bash --version | grep -Eo 'version [[:alnum:].]+' | sed 's/version //')) + awk: " \$(awk --version | head -n 1 | awk '{print \$2}')" END_VERSIONS """ } diff --git a/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test index a7def1fe75b..4bf65b1226b 100644 --- a/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test +++ b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test @@ -23,7 +23,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out.gct).match("gct") } + { assert snapshot(process.out).match() } ) } } @@ -43,7 +43,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out.gct).match("gct_stub") } + { assert snapshot(process.out).match() } ) } } diff --git a/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap index b6c67f0074c..e4d9ff27453 100644 --- a/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap +++ b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap @@ -1,44 +1,84 @@ { - "gct_stub": { + "test_custom_tabulartogseagct": { "content": [ - [ - [ - { - "id": "treatment_mCherry_hND6_", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "" - }, - "mock.gct:md5,d41d8cd98f00b204e9800998ecf8427e" + { + "0": [ + [ + { + "id": "treatment_mCherry_hND6_", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "" + }, + "treatment_mCherry_hND6_.gct:md5,9727aca45da7ebe619a1f964c9813eee" + ] + ], + "1": [ + "versions.yml:md5,a03a1eba64f12dbaea69a810d50e8e71" + ], + "gct": [ + [ + { + "id": "treatment_mCherry_hND6_", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "" + }, + "treatment_mCherry_hND6_.gct:md5,9727aca45da7ebe619a1f964c9813eee" + ] + ], + "versions": [ + "versions.yml:md5,a03a1eba64f12dbaea69a810d50e8e71" ] - ] + } ], "meta": { "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-11T20:55:04.058475275" + "timestamp": "2024-12-12T16:37:43.62626877" }, - "gct": { + "test_custom_tabulartogseagct - stub": { "content": [ - [ - [ - { - "id": "treatment_mCherry_hND6_", - "variable": "treatment", - "reference": "mCherry", - "target": "hND6", - "blocking": "" - }, - "treatment_mCherry_hND6_.gct:md5,9727aca45da7ebe619a1f964c9813eee" + { + "0": [ + [ + { + "id": "treatment_mCherry_hND6_", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "" + }, + "mock.gct:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,a03a1eba64f12dbaea69a810d50e8e71" + ], + "gct": [ + [ + { + "id": "treatment_mCherry_hND6_", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "" + }, + "mock.gct:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,a03a1eba64f12dbaea69a810d50e8e71" ] - ] + } ], "meta": { "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-11T20:54:51.98922569" + "timestamp": "2024-12-12T16:37:55.39497625" } } \ No newline at end of file From 35b031d58403f1c9671b5f4ef6a32b659daba4e9 Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Thu, 12 Dec 2024 16:50:38 +0000 Subject: [PATCH 05/14] Update version generation --- modules/nf-core/custom/tabulartogseacls/main.nf | 4 ++-- modules/nf-core/custom/tabulartogseagct/main.nf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/custom/tabulartogseacls/main.nf b/modules/nf-core/custom/tabulartogseacls/main.nf index 57cc682809b..686421eb744 100644 --- a/modules/nf-core/custom/tabulartogseacls/main.nf +++ b/modules/nf-core/custom/tabulartogseacls/main.nf @@ -36,7 +36,7 @@ process CUSTOM_TABULARTOGSEACLS { cat <<-END_VERSIONS > versions.yml "${task.process}": - awk: " \$(awk --version | head -n 1 | awk '{print \$2}')" + awk: " \$(mawk -W version | head -n 1 | awk '{print \$2}')" END_VERSIONS """ @@ -45,7 +45,7 @@ process CUSTOM_TABULARTOGSEACLS { touch mock.cls cat <<-END_VERSIONS > versions.yml "${task.process}": - awk: " \$(awk --version | head -n 1 | awk '{print \$2}')" + awk: " \$(mawk -W version | head -n 1 | awk '{print \$2}')" END_VERSIONS """ diff --git a/modules/nf-core/custom/tabulartogseagct/main.nf b/modules/nf-core/custom/tabulartogseagct/main.nf index 0528c68f133..56fc890f935 100644 --- a/modules/nf-core/custom/tabulartogseagct/main.nf +++ b/modules/nf-core/custom/tabulartogseagct/main.nf @@ -32,7 +32,7 @@ process CUSTOM_TABULARTOGSEAGCT { cat <<-END_VERSIONS > versions.yml "${task.process}": - awk: " \$(awk --version | head -n 1 | awk '{print \$2}')" + awk: " \$(mawk -W version | head -n 1 | awk '{print \$2}')" END_VERSIONS """ @@ -41,7 +41,7 @@ process CUSTOM_TABULARTOGSEAGCT { touch mock.gct cat <<-END_VERSIONS > versions.yml "${task.process}": - awk: " \$(awk --version | head -n 1 | awk '{print \$2}')" + awk: " \$(mawk -W version | head -n 1 | awk '{print \$2}')" END_VERSIONS """ } From 96ee087579fc0697b9ded0907b6035001c2ac3f4 Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Thu, 12 Dec 2024 17:25:40 +0000 Subject: [PATCH 06/14] Update versions command --- modules/nf-core/custom/tabulartogseacls/main.nf | 4 ++-- .../custom/tabulartogseacls/tests/main.nf.test.snap | 12 ++++++------ modules/nf-core/custom/tabulartogseagct/main.nf | 4 ++-- .../custom/tabulartogseagct/tests/main.nf.test.snap | 12 ++++++------ 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/nf-core/custom/tabulartogseacls/main.nf b/modules/nf-core/custom/tabulartogseacls/main.nf index 686421eb744..489b34e2649 100644 --- a/modules/nf-core/custom/tabulartogseacls/main.nf +++ b/modules/nf-core/custom/tabulartogseacls/main.nf @@ -36,7 +36,7 @@ process CUSTOM_TABULARTOGSEACLS { cat <<-END_VERSIONS > versions.yml "${task.process}": - awk: " \$(mawk -W version | head -n 1 | awk '{print \$2}')" + awk: "\$(mawk -W version | head -n 1 | awk '{print \$2}')" END_VERSIONS """ @@ -45,7 +45,7 @@ process CUSTOM_TABULARTOGSEACLS { touch mock.cls cat <<-END_VERSIONS > versions.yml "${task.process}": - awk: " \$(mawk -W version | head -n 1 | awk '{print \$2}')" + awk: "\$(mawk -W version | head -n 1 | awk '{print \$2}')" END_VERSIONS """ diff --git a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap index 37cf679fc48..8ccab14d44c 100644 --- a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap +++ b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap @@ -15,7 +15,7 @@ ] ], "1": [ - "versions.yml:md5,11279ab8dbaaae901af42e4f6374f843" + "versions.yml:md5,3292824aca58393a8d4c220c13160e2d" ], "cls": [ [ @@ -30,7 +30,7 @@ ] ], "versions": [ - "versions.yml:md5,11279ab8dbaaae901af42e4f6374f843" + "versions.yml:md5,3292824aca58393a8d4c220c13160e2d" ] } ], @@ -38,7 +38,7 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-12T16:38:40.035347462" + "timestamp": "2024-12-12T17:24:29.030129753" }, "test_custom_tabulartogseacls": { "content": [ @@ -56,7 +56,7 @@ ] ], "1": [ - "versions.yml:md5,11279ab8dbaaae901af42e4f6374f843" + "versions.yml:md5,3292824aca58393a8d4c220c13160e2d" ], "cls": [ [ @@ -71,7 +71,7 @@ ] ], "versions": [ - "versions.yml:md5,11279ab8dbaaae901af42e4f6374f843" + "versions.yml:md5,3292824aca58393a8d4c220c13160e2d" ] } ], @@ -79,6 +79,6 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-12T16:38:24.062368024" + "timestamp": "2024-12-12T17:24:22.477107678" } } \ No newline at end of file diff --git a/modules/nf-core/custom/tabulartogseagct/main.nf b/modules/nf-core/custom/tabulartogseagct/main.nf index 56fc890f935..e56eca8cddd 100644 --- a/modules/nf-core/custom/tabulartogseagct/main.nf +++ b/modules/nf-core/custom/tabulartogseagct/main.nf @@ -32,7 +32,7 @@ process CUSTOM_TABULARTOGSEAGCT { cat <<-END_VERSIONS > versions.yml "${task.process}": - awk: " \$(mawk -W version | head -n 1 | awk '{print \$2}')" + awk: "\$(mawk -W version | head -n 1 | awk '{print \$2}')" END_VERSIONS """ @@ -41,7 +41,7 @@ process CUSTOM_TABULARTOGSEAGCT { touch mock.gct cat <<-END_VERSIONS > versions.yml "${task.process}": - awk: " \$(mawk -W version | head -n 1 | awk '{print \$2}')" + awk: "\$(mawk -W version | head -n 1 | awk '{print \$2}')" END_VERSIONS """ } diff --git a/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap index e4d9ff27453..20d7cd188ff 100644 --- a/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap +++ b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap @@ -15,7 +15,7 @@ ] ], "1": [ - "versions.yml:md5,a03a1eba64f12dbaea69a810d50e8e71" + "versions.yml:md5,a41674c38533c385e25a3a3e34d6d572" ], "gct": [ [ @@ -30,7 +30,7 @@ ] ], "versions": [ - "versions.yml:md5,a03a1eba64f12dbaea69a810d50e8e71" + "versions.yml:md5,a41674c38533c385e25a3a3e34d6d572" ] } ], @@ -38,7 +38,7 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-12T16:37:43.62626877" + "timestamp": "2024-12-12T17:25:09.325803613" }, "test_custom_tabulartogseagct - stub": { "content": [ @@ -56,7 +56,7 @@ ] ], "1": [ - "versions.yml:md5,a03a1eba64f12dbaea69a810d50e8e71" + "versions.yml:md5,a41674c38533c385e25a3a3e34d6d572" ], "gct": [ [ @@ -71,7 +71,7 @@ ] ], "versions": [ - "versions.yml:md5,a03a1eba64f12dbaea69a810d50e8e71" + "versions.yml:md5,a41674c38533c385e25a3a3e34d6d572" ] } ], @@ -79,6 +79,6 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-12T16:37:55.39497625" + "timestamp": "2024-12-12T17:25:20.610870351" } } \ No newline at end of file From b459baf9addef43288f834dc9c6357aaf7ef0089 Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Thu, 12 Dec 2024 18:19:22 +0000 Subject: [PATCH 07/14] Removed quotes from versions --- modules/nf-core/custom/tabulartogseacls/main.nf | 4 ++-- .../custom/tabulartogseacls/tests/main.nf.test.snap | 12 ++++++------ modules/nf-core/custom/tabulartogseagct/main.nf | 4 ++-- .../custom/tabulartogseagct/tests/main.nf.test.snap | 12 ++++++------ 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/nf-core/custom/tabulartogseacls/main.nf b/modules/nf-core/custom/tabulartogseacls/main.nf index 489b34e2649..574576ca212 100644 --- a/modules/nf-core/custom/tabulartogseacls/main.nf +++ b/modules/nf-core/custom/tabulartogseacls/main.nf @@ -36,7 +36,7 @@ process CUSTOM_TABULARTOGSEACLS { cat <<-END_VERSIONS > versions.yml "${task.process}": - awk: "\$(mawk -W version | head -n 1 | awk '{print \$2}')" + awk: \$(mawk -W version | head -n 1 | awk '{print \$2}') END_VERSIONS """ @@ -45,7 +45,7 @@ process CUSTOM_TABULARTOGSEACLS { touch mock.cls cat <<-END_VERSIONS > versions.yml "${task.process}": - awk: "\$(mawk -W version | head -n 1 | awk '{print \$2}')" + awk: \$(mawk -W version | head -n 1 | awk '{print \$2}') END_VERSIONS """ diff --git a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap index 8ccab14d44c..6e16d27c21a 100644 --- a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap +++ b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap @@ -15,7 +15,7 @@ ] ], "1": [ - "versions.yml:md5,3292824aca58393a8d4c220c13160e2d" + "versions.yml:md5,bdeacaf3413865c27625dce2b7adcd9e" ], "cls": [ [ @@ -30,7 +30,7 @@ ] ], "versions": [ - "versions.yml:md5,3292824aca58393a8d4c220c13160e2d" + "versions.yml:md5,bdeacaf3413865c27625dce2b7adcd9e" ] } ], @@ -38,7 +38,7 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-12T17:24:29.030129753" + "timestamp": "2024-12-12T18:12:13.838536831" }, "test_custom_tabulartogseacls": { "content": [ @@ -56,7 +56,7 @@ ] ], "1": [ - "versions.yml:md5,3292824aca58393a8d4c220c13160e2d" + "versions.yml:md5,bdeacaf3413865c27625dce2b7adcd9e" ], "cls": [ [ @@ -71,7 +71,7 @@ ] ], "versions": [ - "versions.yml:md5,3292824aca58393a8d4c220c13160e2d" + "versions.yml:md5,bdeacaf3413865c27625dce2b7adcd9e" ] } ], @@ -79,6 +79,6 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-12T17:24:22.477107678" + "timestamp": "2024-12-12T18:12:07.37704262" } } \ No newline at end of file diff --git a/modules/nf-core/custom/tabulartogseagct/main.nf b/modules/nf-core/custom/tabulartogseagct/main.nf index e56eca8cddd..1f32642079d 100644 --- a/modules/nf-core/custom/tabulartogseagct/main.nf +++ b/modules/nf-core/custom/tabulartogseagct/main.nf @@ -32,7 +32,7 @@ process CUSTOM_TABULARTOGSEAGCT { cat <<-END_VERSIONS > versions.yml "${task.process}": - awk: "\$(mawk -W version | head -n 1 | awk '{print \$2}')" + awk: \$(mawk -W version | head -n 1 | awk '{print \$2}') END_VERSIONS """ @@ -41,7 +41,7 @@ process CUSTOM_TABULARTOGSEAGCT { touch mock.gct cat <<-END_VERSIONS > versions.yml "${task.process}": - awk: "\$(mawk -W version | head -n 1 | awk '{print \$2}')" + awk: \$(mawk -W version | head -n 1 | awk '{print \$2}') END_VERSIONS """ } diff --git a/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap index 20d7cd188ff..57622c0ab03 100644 --- a/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap +++ b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap @@ -15,7 +15,7 @@ ] ], "1": [ - "versions.yml:md5,a41674c38533c385e25a3a3e34d6d572" + "versions.yml:md5,2cafb8acd2b6a49ec44971051349eb17" ], "gct": [ [ @@ -30,7 +30,7 @@ ] ], "versions": [ - "versions.yml:md5,a41674c38533c385e25a3a3e34d6d572" + "versions.yml:md5,2cafb8acd2b6a49ec44971051349eb17" ] } ], @@ -38,7 +38,7 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-12T17:25:09.325803613" + "timestamp": "2024-12-12T18:19:06.417454464" }, "test_custom_tabulartogseagct - stub": { "content": [ @@ -56,7 +56,7 @@ ] ], "1": [ - "versions.yml:md5,a41674c38533c385e25a3a3e34d6d572" + "versions.yml:md5,2cafb8acd2b6a49ec44971051349eb17" ], "gct": [ [ @@ -71,7 +71,7 @@ ] ], "versions": [ - "versions.yml:md5,a41674c38533c385e25a3a3e34d6d572" + "versions.yml:md5,2cafb8acd2b6a49ec44971051349eb17" ] } ], @@ -79,6 +79,6 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-12T17:25:20.610870351" + "timestamp": "2024-12-12T18:19:13.456306174" } } \ No newline at end of file From 816ff3b787af7e12e75a7d95f76b631f474853ee Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Thu, 12 Dec 2024 20:01:27 +0000 Subject: [PATCH 08/14] add modules to pytest-workflow excludes --- .github/workflows/pytest-workflow.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index 01fa7f39a98..0221d340068 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -117,6 +117,12 @@ jobs: tags: controlfreec/makegraph2 - profile: conda tags: coreograph + - profile: conda + tags: custom/matrixfilter + - profile: conda + tags: custom/tabulartogseacls + - profile: conda + tags: custom/tabulartogseagct - profile: conda tags: deepcell/mesmer - profile: conda From b63fed293cc56fa3ab8120991b1ae8be5749425b Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Fri, 13 Dec 2024 21:26:07 +0000 Subject: [PATCH 09/14] Addressing PR comments --- .github/workflows/pytest-workflow.yml | 6 - modules/nf-core/custom/matrixfilter/main.nf | 17 ++- .../custom/matrixfilter/tests/main.nf.test | 10 +- .../matrixfilter/tests/main.nf.test.snap | 125 +++++++++--------- .../custom/matrixfilter/tests/nextflow.config | 22 +-- .../nf-core/custom/tabulartogseacls/main.nf | 3 +- .../tabulartogseacls/tests/main.nf.test.snap | 8 +- .../tabulartogseacls/tests/nextflow.config | 2 +- .../nf-core/custom/tabulartogseagct/main.nf | 3 +- .../tabulartogseagct/tests/main.nf.test.snap | 8 +- .../nf-core/custom/matrixfilter/main.nf | 85 ------------ .../custom/matrixfilter/nextflow.config | 33 ----- .../nf-core/custom/matrixfilter/test.yml | 64 --------- .../nf-core/custom/tabulartogseacls/main.nf | 47 ------- .../custom/tabulartogseacls/nextflow.config | 14 -- .../nf-core/custom/tabulartogseacls/test.yml | 26 ---- .../nf-core/custom/tabulartogseagct/main.nf | 78 ----------- .../custom/tabulartogseagct/nextflow.config | 12 -- .../nf-core/custom/tabulartogseagct/test.yml | 35 ----- 19 files changed, 96 insertions(+), 502 deletions(-) delete mode 100644 tests/modules/nf-core/custom/matrixfilter/main.nf delete mode 100644 tests/modules/nf-core/custom/matrixfilter/nextflow.config delete mode 100644 tests/modules/nf-core/custom/matrixfilter/test.yml delete mode 100644 tests/modules/nf-core/custom/tabulartogseacls/main.nf delete mode 100644 tests/modules/nf-core/custom/tabulartogseacls/nextflow.config delete mode 100644 tests/modules/nf-core/custom/tabulartogseacls/test.yml delete mode 100644 tests/modules/nf-core/custom/tabulartogseagct/main.nf delete mode 100644 tests/modules/nf-core/custom/tabulartogseagct/nextflow.config delete mode 100644 tests/modules/nf-core/custom/tabulartogseagct/test.yml diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index 0221d340068..01fa7f39a98 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -117,12 +117,6 @@ jobs: tags: controlfreec/makegraph2 - profile: conda tags: coreograph - - profile: conda - tags: custom/matrixfilter - - profile: conda - tags: custom/tabulartogseacls - - profile: conda - tags: custom/tabulartogseagct - profile: conda tags: deepcell/mesmer - profile: conda diff --git a/modules/nf-core/custom/matrixfilter/main.nf b/modules/nf-core/custom/matrixfilter/main.nf index c5f2d8fcfb6..8d52e4060fa 100644 --- a/modules/nf-core/custom/matrixfilter/main.nf +++ b/modules/nf-core/custom/matrixfilter/main.nf @@ -11,7 +11,7 @@ process CUSTOM_MATRIXFILTER { output: tuple val(meta), path("*.filtered.tsv") , emit: filtered tuple val(meta), path("*.tests.tsv") , emit: tests - tuple val(meta), path("R_sessionInfo.log") , emit: session_info + tuple val(meta), path("*R_sessionInfo.log") , emit: session_info path "versions.yml" , emit: versions when: @@ -25,12 +25,17 @@ process CUSTOM_MATRIXFILTER { // (new variables defined here don't seem to be available in templates, so // we have to access $task directly) template 'matrixfilter.R' - + stub: + def prefix = task.ext.prefix ?: "${meta.id}" """ - touch mock.filtered.tsv - touch mock.tests.tsv - touch R_sessionInfo.log - touch versions.yml + touch ${prefix}.filtered.tsv + touch ${prefix}.tests.tsv + touch ${prefix}.R_sessionInfo.log + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//') + END_VERSIONS """ } diff --git a/modules/nf-core/custom/matrixfilter/tests/main.nf.test b/modules/nf-core/custom/matrixfilter/tests/main.nf.test index c574fc2927d..d78ba5a9672 100644 --- a/modules/nf-core/custom/matrixfilter/tests/main.nf.test +++ b/modules/nf-core/custom/matrixfilter/tests/main.nf.test @@ -25,9 +25,9 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out.filtered).match("filtered") }, - { assert snapshot(process.out.tests).match("tests") }, - { assert snapshot(process.out.versions).match("versions") } + { assert snapshot(process.out.filtered, + process.out.tests, + process.out.versions).match() } ) } } @@ -48,9 +48,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out.filtered).match("filtered_stub") }, - { assert snapshot(process.out.tests).match("tests_stub") }, - { assert snapshot(process.out.versions).match("versions_stub") } + { assert snapshot(process.out).match() } ) } } diff --git a/modules/nf-core/custom/matrixfilter/tests/main.nf.test.snap b/modules/nf-core/custom/matrixfilter/tests/main.nf.test.snap index 520efac0ca7..1d879d8cfb3 100644 --- a/modules/nf-core/custom/matrixfilter/tests/main.nf.test.snap +++ b/modules/nf-core/custom/matrixfilter/tests/main.nf.test.snap @@ -1,35 +1,14 @@ { - "filtered_stub": { + "test_custom_matrixfilter": { "content": [ [ [ { "id": "test" }, - "mock.filtered.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.filtered.tsv:md5,ecc3ca4c6538f9248dce844108474a66" ] - ] - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" - }, - "timestamp": "2024-12-11T20:24:23.270885558" - }, - "versions_stub": { - "content": [ - [ - "versions.yml:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" - }, - "timestamp": "2024-12-11T20:24:23.286233277" - }, - "tests": { - "content": [ + ], [ [ { @@ -37,58 +16,80 @@ }, "test.tests.tsv:md5,9a0f14988df8c1b8975039eed91b85e2" ] - ] - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" - }, - "timestamp": "2024-12-11T20:24:15.105582542" - }, - "tests_stub": { - "content": [ + ], [ - [ - { - "id": "test" - }, - "mock.tests.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + "versions.yml:md5,275e382be9ca5bdd30ff5d6fc4340616" ] ], "meta": { "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-11T20:24:23.278625607" + "timestamp": "2024-12-13T21:21:11.862199262" }, - "filtered": { + "test_custom_matrixfilter - stub": { "content": [ - [ - [ - { - "id": "test" - }, - "test.filtered.tsv:md5,ecc3ca4c6538f9248dce844108474a66" + { + "0": [ + [ + { + "id": "test" + }, + "test.filtered.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test.tests.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test" + }, + "test.R_sessionInfo.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,275e382be9ca5bdd30ff5d6fc4340616" + ], + "filtered": [ + [ + { + "id": "test" + }, + "test.filtered.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "session_info": [ + [ + { + "id": "test" + }, + "test.R_sessionInfo.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tests": [ + [ + { + "id": "test" + }, + "test.tests.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,275e382be9ca5bdd30ff5d6fc4340616" ] - ] - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" - }, - "timestamp": "2024-12-11T20:24:15.091697173" - }, - "versions": { - "content": [ - [ - "versions.yml:md5,275e382be9ca5bdd30ff5d6fc4340616" - ] + } ], "meta": { "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-11T20:24:15.113337441" + "timestamp": "2024-12-13T21:22:31.144793503" } } \ No newline at end of file diff --git a/modules/nf-core/custom/matrixfilter/tests/nextflow.config b/modules/nf-core/custom/matrixfilter/tests/nextflow.config index 256de960c9a..91f067109dd 100644 --- a/modules/nf-core/custom/matrixfilter/tests/nextflow.config +++ b/modules/nf-core/custom/matrixfilter/tests/nextflow.config @@ -1,21 +1,9 @@ -params { - observations_id_col = 'sample' - filtering_min_samples = 1.0 - filtering_min_abundance = 10 - filtering_min_proportion = null - filtering_grouping_var = null - filtering_min_proportion_not_na = 0.5 - filtering_min_samples_not_na = null -} process { ext.prefix = { "${meta.id}" } ext.args = [ - "--sample_id_col \"${params.observations_id_col}\"", - "--minimum_samples ${params.filtering_min_samples}", - "--minimum_abundance ${params.filtering_min_abundance}", - (params.filtering_min_proportion ? "--minimum_proportion ${params.filtering_min_proportion}" : ''), - (params.filtering_grouping_var ? "--grouping_variable \"${params.filtering_grouping_var}\"" : ''), - (params.filtering_min_proportion_not_na ? "--minimum_proportion_not_na \"${params.filtering_min_proportion_not_na}\"" : ''), - (params.filtering_min_samples_not_na ? "--minimum_samples_not_na \"${params.filtering_min_samples_not_na}\"" : '') + "--sample_id_col \"sample\"", + "--minimum_samples 1.0", + "--minimum_abundance 10", + "--minimum_proportion_not_na \"0.5\"" ].join(' ').trim() - } +} diff --git a/modules/nf-core/custom/tabulartogseacls/main.nf b/modules/nf-core/custom/tabulartogseacls/main.nf index 574576ca212..c1babad9784 100644 --- a/modules/nf-core/custom/tabulartogseacls/main.nf +++ b/modules/nf-core/custom/tabulartogseacls/main.nf @@ -41,8 +41,9 @@ process CUSTOM_TABULARTOGSEACLS { """ stub: + def prefix = task.ext.prefix ?: "${meta.id}" """ - touch mock.cls + touch ${prefix}.cls cat <<-END_VERSIONS > versions.yml "${task.process}": awk: \$(mawk -W version | head -n 1 | awk '{print \$2}') diff --git a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap index 6e16d27c21a..3c808a4a0cf 100644 --- a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap +++ b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test.snap @@ -11,7 +11,7 @@ "target": "hND6", "blocking": "sample_number" }, - "mock.cls:md5,d41d8cd98f00b204e9800998ecf8427e" + "treatment_mCherry_hND6_sample_number.cls:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "1": [ @@ -26,7 +26,7 @@ "target": "hND6", "blocking": "sample_number" }, - "mock.cls:md5,d41d8cd98f00b204e9800998ecf8427e" + "treatment_mCherry_hND6_sample_number.cls:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "versions": [ @@ -38,7 +38,7 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-12T18:12:13.838536831" + "timestamp": "2024-12-13T21:25:30.548463583" }, "test_custom_tabulartogseacls": { "content": [ @@ -79,6 +79,6 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-12T18:12:07.37704262" + "timestamp": "2024-12-13T21:25:22.003232009" } } \ No newline at end of file diff --git a/modules/nf-core/custom/tabulartogseacls/tests/nextflow.config b/modules/nf-core/custom/tabulartogseacls/tests/nextflow.config index 035b67de8f8..093f1d7d82b 100644 --- a/modules/nf-core/custom/tabulartogseacls/tests/nextflow.config +++ b/modules/nf-core/custom/tabulartogseacls/tests/nextflow.config @@ -1,3 +1,3 @@ process { - ext.args = { [ "separator": "\t", "variable": "$meta.variable" ] } + ext.args = { [ "separator": "\t", "variable": "treatment" ] } } diff --git a/modules/nf-core/custom/tabulartogseagct/main.nf b/modules/nf-core/custom/tabulartogseagct/main.nf index 1f32642079d..ca9b39f93ff 100644 --- a/modules/nf-core/custom/tabulartogseagct/main.nf +++ b/modules/nf-core/custom/tabulartogseagct/main.nf @@ -37,8 +37,9 @@ process CUSTOM_TABULARTOGSEAGCT { """ stub: + def prefix = task.ext.prefix ?: "${meta.id}" """ - touch mock.gct + touch ${prefix}.gct cat <<-END_VERSIONS > versions.yml "${task.process}": awk: \$(mawk -W version | head -n 1 | awk '{print \$2}') diff --git a/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap index 57622c0ab03..612b8b14405 100644 --- a/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap +++ b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test.snap @@ -38,7 +38,7 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-12T18:19:06.417454464" + "timestamp": "2024-12-13T21:25:51.307267504" }, "test_custom_tabulartogseagct - stub": { "content": [ @@ -52,7 +52,7 @@ "target": "hND6", "blocking": "" }, - "mock.gct:md5,d41d8cd98f00b204e9800998ecf8427e" + "treatment_mCherry_hND6_.gct:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "1": [ @@ -67,7 +67,7 @@ "target": "hND6", "blocking": "" }, - "mock.gct:md5,d41d8cd98f00b204e9800998ecf8427e" + "treatment_mCherry_hND6_.gct:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "versions": [ @@ -79,6 +79,6 @@ "nf-test": "0.9.2", "nextflow": "24.10.2" }, - "timestamp": "2024-12-12T18:19:13.456306174" + "timestamp": "2024-12-13T21:25:59.490069672" } } \ No newline at end of file diff --git a/tests/modules/nf-core/custom/matrixfilter/main.nf b/tests/modules/nf-core/custom/matrixfilter/main.nf deleted file mode 100644 index 4f95cb1a607..00000000000 --- a/tests/modules/nf-core/custom/matrixfilter/main.nf +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { CUSTOM_MATRIXFILTER } from '../../../../../modules/nf-core/custom/matrixfilter/main.nf' - -empty_samplesheet = [[],[]] - -workflow test_custom_matrixfilter { - - expression_matrix_file = file(params.test_data['mus_musculus']['genome']['rnaseq_matrix'], checkIfExists: true) - - ch_samples_matrix = [ [ "id":"SRP254919" ], expression_matrix_file ] - - CUSTOM_MATRIXFILTER( - ch_samples_matrix, - empty_samplesheet - ) -} - -workflow test_custom_matrixfilter_prop { - - expression_matrix_file = file(params.test_data['mus_musculus']['genome']['rnaseq_matrix'], checkIfExists: true) - - ch_samples_matrix = [ [ "id":"SRP254919" ], expression_matrix_file ] - - CUSTOM_MATRIXFILTER( - ch_samples_matrix, - empty_samplesheet - ) -} - -workflow test_custom_matrixfilter_group { - - expression_sample_sheet = file(params.test_data['mus_musculus']['genome']['rnaseq_samplesheet'], checkIfExists: true) - expression_matrix_file = file(params.test_data['mus_musculus']['genome']['rnaseq_matrix'], checkIfExists: true) - - ch_samples_matrix = [ [ "id":"SRP254919" ], expression_matrix_file ] - ch_samplesheet = [ [ "id":"SRP254919" ], expression_sample_sheet ] - - CUSTOM_MATRIXFILTER( - ch_samples_matrix, - ch_samplesheet - ) -} - -workflow test_custom_matrixfilter_na_prop { - - expression_sample_sheet = file(params.test_data['proteomics']['maxquant']['mq_samplesheet'], checkIfExists: true) - expression_matrix_file = file(params.test_data['proteomics']['maxquant']['mq_proteus_mat'], checkIfExists: true) - - ch_samples_matrix = [ [ "id":"mq_prop" ], expression_matrix_file ] - ch_samplesheet = [ [ "id":"mq_prop" ], expression_sample_sheet ] - - CUSTOM_MATRIXFILTER( - ch_samples_matrix, - ch_samplesheet - ) -} - -workflow test_custom_matrixfilter_na_samples { - - expression_sample_sheet = file(params.test_data['proteomics']['maxquant']['mq_samplesheet'], checkIfExists: true) - expression_matrix_file = file(params.test_data['proteomics']['maxquant']['mq_proteus_mat'], checkIfExists: true) - - ch_samples_matrix = [ [ "id":"mq_samples" ], expression_matrix_file ] - ch_samplesheet = [ [ "id":"mq_samples" ], expression_sample_sheet ] - - CUSTOM_MATRIXFILTER( - ch_samples_matrix, - ch_samplesheet - ) -} - -workflow test_custom_matrixfilter_var { - - expression_matrix_file = file(params.test_data['mus_musculus']['genome']['rnaseq_matrix'], checkIfExists: true) - - ch_samples_matrix = [ [ "id":"SRP254919" ], expression_matrix_file ] - - CUSTOM_MATRIXFILTER( - ch_samples_matrix, - empty_samplesheet - ) -} diff --git a/tests/modules/nf-core/custom/matrixfilter/nextflow.config b/tests/modules/nf-core/custom/matrixfilter/nextflow.config deleted file mode 100644 index cd0925f534e..00000000000 --- a/tests/modules/nf-core/custom/matrixfilter/nextflow.config +++ /dev/null @@ -1,33 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: 'test_custom_matrixfilter:CUSTOM_MATRIXFILTER' { - ext.args = { "--minimum_abundance 10" } - ext.prefix = { "${meta.id}_test" } - } - - withName: 'test_custom_matrixfilter_prop:CUSTOM_MATRIXFILTER' { - ext.args = { "--minimum_proportion 0.75" } - ext.prefix = { "${meta.id}_test" } - } - - withName: 'test_custom_matrixfilter_group:CUSTOM_MATRIXFILTER' { - ext.args = { "--minimum_proportion 1 --grouping_variable treatment" } - ext.prefix = { "${meta.id}_test" } - } - - withName: 'test_custom_matrixfilter_na_prop:CUSTOM_MATRIXFILTER' { - ext.args = { "--sample_id_col Experiment --minimum_abundance 20" } - ext.prefix = { "${meta.id}_test" } - } - - withName: 'test_custom_matrixfilter_na_samples:CUSTOM_MATRIXFILTER' { - ext.args = { "--sample_id_col Experiment --minimum_abundance 28 --minimum_samples_not_na 1" } - ext.prefix = { "${meta.id}_test" } - } - withName: 'test_custom_matrixfilter_var:CUSTOM_MATRIXFILTER' { - ext.args = { "--most_variant_features 500" } - ext.prefix = { "${meta.id}_test" } - } -} diff --git a/tests/modules/nf-core/custom/matrixfilter/test.yml b/tests/modules/nf-core/custom/matrixfilter/test.yml deleted file mode 100644 index fc86adf9323..00000000000 --- a/tests/modules/nf-core/custom/matrixfilter/test.yml +++ /dev/null @@ -1,64 +0,0 @@ -- name: custom matrixfilter test_custom_matrixfilter - command: nextflow run ./tests/modules/nf-core/custom/matrixfilter -entry test_custom_matrixfilter -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/custom/matrixfilter/nextflow.config - tags: - - custom - - custom/matrixfilter - files: - - path: output/custom/R_sessionInfo.log - - path: output/custom/SRP254919_test.filtered.tsv - md5sum: ecc3ca4c6538f9248dce844108474a66 - - path: output/custom/SRP254919_test.tests.tsv - md5sum: 9a0f14988df8c1b8975039eed91b85e2 - - path: output/custom/versions.yml - -- name: custom matrixfilter test_custom_matrixfilter_prop - command: nextflow run ./tests/modules/nf-core/custom/matrixfilter -entry test_custom_matrixfilter_prop -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/custom/matrixfilter/nextflow.config - tags: - - custom - - custom/matrixfilter - files: - - path: output/custom/R_sessionInfo.log - - path: output/custom/SRP254919_test.filtered.tsv - md5sum: 0c2224f6c33af1fe93c3b1382b3e05ce - - path: output/custom/SRP254919_test.tests.tsv - md5sum: bea4d9e7f73e47b65b2a3ee55c742da2 - - path: output/custom/versions.yml - -- name: custom matrixfilter test_custom_matrixfilter_group - command: nextflow run ./tests/modules/nf-core/custom/matrixfilter -entry test_custom_matrixfilter_group -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/custom/matrixfilter/nextflow.config - tags: - - custom - - custom/matrixfilter - files: - - path: output/custom/R_sessionInfo.log - - path: output/custom/SRP254919_test.filtered.tsv - md5sum: 0c2224f6c33af1fe93c3b1382b3e05ce - - path: output/custom/SRP254919_test.tests.tsv - md5sum: bea4d9e7f73e47b65b2a3ee55c742da2 - - path: output/custom/versions.yml - -- name: custom matrixfilter test_custom_matrixfilter_na_prop - command: nextflow run ./tests/modules/nf-core/custom/matrixfilter -entry test_custom_matrixfilter_na_prop -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/custom/matrixfilter/nextflow.config - tags: - - custom - - custom/matrixfilter - files: - - path: output/custom/R_sessionInfo.log - - path: output/custom/mq_prop_test.filtered.tsv - md5sum: f5bcfe041816e20ef4cd89bbe0a7e7a2 - - path: output/custom/mq_prop_test.tests.tsv - md5sum: 12fc7c32300f774924c5d4ad59b1e447 - - path: output/custom/versions.yml - -- name: custom matrixfilter test_custom_matrixfilter_na_samples - command: nextflow run ./tests/modules/nf-core/custom/matrixfilter -entry test_custom_matrixfilter_na_samples -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/custom/matrixfilter/nextflow.config - tags: - - custom - - custom/matrixfilter - files: - - path: output/custom/R_sessionInfo.log - - path: output/custom/mq_samples_test.filtered.tsv - md5sum: 3e7a9f571fb2e18708918416117cae9a - - path: output/custom/mq_samples_test.tests.tsv - md5sum: 48dc8bf35ca92bc89d307242353dfe5c - - path: output/custom/versions.yml diff --git a/tests/modules/nf-core/custom/tabulartogseacls/main.nf b/tests/modules/nf-core/custom/tabulartogseacls/main.nf deleted file mode 100644 index ded4783708a..00000000000 --- a/tests/modules/nf-core/custom/tabulartogseacls/main.nf +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { CUSTOM_TABULARTOGSEACLS } from '../../../../../modules/nf-core/custom/tabulartogseacls/main.nf' - -expression_sample_sheet = file(params.test_data['mus_musculus']['genome']['rnaseq_samplesheet'], checkIfExists: true) - -workflow test_custom_tabulartogseacls { - - input = [ - [ id:'test', variable:'treatment' ], // meta map - expression_sample_sheet - ] - - CUSTOM_TABULARTOGSEACLS ( input ) -} - -workflow test_custom_tabulartogseacls_tsv { - - input = Channel.fromPath(expression_sample_sheet) - .splitCsv(header: false) - .map{ - it.join('\t') - } - .collectFile(name: 'test.tsv', newLine: true, sort: false) - .map{ - [ [ id:'test', variable:'treatment' ], it] - } - - CUSTOM_TABULARTOGSEACLS ( input ) -} - -workflow test_custom_tabulartogseacls_tsv_override { - - input = Channel.fromPath(expression_sample_sheet) - .splitCsv(header: false) - .map{ - it.join('\t') - } - .collectFile(name: 'test.csv', newLine: true, sort: false) - .map{ - [ [ id:'test', variable:'treatment' ], it] - } - - CUSTOM_TABULARTOGSEACLS ( input ) -} diff --git a/tests/modules/nf-core/custom/tabulartogseacls/nextflow.config b/tests/modules/nf-core/custom/tabulartogseacls/nextflow.config deleted file mode 100644 index ec4668a461c..00000000000 --- a/tests/modules/nf-core/custom/tabulartogseacls/nextflow.config +++ /dev/null @@ -1,14 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: 'test_custom_tabulartogseacls:CUSTOM_TABULARTOGSEACLS' { - ext.args = { [ "variable": "$meta.variable" ] } - } - withName: 'test_custom_tabulartogseacls_tsv:CUSTOM_TABULARTOGSEACLS' { - ext.args = { [ "variable": "$meta.variable" ] } - } - withName: 'test_custom_tabulartogseacls_tsv_override:CUSTOM_TABULARTOGSEACLS' { - ext.args = { [ "separator": "\t", "variable": "$meta.variable" ] } - } -} diff --git a/tests/modules/nf-core/custom/tabulartogseacls/test.yml b/tests/modules/nf-core/custom/tabulartogseacls/test.yml deleted file mode 100644 index c5212f2cad0..00000000000 --- a/tests/modules/nf-core/custom/tabulartogseacls/test.yml +++ /dev/null @@ -1,26 +0,0 @@ -- name: custom tabulartogseacls test_custom_tabulartogseacls - command: nextflow run ./tests/modules/nf-core/custom/tabulartogseacls -entry test_custom_tabulartogseacls -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/custom/tabulartogseacls/nextflow.config - tags: - - custom/tabulartogseacls - - custom - files: - - path: output/custom/test.cls - md5sum: 7b887159417842b1fe87afebe4f8c2b7 - -- name: custom tabulartogseacls test_custom_tabulartogseacls_tsv - command: nextflow run ./tests/modules/nf-core/custom/tabulartogseacls -entry test_custom_tabulartogseacls_tsv -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/custom/tabulartogseacls/nextflow.config - tags: - - custom/tabulartogseacls - - custom - files: - - path: output/custom/test.cls - md5sum: 7b887159417842b1fe87afebe4f8c2b7 - -- name: custom tabulartogseacls test_custom_tabulartogseacls_tsv_override - command: nextflow run ./tests/modules/nf-core/custom/tabulartogseacls -entry test_custom_tabulartogseacls_tsv_override -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/custom/tabulartogseacls/nextflow.config - tags: - - custom/tabulartogseacls - - custom - files: - - path: output/custom/test.cls - md5sum: 7b887159417842b1fe87afebe4f8c2b7 diff --git a/tests/modules/nf-core/custom/tabulartogseagct/main.nf b/tests/modules/nf-core/custom/tabulartogseagct/main.nf deleted file mode 100644 index f990fff6d5b..00000000000 --- a/tests/modules/nf-core/custom/tabulartogseagct/main.nf +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { CUSTOM_TABULARTOGSEAGCT } from '../../../../../modules/nf-core/custom/tabulartogseagct/main.nf' - -infile = params.test_data['mus_musculus']['genome']['rnaseq_matrix'] - -workflow test_custom_tabulartogseagct { - - input = Channel.fromPath(infile) - .splitCsv(sep: "\t", header: false) - .map{ - lst = new ArrayList(it); - lst.remove(1); - lst.join('\t') - } - .collectFile(name: 'test.tsv', newLine: true, sort: false) - .map{ - [ [ id:'test' ], it] - } - - CUSTOM_TABULARTOGSEAGCT ( input ) -} - -workflow test_custom_tabulartogseagct_csv { - - input = Channel.fromPath(infile) - .splitCsv(sep: "\t", header: false) - .map{ - lst = new ArrayList(it); - lst.remove(1); - lst.join(',') - } - .view() - .collectFile(name: 'test.csv', newLine: true, sort: false) - .map{ - [ [ id:'test' ], it] - } - - CUSTOM_TABULARTOGSEAGCT ( input ) -} - -workflow test_custom_tabulartogseagct_csv_override { - - input = Channel.fromPath(infile) - .splitCsv(sep: "\t", header: false) - .map{ - lst = new ArrayList(it); - lst.remove(1); - lst.join(',') - } - .view() - .collectFile(name: 'test.tsv', newLine: true, sort: false) - .map{ - [ [ id:'test' ], it] - } - - CUSTOM_TABULARTOGSEAGCT ( input ) -} - -workflow test_custom_tabulartogseagct_csv_override_pipe { - - input = Channel.fromPath(infile) - .splitCsv(sep: "\t", header: false) - .map{ - lst = new ArrayList(it); - lst.remove(1); - lst.join('|') - } - .view() - .collectFile(name: 'test.tsv', newLine: true, sort: false) - .map{ - [ [ id:'test' ], it] - } - - CUSTOM_TABULARTOGSEAGCT ( input ) -} diff --git a/tests/modules/nf-core/custom/tabulartogseagct/nextflow.config b/tests/modules/nf-core/custom/tabulartogseagct/nextflow.config deleted file mode 100644 index 5264d2a856b..00000000000 --- a/tests/modules/nf-core/custom/tabulartogseagct/nextflow.config +++ /dev/null @@ -1,12 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: 'test_custom_tabulartogseagct_csv_override:CUSTOM_TABULARTOGSEAGCT' { - ext.args = { [ "separator": "," ] } - } - withName: 'test_custom_tabulartogseagct_csv_override_pipe:CUSTOM_TABULARTOGSEAGCT' { - ext.args = { [ "separator": "|" ] } - } - -} diff --git a/tests/modules/nf-core/custom/tabulartogseagct/test.yml b/tests/modules/nf-core/custom/tabulartogseagct/test.yml deleted file mode 100644 index c1f4959ef90..00000000000 --- a/tests/modules/nf-core/custom/tabulartogseagct/test.yml +++ /dev/null @@ -1,35 +0,0 @@ -- name: custom tabulartogseagct test_custom_tabulartogseagct - command: nextflow run ./tests/modules/nf-core/custom/tabulartogseagct -entry test_custom_tabulartogseagct -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/custom/tabulartogseagct/nextflow.config - tags: - - custom - - custom/tabulartogseagct - files: - - path: output/custom/test.gct - md5sum: 008c1c51294cb3f405817b7e5527f182 - -- name: custom tabulartogseagct test_custom_tabulartogseagct_csv - command: nextflow run ./tests/modules/nf-core/custom/tabulartogseagct -entry test_custom_tabulartogseagct_csv -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/custom/tabulartogseagct/nextflow.config - tags: - - custom - - custom/tabulartogseagct - files: - - path: output/custom/test.gct - md5sum: 008c1c51294cb3f405817b7e5527f182 - -- name: custom tabulartogseagct test_custom_tabulartogseagct_csv_override - command: nextflow run ./tests/modules/nf-core/custom/tabulartogseagct -entry test_custom_tabulartogseagct_csv_override -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/custom/tabulartogseagct/nextflow.config - tags: - - custom - - custom/tabulartogseagct - files: - - path: output/custom/test.gct - md5sum: 008c1c51294cb3f405817b7e5527f182 - -- name: custom tabulartogseagct test_custom_tabulartogseagct_csv_override_pipe - command: nextflow run ./tests/modules/nf-core/custom/tabulartogseagct -entry test_custom_tabulartogseagct_csv_override_pipe -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/custom/tabulartogseagct/nextflow.config - tags: - - custom - - custom/tabulartogseagct - files: - - path: output/custom/test.gct - md5sum: 008c1c51294cb3f405817b7e5527f182 From 75a029c39f8e28edc13529c5f748cf47cde3900e Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Tue, 17 Dec 2024 11:20:38 +0000 Subject: [PATCH 10/14] Addressing PR comments --- tests/config/pytest_modules.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index eb7872b4eca..358c728202b 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -109,15 +109,6 @@ coreograph: crisprcleanr/normalize: - modules/nf-core/crisprcleanr/normalize/** - tests/modules/nf-core/crisprcleanr/normalize/** -custom/matrixfilter: - - modules/nf-core/custom/matrixfilter/** - - tests/modules/nf-core/custom/matrixfilter/** -custom/tabulartogseacls: - - modules/nf-core/custom/tabulartogseacls/** - - tests/modules/nf-core/custom/tabulartogseacls/** -custom/tabulartogseagct: - - modules/nf-core/custom/tabulartogseagct/** - - tests/modules/nf-core/custom/tabulartogseagct/** cutesv: - modules/nf-core/cutesv/** - tests/modules/nf-core/cutesv/** From 5c2e614681c26ede1de66076d3e83640f2a152f7 Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Thu, 19 Dec 2024 12:33:49 +0000 Subject: [PATCH 11/14] Addressing PR comments --- .../matrixfilter/templates/matrixfilter.R | 2 +- .../custom/matrixfilter/tests/main.nf.test | 37 +++++++++++++++++++ .../custom/matrixfilter/tests/nextflow.config | 8 +--- .../tabulartogseacls/tests/main.nf.test | 6 +++ .../tabulartogseacls/tests/nextflow.config | 2 +- 5 files changed, 46 insertions(+), 9 deletions(-) diff --git a/modules/nf-core/custom/matrixfilter/templates/matrixfilter.R b/modules/nf-core/custom/matrixfilter/templates/matrixfilter.R index 7e53938a7cb..f15b78b1920 100755 --- a/modules/nf-core/custom/matrixfilter/templates/matrixfilter.R +++ b/modules/nf-core/custom/matrixfilter/templates/matrixfilter.R @@ -207,7 +207,7 @@ keep <- apply(boolean_matrix, 1, all) # Write out the matrix retaining the specified rows and re-prepending the # column with the feature identifiers -prefix = ifelse('$task.ext.prefix' == 'null', '', '$task.ext.prefix') +prefix = ifelse('$task.ext.prefix' == 'null', '$meta.id', '$task.ext.prefix') write.table( data.frame(rownames(abundance_matrix)[keep], abundance_matrix[keep,,drop = FALSE]), diff --git a/modules/nf-core/custom/matrixfilter/tests/main.nf.test b/modules/nf-core/custom/matrixfilter/tests/main.nf.test index d78ba5a9672..806dfb07713 100644 --- a/modules/nf-core/custom/matrixfilter/tests/main.nf.test +++ b/modules/nf-core/custom/matrixfilter/tests/main.nf.test @@ -13,6 +13,25 @@ nextflow_process { test("test_custom_matrixfilter") { when { + params { + observations_id_col = 'sample' + filtering_min_samples = 1.0 + filtering_min_abundance = 10 + filtering_min_proportion = null + filtering_grouping_var = null + filtering_min_proportion_not_na = 0.5 + filtering_min_samples_not_na = null + + module_args = [ + "--sample_id_col \"${params.observations_id_col}\"", + "--minimum_samples ${params.filtering_min_samples}", + "--minimum_abundance ${params.filtering_min_abundance}", + (params.filtering_min_proportion ? "--minimum_proportion ${params.filtering_min_proportion}" : ''), + (params.filtering_grouping_var ? "--grouping_variable \"${params.filtering_grouping_var}\"" : ''), + (params.filtering_min_proportion_not_na ? "--minimum_proportion_not_na \"${params.filtering_min_proportion_not_na}\"" : ''), + (params.filtering_min_samples_not_na ? "--minimum_samples_not_na \"${params.filtering_min_samples_not_na}\"" : '') + ].join(' ').trim() + } process { """ input[0] = [ [id:"test"], file("https://github.com/nf-core/test-datasets/raw/refs/heads/differentialabundance/modules_testdata/SRP254919.salmon.merged.gene_counts.top1000cov.assay.tsv",checkIfExists: true) ] @@ -37,6 +56,24 @@ nextflow_process { options "-stub" when { + params { + observations_id_col = 'sample' + filtering_min_samples = 1.0 + filtering_min_abundance = 10 + filtering_min_proportion = null + filtering_grouping_var = null + filtering_min_proportion_not_na = 0.5 + filtering_min_samples_not_na = null + module_args = [ + "--sample_id_col \"${params.observations_id_col}\"", + "--minimum_samples ${params.filtering_min_samples}", + "--minimum_abundance ${params.filtering_min_abundance}", + (params.filtering_min_proportion ? "--minimum_proportion ${params.filtering_min_proportion}" : ''), + (params.filtering_grouping_var ? "--grouping_variable \"${params.filtering_grouping_var}\"" : ''), + (params.filtering_min_proportion_not_na ? "--minimum_proportion_not_na \"${params.filtering_min_proportion_not_na}\"" : ''), + (params.filtering_min_samples_not_na ? "--minimum_samples_not_na \"${params.filtering_min_samples_not_na}\"" : '') + ].join(' ').trim() + } process { """ input[0] = [ [id:"test"], file("https://github.com/nf-core/test-datasets/raw/refs/heads/differentialabundance/modules_testdata/SRP254919.salmon.merged.gene_counts.top1000cov.assay.tsv",checkIfExists: true) ] diff --git a/modules/nf-core/custom/matrixfilter/tests/nextflow.config b/modules/nf-core/custom/matrixfilter/tests/nextflow.config index 91f067109dd..ad3d36ef5c9 100644 --- a/modules/nf-core/custom/matrixfilter/tests/nextflow.config +++ b/modules/nf-core/custom/matrixfilter/tests/nextflow.config @@ -1,9 +1,3 @@ process { - ext.prefix = { "${meta.id}" } - ext.args = [ - "--sample_id_col \"sample\"", - "--minimum_samples 1.0", - "--minimum_abundance 10", - "--minimum_proportion_not_na \"0.5\"" - ].join(' ').trim() + ext.args = params.module_args } diff --git a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test index 3ccb455e33c..0a3ce374d26 100644 --- a/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test +++ b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test @@ -13,6 +13,9 @@ nextflow_process { test("test_custom_tabulartogseacls") { when { + params { + module_args = [ "separator": "\t", "variable": "treatment" ] + } process { """ input[0] = [ [id:'treatment_mCherry_hND6_sample_number', variable:'treatment', reference:'mCherry', target:'hND6', blocking:'sample_number'], file("https://github.com/nf-core/test-datasets/raw/refs/heads/differentialabundance/modules_testdata/SRP254919.samplesheet.sample_metadata.tsv",checkIfExists: true) ] @@ -34,6 +37,9 @@ nextflow_process { options "-stub" when { + params { + module_args = { [ "separator": "\t", "variable": "treatment" ] } + } process { """ input[0] = [ [id:'treatment_mCherry_hND6_sample_number', variable:'treatment', reference:'mCherry', target:'hND6', blocking:'sample_number'], file("https://github.com/nf-core/test-datasets/raw/refs/heads/differentialabundance/modules_testdata/SRP254919.samplesheet.sample_metadata.tsv",checkIfExists: true) ] diff --git a/modules/nf-core/custom/tabulartogseacls/tests/nextflow.config b/modules/nf-core/custom/tabulartogseacls/tests/nextflow.config index 093f1d7d82b..ad3d36ef5c9 100644 --- a/modules/nf-core/custom/tabulartogseacls/tests/nextflow.config +++ b/modules/nf-core/custom/tabulartogseacls/tests/nextflow.config @@ -1,3 +1,3 @@ process { - ext.args = { [ "separator": "\t", "variable": "treatment" ] } + ext.args = params.module_args } From 455c0fa03568adcc33b50e156ba3b519f817d921 Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Thu, 19 Dec 2024 12:53:57 +0000 Subject: [PATCH 12/14] Update container for matrix --- modules/nf-core/custom/matrixfilter/main.nf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/nf-core/custom/matrixfilter/main.nf b/modules/nf-core/custom/matrixfilter/main.nf index 8d52e4060fa..ebf29961c3e 100644 --- a/modules/nf-core/custom/matrixfilter/main.nf +++ b/modules/nf-core/custom/matrixfilter/main.nf @@ -2,7 +2,9 @@ process CUSTOM_MATRIXFILTER { tag "$meta" label 'process_single' conda "${moduleDir}/environment.yml" - container "community.wave.seqera.io/library/r-base:4.2.1--b0b5476e2e7a0872" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/48/483e9d9b3b07e5658792d579e230ad40ed18daf7b9ebfb4323c08570f92fd1d5/data' + : 'community.wave.seqera.io/library/r-base:4.2.1--b0b5476e2e7a0872'}" input: tuple val(meta), path(abundance) From bb0f5931f4b3146d9cbffdb5f4107542db53d60f Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Fri, 20 Dec 2024 21:23:25 +0000 Subject: [PATCH 13/14] Update snaps --- modules/nf-core/cnvkit/export/tests/main.nf.test.snap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/nf-core/cnvkit/export/tests/main.nf.test.snap b/modules/nf-core/cnvkit/export/tests/main.nf.test.snap index 5ccf7759122..1f49b4e9699 100644 --- a/modules/nf-core/cnvkit/export/tests/main.nf.test.snap +++ b/modules/nf-core/cnvkit/export/tests/main.nf.test.snap @@ -218,7 +218,7 @@ "id": "test", "single_end": false }, - "test.vcf:md5,0a0b4a00192be12f67bb895888026f00" + "test.vcf:md5,07fa974547dae22ff2af4b043466c12d" ] ], "1": [ @@ -230,7 +230,7 @@ "id": "test", "single_end": false }, - "test.vcf:md5,0a0b4a00192be12f67bb895888026f00" + "test.vcf:md5,07fa974547dae22ff2af4b043466c12d" ] ], "versions": [ @@ -242,6 +242,6 @@ "nf-test": "0.9.2", "nextflow": "24.10.3" }, - "timestamp": "2024-12-18T17:51:27.269813231" + "timestamp": "2024-12-20T21:13:12.582014142" } } \ No newline at end of file From 2bb1baa2f228fca93f3070a97858d7b3a2e1c54d Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Thu, 9 Jan 2025 13:55:39 +0000 Subject: [PATCH 14/14] Fix linting --- modules/nf-core/custom/matrixfilter/main.nf | 2 +- modules/nf-core/custom/matrixfilter/meta.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/custom/matrixfilter/main.nf b/modules/nf-core/custom/matrixfilter/main.nf index ebf29961c3e..47a99fad3f2 100644 --- a/modules/nf-core/custom/matrixfilter/main.nf +++ b/modules/nf-core/custom/matrixfilter/main.nf @@ -13,7 +13,7 @@ process CUSTOM_MATRIXFILTER { output: tuple val(meta), path("*.filtered.tsv") , emit: filtered tuple val(meta), path("*.tests.tsv") , emit: tests - tuple val(meta), path("*R_sessionInfo.log") , emit: session_info + tuple val(meta), path("*R_sessionInfo.log") , emit: session_info path "versions.yml" , emit: versions when: diff --git a/modules/nf-core/custom/matrixfilter/meta.yml b/modules/nf-core/custom/matrixfilter/meta.yml index ce9601b580f..04d41042c28 100644 --- a/modules/nf-core/custom/matrixfilter/meta.yml +++ b/modules/nf-core/custom/matrixfilter/meta.yml @@ -62,7 +62,7 @@ output: description: | Groovy Map containing information on experiment. e.g. [ id:'test' ] - - R_sessionInfo.log: + - "*R_sessionInfo.log": type: file description: Log file containing R session information pattern: "*.log"