diff --git a/modules/nf-core/custom/matrixfilter/main.nf b/modules/nf-core/custom/matrixfilter/main.nf index c31a45be97f..47a99fad3f2 100644 --- a/modules/nf-core/custom/matrixfilter/main.nf +++ b/modules/nf-core/custom/matrixfilter/main.nf @@ -2,9 +2,9 @@ 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 "${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) @@ -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: @@ -27,4 +27,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 ${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/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" diff --git a/modules/nf-core/custom/matrixfilter/templates/matrixfilter.R b/modules/nf-core/custom/matrixfilter/templates/matrixfilter.R index a6f734eb911..9064fc2efd2 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 new file mode 100644 index 00000000000..07a5b1b1c28 --- /dev/null +++ b/modules/nf-core/custom/matrixfilter/tests/main.nf.test @@ -0,0 +1,100 @@ +nextflow_process { + + name "Test Process CUSTOM_MATRIXFILTER" + script "../main.nf" + process "CUSTOM_MATRIXFILTER" + config "./nextflow.config" + tag "modules" + tag "modules_nfcore" + tag "custom_matrixfilter" + tag "custom" + tag "custom/matrixfilter" + + 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(params.modules_testdata_base_path + "genomics/mus_musculus/rnaseq_expression/SRP254919.salmon.merged.gene_counts.top1000cov.assay.tsv",checkIfExists: true) + ] + input[1] = [ [id:"test"], + file(params.modules_testdata_base_path + "genomics/mus_musculus/rnaseq_expression/SRP254919.samplesheet.sample_metadata.tsv",checkIfExists: true) + ] + """ + + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out.filtered, + process.out.tests, + process.out.versions).match() } + ) + } + } + + test("test_custom_matrixfilter - stub") { + + 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(params.modules_testdata_base_path + "genomics/mus_musculus/rnaseq_expression/SRP254919.salmon.merged.gene_counts.top1000cov.assay.tsv",checkIfExists: true) + ] + input[1] = [ [id:"test"], + file(params.modules_testdata_base_path + "genomics/mus_musculus/rnaseq_expression/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..1d879d8cfb3 --- /dev/null +++ b/modules/nf-core/custom/matrixfilter/tests/main.nf.test.snap @@ -0,0 +1,95 @@ +{ + "test_custom_matrixfilter": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.filtered.tsv:md5,ecc3ca4c6538f9248dce844108474a66" + ] + ], + [ + [ + { + "id": "test" + }, + "test.tests.tsv:md5,9a0f14988df8c1b8975039eed91b85e2" + ] + ], + [ + "versions.yml:md5,275e382be9ca5bdd30ff5d6fc4340616" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-13T21:21:11.862199262" + }, + "test_custom_matrixfilter - stub": { + "content": [ + { + "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-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 new file mode 100644 index 00000000000..ad3d36ef5c9 --- /dev/null +++ b/modules/nf-core/custom/matrixfilter/tests/nextflow.config @@ -0,0 +1,3 @@ +process { + ext.args = params.module_args +} diff --git a/modules/nf-core/custom/tabulartogseacls/main.nf b/modules/nf-core/custom/tabulartogseacls/main.nf index afa0c41e60b..dea4c3e6a2f 100644 --- a/modules/nf-core/custom/tabulartogseacls/main.nf +++ b/modules/nf-core/custom/tabulartogseacls/main.nf @@ -40,7 +40,18 @@ process CUSTOM_TABULARTOGSEACLS { cat <<-END_VERSIONS > versions.yml "${task.process}": - bash: \$(echo \$(bash --version | grep -Eo 'version [[:alnum:].]+' | sed 's/version //')) + awk: \$(mawk -W version | head -n 1 | awk '{print \$2}') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.cls + cat <<-END_VERSIONS > versions.yml + "${task.process}": + awk: \$(mawk -W 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 new file mode 100644 index 00000000000..652aee9dd34 --- /dev/null +++ b/modules/nf-core/custom/tabulartogseacls/tests/main.nf.test @@ -0,0 +1,63 @@ +nextflow_process { + + name "Test Process CUSTOM_TABULARTOGSEACLS" + script "../main.nf" + process "CUSTOM_TABULARTOGSEACLS" + config "./nextflow.config" + tag "modules" + tag "modules_nfcore" + tag "custom_tabulartogseacls" + tag "custom" + tag "custom/tabulartogseacls" + + 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(params.modules_testdata_base_path + "genomics/mus_musculus/rnaseq_expression/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 { + 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(params.modules_testdata_base_path + "genomics/mus_musculus/rnaseq_expression/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..3c808a4a0cf --- /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" + }, + "treatment_mCherry_hND6_sample_number.cls:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,bdeacaf3413865c27625dce2b7adcd9e" + ], + "cls": [ + [ + { + "id": "treatment_mCherry_hND6_sample_number", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "sample_number" + }, + "treatment_mCherry_hND6_sample_number.cls:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,bdeacaf3413865c27625dce2b7adcd9e" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-13T21:25:30.548463583" + }, + "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,bdeacaf3413865c27625dce2b7adcd9e" + ], + "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,bdeacaf3413865c27625dce2b7adcd9e" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.2" + }, + "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 new file mode 100644 index 00000000000..ad3d36ef5c9 --- /dev/null +++ b/modules/nf-core/custom/tabulartogseacls/tests/nextflow.config @@ -0,0 +1,3 @@ +process { + ext.args = params.module_args +} diff --git a/modules/nf-core/custom/tabulartogseagct/main.nf b/modules/nf-core/custom/tabulartogseagct/main.nf index 736607a57db..6ac17922e14 100644 --- a/modules/nf-core/custom/tabulartogseagct/main.nf +++ b/modules/nf-core/custom/tabulartogseagct/main.nf @@ -34,7 +34,17 @@ process CUSTOM_TABULARTOGSEAGCT { cat <<-END_VERSIONS > versions.yml "${task.process}": - bash: \$(echo \$(bash --version | grep -Eo 'version [[:alnum:].]+' | sed 's/version //')) + awk: \$(mawk -W version | head -n 1 | awk '{print \$2}') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.gct + cat <<-END_VERSIONS > versions.yml + "${task.process}": + awk: \$(mawk -W 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 new file mode 100644 index 00000000000..dc51b363d27 --- /dev/null +++ b/modules/nf-core/custom/tabulartogseagct/tests/main.nf.test @@ -0,0 +1,56 @@ +nextflow_process { + + name "Test Process CUSTOM_TABULARTOGSEAGCT" + script "../main.nf" + process "CUSTOM_TABULARTOGSEAGCT" + tag "modules" + tag "modules_nfcore" + tag "custom_tabulartogseagct" + tag "custom" + tag "custom/tabulartogseagct" + + test("test_custom_tabulartogseagct") { + + when { + process { + """ + input[0] = [ + [id:'treatment_mCherry_hND6_', variable:'treatment', reference:'mCherry', target:'hND6', blocking:''], + file(params.modules_testdata_base_path + "genomics/mus_musculus/rnaseq_expression/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(params.modules_testdata_base_path + "genomics/mus_musculus/rnaseq_expression/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..612b8b14405 --- /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,2cafb8acd2b6a49ec44971051349eb17" + ], + "gct": [ + [ + { + "id": "treatment_mCherry_hND6_", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "" + }, + "treatment_mCherry_hND6_.gct:md5,9727aca45da7ebe619a1f964c9813eee" + ] + ], + "versions": [ + "versions.yml:md5,2cafb8acd2b6a49ec44971051349eb17" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-13T21:25:51.307267504" + }, + "test_custom_tabulartogseagct - stub": { + "content": [ + { + "0": [ + [ + { + "id": "treatment_mCherry_hND6_", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "" + }, + "treatment_mCherry_hND6_.gct:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,2cafb8acd2b6a49ec44971051349eb17" + ], + "gct": [ + [ + { + "id": "treatment_mCherry_hND6_", + "variable": "treatment", + "reference": "mCherry", + "target": "hND6", + "blocking": "" + }, + "treatment_mCherry_hND6_.gct:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,2cafb8acd2b6a49ec44971051349eb17" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-13T21:25:59.490069672" + } +} \ No newline at end of file diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 6eef66aaa8b..679819821da 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -97,15 +97,6 @@ cooler/zoomify: coreograph: - modules/nf-core/coreograph/** - tests/modules/nf-core/coreograph/** -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/** 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