From 2876a02a397c7a4f2fd09fa6bc645d640da71a76 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Thu, 2 May 2024 17:33:52 +0100 Subject: [PATCH] Bump shinyngs (#5543) * Bump shinyngs * Fix containers * Migrate shinyngs/app to nf-test * Bump versions again * Bump conda envs too * Bump snapshots for versions * shinyngs/staticexploratory -> nftest * Appease eclint --------- Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> --- modules/nf-core/shinyngs/app/environment.yml | 2 +- modules/nf-core/shinyngs/app/main.nf | 21 ++- .../nf-core/shinyngs/app/tests/main.nf.test | 133 +++++++++++++++ .../shinyngs/app/tests/main.nf.test.snap | 44 +++++ .../shinyngs/app/tests}/nextflow.config | 4 - modules/nf-core/shinyngs/app/tests/tags.yml | 2 + .../staticdifferential/environment.yml | 2 +- .../shinyngs/staticdifferential/main.nf | 4 +- .../staticexploratory/environment.yml | 2 +- .../shinyngs/staticexploratory/main.nf | 28 +++- .../staticexploratory/tests/main.nf.test | 154 ++++++++++++++++++ .../staticexploratory/tests/main.nf.test.snap | 79 +++++++++ .../staticexploratory/tests}/nextflow.config | 4 - .../tests/nextflow_html.conf | 5 + .../tests/nextflow_specify_log.conf | 5 + .../shinyngs/staticexploratory/tests/tags.yml | 2 + .../validatefomcomponents/environment.yml | 2 +- .../shinyngs/validatefomcomponents/main.nf | 4 +- tests/config/pytest_modules.yml | 6 - tests/modules/nf-core/shinyngs/app/main.nf | 55 ------- tests/modules/nf-core/shinyngs/app/test.yml | 23 --- .../shinyngs/staticexploratory/main.nf | 38 ----- .../shinyngs/staticexploratory/test.yml | 48 ------ 23 files changed, 475 insertions(+), 192 deletions(-) create mode 100644 modules/nf-core/shinyngs/app/tests/main.nf.test create mode 100644 modules/nf-core/shinyngs/app/tests/main.nf.test.snap rename {tests/modules/nf-core/shinyngs/app => modules/nf-core/shinyngs/app/tests}/nextflow.config (82%) create mode 100644 modules/nf-core/shinyngs/app/tests/tags.yml create mode 100644 modules/nf-core/shinyngs/staticexploratory/tests/main.nf.test create mode 100644 modules/nf-core/shinyngs/staticexploratory/tests/main.nf.test.snap rename {tests/modules/nf-core/shinyngs/staticexploratory => modules/nf-core/shinyngs/staticexploratory/tests}/nextflow.config (71%) create mode 100644 modules/nf-core/shinyngs/staticexploratory/tests/nextflow_html.conf create mode 100644 modules/nf-core/shinyngs/staticexploratory/tests/nextflow_specify_log.conf create mode 100644 modules/nf-core/shinyngs/staticexploratory/tests/tags.yml delete mode 100644 tests/modules/nf-core/shinyngs/app/main.nf delete mode 100644 tests/modules/nf-core/shinyngs/app/test.yml delete mode 100644 tests/modules/nf-core/shinyngs/staticexploratory/main.nf delete mode 100644 tests/modules/nf-core/shinyngs/staticexploratory/test.yml diff --git a/modules/nf-core/shinyngs/app/environment.yml b/modules/nf-core/shinyngs/app/environment.yml index 9d051f473ae..6e426d0efe1 100644 --- a/modules/nf-core/shinyngs/app/environment.yml +++ b/modules/nf-core/shinyngs/app/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::r-shinyngs=1.8.5 + - bioconda::r-shinyngs=1.8.7 diff --git a/modules/nf-core/shinyngs/app/main.nf b/modules/nf-core/shinyngs/app/main.nf index 3a023aa18b7..4e0a0ca76df 100644 --- a/modules/nf-core/shinyngs/app/main.nf +++ b/modules/nf-core/shinyngs/app/main.nf @@ -15,8 +15,8 @@ process SHINYNGS_APP { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.8.5--r43hdfd78af_0' : - 'biocontainers/r-shinyngs:1.8.5--r43hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.8.7--r43hdfd78af_0' : + 'biocontainers/r-shinyngs:1.8.7--r43hdfd78af_0' }" input: tuple val(meta), path(sample), path(feature_meta), path(assay_files) // Experiment-level info @@ -49,8 +49,23 @@ process SHINYNGS_APP { cat <<-END_VERSIONS > versions.yml "${task.process}": - r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//') r-shinyngs: \$(Rscript -e "library(shinyngs); cat(as.character(packageVersion('shinyngs')))") END_VERSIONS """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: meta.id + + """ + mkdir -p $prefix + touch ${prefix}/data.rds + touch ${prefix}/app.R + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + r-shinyngs: \$(Rscript -e "library(shinyngs); cat(as.character(packageVersion('shinyngs')))") + END_VERSIONS + """ + } diff --git a/modules/nf-core/shinyngs/app/tests/main.nf.test b/modules/nf-core/shinyngs/app/tests/main.nf.test new file mode 100644 index 00000000000..39d6e27ecae --- /dev/null +++ b/modules/nf-core/shinyngs/app/tests/main.nf.test @@ -0,0 +1,133 @@ +nextflow_process { + + name "Test Process SHINYNGS_APP" + script "../main.nf" + process "SHINYNGS_APP" + + tag "modules" + tag "modules_nfcore" + tag "shinyngs" + tag "shinyngs/app" + + test("mouse - multi matrix") { + + config './nextflow.config' + + when { + process { + """ + expression_test_data_dir = params.modules_testdata_base_path + 'genomics/mus_musculus/rnaseq_expression/' + + expression_sample_sheet = file(expression_test_data_dir + 'SRP254919.samplesheet.csv', checkIfExists: true) + expression_feature_meta = file(expression_test_data_dir + 'SRP254919.gene_meta.tsv', checkIfExists: true) + raw_expression_matrix_file = file(expression_test_data_dir + 'SRP254919.salmon.merged.gene_counts.top1000cov.tsv', checkIfExists: true) + expression_contrasts = file(expression_test_data_dir + 'SRP254919.contrasts.csv', checkIfExists: true) + expression_differential = file(expression_test_data_dir + 'SRP254919.salmon.merged.deseq2.results.tsv', checkIfExists: true) + + // Copy some inputs for testing the multi-matrix functionality + raw_expression_matrix_file.copyTo('normalised.tsv') + normalised_expression_matrix_file = file('normalised.tsv') + expression_differential.copyTo('second_contrast_stats.tsv') + second_contrast_stats = file('second_contrast_stats.tsv') + + contrast_stats_assay = Channel.value(1) + + input[0] = [ [ "id":"SRP254919" ], expression_sample_sheet, expression_feature_meta, [ raw_expression_matrix_file, normalised_expression_matrix_file ] ] + input[1] = [ [ "id":"SRP254919" ], expression_contrasts, [ expression_differential, second_contrast_stats ] ] + input[2] = contrast_stats_assay + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.app[0][1]).name, + process.out.app[0][2], + process.out.versions + ).match() } + ) + } + } + + test("mouse - single matrix") { + + config './nextflow.config' + + when { + process { + """ + expression_test_data_dir = params.modules_testdata_base_path + 'genomics/mus_musculus/rnaseq_expression/' + + expression_sample_sheet = file(expression_test_data_dir + 'SRP254919.samplesheet.csv', checkIfExists: true) + expression_feature_meta = file(expression_test_data_dir + 'SRP254919.gene_meta.tsv', checkIfExists: true) + raw_expression_matrix_file = file(expression_test_data_dir + 'SRP254919.salmon.merged.gene_counts.top1000cov.tsv', checkIfExists: true) + expression_contrasts = file(expression_test_data_dir + 'SRP254919.contrasts.csv', checkIfExists: true) + expression_differential = file(expression_test_data_dir + 'SRP254919.salmon.merged.deseq2.results.tsv', checkIfExists: true) + + // Copy some inputs for testing the multi-matrix functionality + expression_differential.copyTo('second_contrast_stats.tsv') + second_contrast_stats = file('second_contrast_stats.tsv') + + contrast_stats_assay = Channel.value(1) + + input[0] = [ [ "id":"SRP254919" ], expression_sample_sheet, expression_feature_meta, [ raw_expression_matrix_file ] ] + input[1] = [ [ "id":"SRP254919" ], expression_contrasts, [ expression_differential, second_contrast_stats ] ] + input[2] = contrast_stats_assay + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.app[0][1]).name, + process.out.app[0][2], + process.out.versions + ).match() } + ) + } + } + + test("mouse - stub") { + + options "-stub" + + when { + process { + """ + expression_test_data_dir = params.modules_testdata_base_path + 'genomics/mus_musculus/rnaseq_expression/' + + expression_sample_sheet = file(expression_test_data_dir + 'SRP254919.samplesheet.csv', checkIfExists: true) + expression_feature_meta = file(expression_test_data_dir + 'SRP254919.gene_meta.tsv', checkIfExists: true) + raw_expression_matrix_file = file(expression_test_data_dir + 'SRP254919.salmon.merged.gene_counts.top1000cov.tsv', checkIfExists: true) + expression_contrasts = file(expression_test_data_dir + 'SRP254919.contrasts.csv', checkIfExists: true) + expression_differential = file(expression_test_data_dir + 'SRP254919.salmon.merged.deseq2.results.tsv', checkIfExists: true) + + // Copy some inputs for testing the multi-matrix functionality + expression_differential.copyTo('second_contrast_stats.tsv') + second_contrast_stats = file('second_contrast_stats.tsv') + + contrast_stats_assay = Channel.value(1) + + input[0] = [ [ "id":"SRP254919" ], expression_sample_sheet, expression_feature_meta, [ raw_expression_matrix_file ] ] + input[1] = [ [ "id":"SRP254919" ], expression_contrasts, [ expression_differential, second_contrast_stats ] ] + input[2] = contrast_stats_assay + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.app[0][1]).name, + process.out.app[0][2], + process.out.versions + ).match() } + ) + } + } +} diff --git a/modules/nf-core/shinyngs/app/tests/main.nf.test.snap b/modules/nf-core/shinyngs/app/tests/main.nf.test.snap new file mode 100644 index 00000000000..d46e0135dba --- /dev/null +++ b/modules/nf-core/shinyngs/app/tests/main.nf.test.snap @@ -0,0 +1,44 @@ +{ + "mouse - stub": { + "content": [ + "data.rds", + "app.R:md5,d41d8cd98f00b204e9800998ecf8427e", + [ + "versions.yml:md5,09111b64e01c10c1c0788e9700488e5c" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-02T15:29:41.473618" + }, + "mouse - multi matrix": { + "content": [ + "data.rds", + "app.R:md5,bedcfc45b6cdcc2b8fe3627987e2b17a", + [ + "versions.yml:md5,09111b64e01c10c1c0788e9700488e5c" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-02T15:29:06.587538" + }, + "mouse - single matrix": { + "content": [ + "data.rds", + "app.R:md5,bedcfc45b6cdcc2b8fe3627987e2b17a", + [ + "versions.yml:md5,09111b64e01c10c1c0788e9700488e5c" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-02T15:29:26.649048" + } +} \ No newline at end of file diff --git a/tests/modules/nf-core/shinyngs/app/nextflow.config b/modules/nf-core/shinyngs/app/tests/nextflow.config similarity index 82% rename from tests/modules/nf-core/shinyngs/app/nextflow.config rename to modules/nf-core/shinyngs/app/tests/nextflow.config index 9df843fe882..b5fffed1177 100644 --- a/tests/modules/nf-core/shinyngs/app/nextflow.config +++ b/modules/nf-core/shinyngs/app/tests/nextflow.config @@ -1,12 +1,8 @@ process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - //withName: test_shinyngs_app:SHINYNGS_APP { // secret 'SHINYAPPS_TOKEN' // secret 'SHINYAPPS_SECRET' //} - withName: test_shinyngs_app:SHINYNGS_APP { ext.prefix = { "${meta.id}_test" } ext.args = { "--contrast_stats_assay 1" } diff --git a/modules/nf-core/shinyngs/app/tests/tags.yml b/modules/nf-core/shinyngs/app/tests/tags.yml new file mode 100644 index 00000000000..07331846cf8 --- /dev/null +++ b/modules/nf-core/shinyngs/app/tests/tags.yml @@ -0,0 +1,2 @@ +shinyngs/app: + - "modules/nf-core/shinyngs/app/**" diff --git a/modules/nf-core/shinyngs/staticdifferential/environment.yml b/modules/nf-core/shinyngs/staticdifferential/environment.yml index 65ef5971971..6cee4c5231f 100644 --- a/modules/nf-core/shinyngs/staticdifferential/environment.yml +++ b/modules/nf-core/shinyngs/staticdifferential/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::r-shinyngs=1.8.5 + - bioconda::r-shinyngs=1.8.7 diff --git a/modules/nf-core/shinyngs/staticdifferential/main.nf b/modules/nf-core/shinyngs/staticdifferential/main.nf index 823eadc09f8..01013ae8556 100644 --- a/modules/nf-core/shinyngs/staticdifferential/main.nf +++ b/modules/nf-core/shinyngs/staticdifferential/main.nf @@ -4,8 +4,8 @@ process SHINYNGS_STATICDIFFERENTIAL { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.8.5--r43hdfd78af_0' : - 'biocontainers/r-shinyngs:1.8.5--r43hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.8.7--r43hdfd78af_0' : + 'biocontainers/r-shinyngs:1.8.7--r43hdfd78af_0' }" input: tuple val(meta), path(differential_result) // Differential info: contrast and differential stats diff --git a/modules/nf-core/shinyngs/staticexploratory/environment.yml b/modules/nf-core/shinyngs/staticexploratory/environment.yml index 8fbe76e2709..7b567be62b5 100644 --- a/modules/nf-core/shinyngs/staticexploratory/environment.yml +++ b/modules/nf-core/shinyngs/staticexploratory/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::r-shinyngs=1.8.5 + - bioconda::r-shinyngs=1.8.7 diff --git a/modules/nf-core/shinyngs/staticexploratory/main.nf b/modules/nf-core/shinyngs/staticexploratory/main.nf index fbbb26c3c4a..18a724fc6b1 100644 --- a/modules/nf-core/shinyngs/staticexploratory/main.nf +++ b/modules/nf-core/shinyngs/staticexploratory/main.nf @@ -4,8 +4,8 @@ process SHINYNGS_STATICEXPLORATORY { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.8.5--r43hdfd78af_0' : - 'biocontainers/r-shinyngs:1.8.5--r43hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.8.7--r43hdfd78af_0' : + 'biocontainers/r-shinyngs:1.8.7--r43hdfd78af_0' }" input: tuple val(meta), path(sample), path(feature_meta), path(assay_files) @@ -43,7 +43,29 @@ process SHINYNGS_STATICEXPLORATORY { cat <<-END_VERSIONS > versions.yml "${task.process}": - r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//') + r-shinyngs: \$(Rscript -e "library(shinyngs); cat(as.character(packageVersion('shinyngs')))") + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: meta.id + """ + mkdir -p ${prefix}/png ${prefix}/html + touch ${prefix}/png/boxplot.png + touch ${prefix}/html/boxplot.html + touch ${prefix}/png/density.png + touch ${prefix}/html/density.html + touch ${prefix}/png/pca2d.png + touch ${prefix}/html/pca3d.html + touch ${prefix}/png/pca3d.png + touch ${prefix}/html/pca2d.html + touch ${prefix}/png/mad_correlation.png + touch ${prefix}/html/mad_correlation.html + touch ${prefix}/png/sample_dendrogram.png + + cat <<-END_VERSIONS > versions.yml + "${task.process}": r-shinyngs: \$(Rscript -e "library(shinyngs); cat(as.character(packageVersion('shinyngs')))") END_VERSIONS """ diff --git a/modules/nf-core/shinyngs/staticexploratory/tests/main.nf.test b/modules/nf-core/shinyngs/staticexploratory/tests/main.nf.test new file mode 100644 index 00000000000..3338aba1dfc --- /dev/null +++ b/modules/nf-core/shinyngs/staticexploratory/tests/main.nf.test @@ -0,0 +1,154 @@ +nextflow_process { + + name "Test Process SHINYNGS_STATICEXPLORATORY" + script "../main.nf" + process "SHINYNGS_STATICEXPLORATORY" + + tag "modules" + tag "modules_nfcore" + tag "shinyngs" + tag "shinyngs/staticexploratory" + + test("mouse - defaults") { + + when { + process { + """ + expression_test_data_dir = params.modules_testdata_base_path + 'genomics/mus_musculus/rnaseq_expression/' + + expression_sample_sheet = file(expression_test_data_dir + 'SRP254919.samplesheet.csv', checkIfExists: true) + expression_feature_meta = file(expression_test_data_dir + 'SRP254919.gene_meta.tsv', checkIfExists: true) + expression_matrix_file = file(expression_test_data_dir + 'SRP254919.salmon.merged.gene_counts.top1000cov.tsv', checkIfExists: true) + + input[0] = [ [ "id":"treatment" ], expression_sample_sheet, expression_feature_meta, [ expression_matrix_file ] ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.boxplots_png[0][1]).name, + file(process.out.densities_png[0][1]).name, + file(process.out.mad_png[0][1]).name, + file(process.out.pca2d_png[0][1]).name, + file(process.out.pca3d_png[0][1]).name, + file(process.out.dendro[0][1]).name, + process.out.versions + ).match() } + ) + } + + } + + test("mouse - defaults - stub") { + + options "-stub" + + when { + process { + """ + expression_test_data_dir = params.modules_testdata_base_path + 'genomics/mus_musculus/rnaseq_expression/' + + expression_sample_sheet = file(expression_test_data_dir + 'SRP254919.samplesheet.csv', checkIfExists: true) + expression_feature_meta = file(expression_test_data_dir + 'SRP254919.gene_meta.tsv', checkIfExists: true) + expression_matrix_file = file(expression_test_data_dir + 'SRP254919.salmon.merged.gene_counts.top1000cov.tsv', checkIfExists: true) + + input[0] = [ [ "id":"treatment" ], expression_sample_sheet, expression_feature_meta, [ expression_matrix_file ] ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.boxplots_png[0][1]).name, + file(process.out.densities_png[0][1]).name, + file(process.out.mad_png[0][1]).name, + file(process.out.pca2d_png[0][1]).name, + file(process.out.pca3d_png[0][1]).name, + file(process.out.dendro[0][1]).name, + process.out.versions + ).match() } + ) + } + + } + + test("mouse - specify log") { + + config './nextflow_specify_log.conf' + + when { + process { + """ + expression_test_data_dir = params.modules_testdata_base_path + 'genomics/mus_musculus/rnaseq_expression/' + + expression_sample_sheet = file(expression_test_data_dir + 'SRP254919.samplesheet.csv', checkIfExists: true) + expression_feature_meta = file(expression_test_data_dir + 'SRP254919.gene_meta.tsv', checkIfExists: true) + expression_matrix_file = file(expression_test_data_dir + 'SRP254919.salmon.merged.gene_counts.top1000cov.tsv', checkIfExists: true) + + input[0] = [ [ "id":"treatment" ], expression_sample_sheet, expression_feature_meta, [ expression_matrix_file ] ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.boxplots_png[0][1]).name, + file(process.out.densities_png[0][1]).name, + file(process.out.mad_png[0][1]).name, + file(process.out.pca2d_png[0][1]).name, + file(process.out.pca3d_png[0][1]).name, + file(process.out.dendro[0][1]).name, + process.out.versions + ).match() } + ) + } + + } + + test("mouse - html") { + + config './nextflow_html.conf' + + when { + process { + """ + expression_test_data_dir = params.modules_testdata_base_path + 'genomics/mus_musculus/rnaseq_expression/' + + expression_sample_sheet = file(expression_test_data_dir + 'SRP254919.samplesheet.csv', checkIfExists: true) + expression_feature_meta = file(expression_test_data_dir + 'SRP254919.gene_meta.tsv', checkIfExists: true) + expression_matrix_file = file(expression_test_data_dir + 'SRP254919.salmon.merged.gene_counts.top1000cov.tsv', checkIfExists: true) + + input[0] = [ [ "id":"treatment" ], expression_sample_sheet, expression_feature_meta, [ expression_matrix_file ] ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.boxplots_png[0][1]).name, + file(process.out.densities_png[0][1]).name, + file(process.out.mad_png[0][1]).name, + file(process.out.pca2d_png[0][1]).name, + file(process.out.pca3d_png[0][1]).name, + file(process.out.dendro[0][1]).name, + path(process.out.boxplots_html[0][1]).readLines().contains('ENSMUSG00000027456","Gm37080'), + path(process.out.densities_html[0][1]).readLines().contains('-1.4916353753463203,-1.3078530974016225,-1.1240708194569247,-0.94028854151222707'), + path(process.out.mad_html[0][1]).readLines().contains('0,-0.74295280067699376,0.67449075947659531,-0.6744907594765952'), + path(process.out.pca2d_html[0][1]).readLines().contains('SRX8042381","SRX8042382'), + path(process.out.pca3d_html[0][1]).readLines().contains('SRX8042381","SRX8042382'), + process.out.versions + ).match() } + ) + } + + } +} diff --git a/modules/nf-core/shinyngs/staticexploratory/tests/main.nf.test.snap b/modules/nf-core/shinyngs/staticexploratory/tests/main.nf.test.snap new file mode 100644 index 00000000000..24684bd1a0b --- /dev/null +++ b/modules/nf-core/shinyngs/staticexploratory/tests/main.nf.test.snap @@ -0,0 +1,79 @@ +{ + "mouse - defaults - stub": { + "content": [ + "boxplot.png", + "density.png", + "mad_correlation.png", + "pca2d.png", + "pca3d.png", + "sample_dendrogram.png", + [ + "versions.yml:md5,3102f5c89620d90d09d6abac92803c2f" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-02T16:57:33.243065" + }, + "mouse - defaults": { + "content": [ + "boxplot.png", + "density.png", + "mad_correlation.png", + "pca2d.png", + "pca3d.png", + "sample_dendrogram.png", + [ + "versions.yml:md5,3102f5c89620d90d09d6abac92803c2f" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-02T16:57:18.530993" + }, + "mouse - specify log": { + "content": [ + "boxplot.png", + "density.png", + "mad_correlation.png", + "pca2d.png", + "pca3d.png", + "sample_dendrogram.png", + [ + "versions.yml:md5,3102f5c89620d90d09d6abac92803c2f" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-02T16:57:53.338678" + }, + "mouse - html": { + "content": [ + "boxplot.png", + "density.png", + "mad_correlation.png", + "pca2d.png", + "pca3d.png", + "sample_dendrogram.png", + false, + false, + false, + false, + false, + [ + "versions.yml:md5,3102f5c89620d90d09d6abac92803c2f" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-02T16:58:16.955001" + } +} \ No newline at end of file diff --git a/tests/modules/nf-core/shinyngs/staticexploratory/nextflow.config b/modules/nf-core/shinyngs/staticexploratory/tests/nextflow.config similarity index 71% rename from tests/modules/nf-core/shinyngs/staticexploratory/nextflow.config rename to modules/nf-core/shinyngs/staticexploratory/tests/nextflow.config index d62459f1c7e..399ac5900a7 100644 --- a/tests/modules/nf-core/shinyngs/staticexploratory/nextflow.config +++ b/modules/nf-core/shinyngs/staticexploratory/tests/nextflow.config @@ -1,11 +1,7 @@ process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: 'test_shinyngs_staticexploratory_specify_log:SHINYNGS_STATICEXPLORATORY' { ext.args = { "--log2_assays '1'" } } - withName: 'test_shinyngs_staticexploratory_html:SHINYNGS_STATICEXPLORATORY' { ext.args = { "--write_html" } } diff --git a/modules/nf-core/shinyngs/staticexploratory/tests/nextflow_html.conf b/modules/nf-core/shinyngs/staticexploratory/tests/nextflow_html.conf new file mode 100644 index 00000000000..b7a293a42e4 --- /dev/null +++ b/modules/nf-core/shinyngs/staticexploratory/tests/nextflow_html.conf @@ -0,0 +1,5 @@ +process { + withName: 'SHINYNGS_STATICEXPLORATORY' { + ext.args = { "--write_html" } + } +} diff --git a/modules/nf-core/shinyngs/staticexploratory/tests/nextflow_specify_log.conf b/modules/nf-core/shinyngs/staticexploratory/tests/nextflow_specify_log.conf new file mode 100644 index 00000000000..0872df667a8 --- /dev/null +++ b/modules/nf-core/shinyngs/staticexploratory/tests/nextflow_specify_log.conf @@ -0,0 +1,5 @@ +process { + withName: 'SHINYNGS_STATICEXPLORATORY' { + ext.args = { "--log2_assays '1'" } + } +} diff --git a/modules/nf-core/shinyngs/staticexploratory/tests/tags.yml b/modules/nf-core/shinyngs/staticexploratory/tests/tags.yml new file mode 100644 index 00000000000..8e5071651dc --- /dev/null +++ b/modules/nf-core/shinyngs/staticexploratory/tests/tags.yml @@ -0,0 +1,2 @@ +shinyngs/staticexploratory: + - "modules/nf-core/shinyngs/staticexploratory/**" diff --git a/modules/nf-core/shinyngs/validatefomcomponents/environment.yml b/modules/nf-core/shinyngs/validatefomcomponents/environment.yml index 9fd7dfd8faf..18f9489a5ae 100644 --- a/modules/nf-core/shinyngs/validatefomcomponents/environment.yml +++ b/modules/nf-core/shinyngs/validatefomcomponents/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::r-shinyngs=1.8.5 + - bioconda::r-shinyngs=1.8.7 diff --git a/modules/nf-core/shinyngs/validatefomcomponents/main.nf b/modules/nf-core/shinyngs/validatefomcomponents/main.nf index 88a6153a35e..8d59a272bff 100644 --- a/modules/nf-core/shinyngs/validatefomcomponents/main.nf +++ b/modules/nf-core/shinyngs/validatefomcomponents/main.nf @@ -4,8 +4,8 @@ process SHINYNGS_VALIDATEFOMCOMPONENTS { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.8.5--r43hdfd78af_0' : - 'biocontainers/r-shinyngs:1.8.5--r43hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.8.7--r43hdfd78af_0' : + 'biocontainers/r-shinyngs:1.8.7--r43hdfd78af_0' }" input: tuple val(meta), path(sample), path(assay_files) diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index ac0d8877cbb..b86eecee802 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1808,15 +1808,9 @@ shigatyper: shigeifinder: - modules/nf-core/shigeifinder/** - tests/modules/nf-core/shigeifinder/** -shinyngs/app: - - modules/nf-core/shinyngs/app/** - - tests/modules/nf-core/shinyngs/app/** shinyngs/staticdifferential: - modules/nf-core/shinyngs/staticdifferential/** - tests/modules/nf-core/shinyngs/staticdifferential/** -shinyngs/staticexploratory: - - modules/nf-core/shinyngs/staticexploratory/** - - tests/modules/nf-core/shinyngs/staticexploratory/** shinyngs/validatefomcomponents: - modules/nf-core/shinyngs/validatefomcomponents/** - tests/modules/nf-core/shinyngs/validatefomcomponents/** diff --git a/tests/modules/nf-core/shinyngs/app/main.nf b/tests/modules/nf-core/shinyngs/app/main.nf deleted file mode 100644 index e49ee69a08f..00000000000 --- a/tests/modules/nf-core/shinyngs/app/main.nf +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { SHINYNGS_APP } from '../../../../../modules/nf-core/shinyngs/app/main.nf' - -workflow test_shinyngs_app_multi_matrix { - - expression_sample_sheet = file(params.test_data['mus_musculus']['genome']['rnaseq_samplesheet'], checkIfExists: true) - expression_feature_meta = file(params.test_data['mus_musculus']['genome']['rnaseq_genemeta'], checkIfExists: true) - expression_contrasts = file(params.test_data['mus_musculus']['genome']['rnaseq_contrasts'], checkIfExists: true) - - // Load the same matrix twice to immitate multiple processings (e.g. raw - // and normalised) - - raw_expression_matrix_file = file(params.test_data['mus_musculus']['genome']['rnaseq_matrix'], checkIfExists: true) - raw_expression_matrix_file.copyTo('normalised.tsv') - normalised_expression_matrix_file = file('normalised.tsv') - - // Same for differential stats - we need two tables for the (now) two contrasts - - expression_differential = file(params.test_data['mus_musculus']['genome']['deseq_results'], checkIfExists: true) - expression_differential.copyTo('second_contrast_stats.tsv') - second_contrast_stats = file('second_contrast_stats.tsv') - contrast_stats_assay = Channel.value(1) - - SHINYNGS_APP ( - [ [ "id":"SRP254919" ], expression_sample_sheet, expression_feature_meta, [ raw_expression_matrix_file, normalised_expression_matrix_file ] ], - [ [ "id":"SRP254919" ], expression_contrasts, [ expression_differential, second_contrast_stats ] ], - contrast_stats_assay - ) -} - -workflow test_shinyngs_app_single_matrix { - - expression_sample_sheet = file(params.test_data['mus_musculus']['genome']['rnaseq_samplesheet'], checkIfExists: true) - expression_feature_meta = file(params.test_data['mus_musculus']['genome']['rnaseq_genemeta'], checkIfExists: true) - expression_matrix_file = file(params.test_data['mus_musculus']['genome']['rnaseq_matrix'], checkIfExists: true) - expression_contrasts = file(params.test_data['mus_musculus']['genome']['rnaseq_contrasts'], checkIfExists: true) - expression_differential = file(params.test_data['mus_musculus']['genome']['deseq_results'], checkIfExists: true) - - // We need two tables for the (now) two contrasts - - expression_differential = file(params.test_data['mus_musculus']['genome']['deseq_results'], checkIfExists: true) - expression_differential.copyTo('second_contrast_stats.tsv') - second_contrast_stats = file('second_contrast_stats.tsv') - contrast_stats_assay = Channel.value(1) - - SHINYNGS_APP ( - [ [ "id":"SRP254919" ], expression_sample_sheet, expression_feature_meta, [ expression_matrix_file ] ], - [ [ "id":"SRP254919" ], expression_contrasts, [ expression_differential, second_contrast_stats ] ], - contrast_stats_assay - ) -} - diff --git a/tests/modules/nf-core/shinyngs/app/test.yml b/tests/modules/nf-core/shinyngs/app/test.yml deleted file mode 100644 index bc5b6e09e8b..00000000000 --- a/tests/modules/nf-core/shinyngs/app/test.yml +++ /dev/null @@ -1,23 +0,0 @@ -- name: shinyngs app test_shinyngs_app_multi_matrix - command: nextflow run ./tests/modules/nf-core/shinyngs/app -entry test_shinyngs_app_multi_matrix -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/shinyngs/app/nextflow.config - tags: - - shinyngs - - shinyngs/app - files: - - path: output/shinyngs/SRP254919/app.R - md5sum: bedcfc45b6cdcc2b8fe3627987e2b17a - - path: output/shinyngs/SRP254919/data.rds - md5sum: 4949e24db73d650db74d8f74f0c7ae0c - - path: output/shinyngs/versions.yml - -- name: shinyngs app test_shinyngs_app_single_matrix - command: nextflow run ./tests/modules/nf-core/shinyngs/app -entry test_shinyngs_app_single_matrix -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/shinyngs/app/nextflow.config - tags: - - shinyngs - - shinyngs/app - files: - - path: output/shinyngs/SRP254919/app.R - md5sum: bedcfc45b6cdcc2b8fe3627987e2b17a - - path: output/shinyngs/SRP254919/data.rds - md5sum: 280d7db494d75846824ff657560322de - - path: output/shinyngs/versions.yml diff --git a/tests/modules/nf-core/shinyngs/staticexploratory/main.nf b/tests/modules/nf-core/shinyngs/staticexploratory/main.nf deleted file mode 100644 index 77959fe29b2..00000000000 --- a/tests/modules/nf-core/shinyngs/staticexploratory/main.nf +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { SHINYNGS_STATICEXPLORATORY } from '../../../../../modules/nf-core/shinyngs/staticexploratory/main.nf' - -workflow test_shinyngs_staticexploratory { - - expression_sample_sheet = file(params.test_data['mus_musculus']['genome']['rnaseq_samplesheet'], checkIfExists: true) - expression_feature_meta = file(params.test_data['mus_musculus']['genome']['rnaseq_genemeta'], checkIfExists: true) - expression_matrix_file = file(params.test_data['mus_musculus']['genome']['rnaseq_matrix'], checkIfExists: true) - - SHINYNGS_STATICEXPLORATORY ( - [ [ "id":"treatment" ], expression_sample_sheet, expression_feature_meta, [ expression_matrix_file ] ], - ) -} - -workflow test_shinyngs_staticexploratory_specify_log { - - expression_sample_sheet = file(params.test_data['mus_musculus']['genome']['rnaseq_samplesheet'], checkIfExists: true) - expression_feature_meta = file(params.test_data['mus_musculus']['genome']['rnaseq_genemeta'], checkIfExists: true) - expression_matrix_file = file(params.test_data['mus_musculus']['genome']['rnaseq_matrix'], checkIfExists: true) - - SHINYNGS_STATICEXPLORATORY ( - [ [ "id":"treatment" ], expression_sample_sheet, expression_feature_meta, [ expression_matrix_file ] ], - ) -} - -workflow test_shinyngs_staticexploratory_html { - - expression_sample_sheet = file(params.test_data['mus_musculus']['genome']['rnaseq_samplesheet'], checkIfExists: true) - expression_feature_meta = file(params.test_data['mus_musculus']['genome']['rnaseq_genemeta'], checkIfExists: true) - expression_matrix_file = file(params.test_data['mus_musculus']['genome']['rnaseq_matrix'], checkIfExists: true) - - SHINYNGS_STATICEXPLORATORY ( - [ [ "id":"treatment" ], expression_sample_sheet, expression_feature_meta, [ expression_matrix_file ] ], - ) -} diff --git a/tests/modules/nf-core/shinyngs/staticexploratory/test.yml b/tests/modules/nf-core/shinyngs/staticexploratory/test.yml deleted file mode 100644 index 434c4f0c4ad..00000000000 --- a/tests/modules/nf-core/shinyngs/staticexploratory/test.yml +++ /dev/null @@ -1,48 +0,0 @@ -- name: shinyngs staticexploratory test_shinyngs_staticexploratory - command: nextflow run ./tests/modules/nf-core/shinyngs/staticexploratory -entry test_shinyngs_staticexploratory -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/shinyngs/staticexploratory/nextflow.config - tags: - - shinyngs/staticexploratory - - shinyngs - files: - - path: output/shinyngs/treatment/png/boxplot.png - - path: output/shinyngs/treatment/png/density.png - - path: output/shinyngs/treatment/png/mad_correlation.png - - path: output/shinyngs/treatment/png/pca2d.png - - path: output/shinyngs/treatment/png/pca3d.png - - path: output/shinyngs/treatment/png/sample_dendrogram.png - -- name: shinyngs staticexploratory test_shinyngs_staticexploratory_specify_log - command: nextflow run ./tests/modules/nf-core/shinyngs/staticexploratory -entry test_shinyngs_staticexploratory_specify_log -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/shinyngs/staticexploratory/nextflow.config - tags: - - shinyngs/staticexploratory - - shinyngs - files: - - path: output/shinyngs/treatment/png/boxplot.png - - path: output/shinyngs/treatment/png/density.png - - path: output/shinyngs/treatment/png/mad_correlation.png - - path: output/shinyngs/treatment/png/pca2d.png - - path: output/shinyngs/treatment/png/pca3d.png - - path: output/shinyngs/treatment/png/sample_dendrogram.png - -- name: shinyngs staticexploratory test_shinyngs_staticexploratory_html - command: nextflow run ./tests/modules/nf-core/shinyngs/staticexploratory -entry test_shinyngs_staticexploratory_html -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/shinyngs/staticexploratory/nextflow.config - tags: - - shinyngs/staticexploratory - - shinyngs - files: - - path: output/shinyngs/treatment/html/boxplot.html - contains: ["SRX8042381", ' ENSMUSG00000027456","Gm37080'] - - path: output/shinyngs/treatment/html/density.html - contains: ["-1.4916353753463203,-1.3078530974016225,-1.1240708194569247,-0.94028854151222707"] - - path: output/shinyngs/treatment/html/mad_correlation.html - contains: ["0,-0.74295280067699376,0.67449075947659531,-0.6744907594765952"] - - path: output/shinyngs/treatment/html/pca2d.html - contains: ['SRX8042381","SRX8042382'] - - path: output/shinyngs/treatment/html/pca3d.html - contains: ['SRX8042381","SRX8042382'] - - path: output/shinyngs/treatment/png/boxplot.png - - path: output/shinyngs/treatment/png/density.png - - path: output/shinyngs/treatment/png/mad_correlation.png - - path: output/shinyngs/treatment/png/pca2d.png - - path: output/shinyngs/treatment/png/pca3d.png - - path: output/shinyngs/treatment/png/sample_dendrogram.png