From a29c93875c39e827abeb70f45516f51bfbd85aff Mon Sep 17 00:00:00 2001 From: JeronimoVazquez <96156227+JeronimoVazquez@users.noreply.github.com> Date: Thu, 8 May 2025 18:04:34 +0000 Subject: [PATCH 1/4] eliminate `NORMALIZE` and `QUALITY_CONTROL` subworkflows --- subworkflows/local/normalize/main.nf | 19 ---------- .../local/normalize/tests/main.nf.test | 31 --------------- .../local/normalize/tests/main.nf.test.snap | 31 --------------- subworkflows/local/quality_control/main.nf | 18 --------- .../local/quality_control/tests/main.nf.test | 36 ------------------ .../quality_control/tests/main.nf.test.snap | 38 ------------------- workflows/nanostring.nf | 20 +++++----- 7 files changed, 11 insertions(+), 182 deletions(-) delete mode 100644 subworkflows/local/normalize/main.nf delete mode 100644 subworkflows/local/normalize/tests/main.nf.test delete mode 100644 subworkflows/local/normalize/tests/main.nf.test.snap delete mode 100644 subworkflows/local/quality_control/main.nf delete mode 100644 subworkflows/local/quality_control/tests/main.nf.test delete mode 100644 subworkflows/local/quality_control/tests/main.nf.test.snap diff --git a/subworkflows/local/normalize/main.nf b/subworkflows/local/normalize/main.nf deleted file mode 100644 index 87349e2..0000000 --- a/subworkflows/local/normalize/main.nf +++ /dev/null @@ -1,19 +0,0 @@ -// -// Perform normalizations (currently using Nacho) -// - -include { NACHO_NORMALIZE } from '../../../modules/nf-core/nacho/normalize/main' - -workflow NORMALIZE { - take: - counts // channel: [ meta, [rcc files] ] - samplesheet // channel: [ meta, path/to/samplesheet.csv ] - - main: - NACHO_NORMALIZE ( counts, samplesheet ) - - emit: - normalized_counts = NACHO_NORMALIZE.out.normalized_counts // channel: [ normalized_counts.tsv ] - normalized_counts_wo_HK = NACHO_NORMALIZE.out.normalized_counts_wo_HK // channel: [ normalized_counts_wo_HK.tsv ] - versions = NACHO_NORMALIZE.out.versions // channel: [ versions.yml ] -} diff --git a/subworkflows/local/normalize/tests/main.nf.test b/subworkflows/local/normalize/tests/main.nf.test deleted file mode 100644 index b2e24cf..0000000 --- a/subworkflows/local/normalize/tests/main.nf.test +++ /dev/null @@ -1,31 +0,0 @@ -nextflow_workflow { - - name "Test Subworkflow NORMALIZE" - script "../main.nf" - workflow "NORMALIZE" - - test("test profile") { - when { - workflow { - """ - input[0] = Channel.of( - [ - file(params.pipelines_testdata_base_path + 'nanostring/RCC_files/salmon_01_01.RCC', checkIfExists: true), - file(params.pipelines_testdata_base_path + 'nanostring/RCC_files/salmon_02_02.RCC', checkIfExists: true), - file(params.pipelines_testdata_base_path + 'nanostring/RCC_files/salmon_03_03.RCC', checkIfExists: true), - file(params.pipelines_testdata_base_path + 'nanostring/RCC_files/salmon_04_04.RCC', checkIfExists: true) - ] - ) - input[1] = file(params.pipelines_testdata_base_path + 'nanostring/samplesheets/samplesheet_test.csv', checkIfExists: true) - """ - } - } - - then { - assertAll( - { assert workflow.success}, - { assert snapshot(workflow.out).match() } - ) - } - } -} diff --git a/subworkflows/local/normalize/tests/main.nf.test.snap b/subworkflows/local/normalize/tests/main.nf.test.snap deleted file mode 100644 index cbc3788..0000000 --- a/subworkflows/local/normalize/tests/main.nf.test.snap +++ /dev/null @@ -1,31 +0,0 @@ -{ - "test profile": { - "content": [ - { - "0": [ - "normalized_counts.tsv:md5,a0124c7a24bd04296f441d9ade82a05f" - ], - "1": [ - "normalized_counts_wo_HKnorm.tsv:md5,5a2ce112c24e1b0d0f4cf3392111ef9e" - ], - "2": [ - "versions.yml:md5,eacb31511724a946730536d6bb82ae6d" - ], - "normalized_counts": [ - "normalized_counts.tsv:md5,a0124c7a24bd04296f441d9ade82a05f" - ], - "normalized_counts_wo_HK": [ - "normalized_counts_wo_HKnorm.tsv:md5,5a2ce112c24e1b0d0f4cf3392111ef9e" - ], - "versions": [ - "versions.yml:md5,eacb31511724a946730536d6bb82ae6d" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.10.1" - }, - "timestamp": "2024-11-19T12:03:04.242579414" - } -} \ No newline at end of file diff --git a/subworkflows/local/quality_control/main.nf b/subworkflows/local/quality_control/main.nf deleted file mode 100644 index e16decc..0000000 --- a/subworkflows/local/quality_control/main.nf +++ /dev/null @@ -1,18 +0,0 @@ -// -// Perform quality control -// - -include { NACHO_QC } from '../../../modules/nf-core/nacho/qc/main' - -workflow QUALITY_CONTROL { - take: - counts // channel: [ meta, [rcc files] ] - samplesheet // channel: [ meta, path/to/samplesheet.csv ] - - main: - NACHO_QC ( counts, samplesheet ) - - emit: - nacho_qc_multiqc_metrics = NACHO_QC.out.nacho_qc_png.map{it[1]}.mix(NACHO_QC.out.nacho_qc_txt.map{it[1]}) // channel: [ .png and .txt mqc files ] - versions = NACHO_QC.out.versions // channel: [ versions.yml ] -} diff --git a/subworkflows/local/quality_control/tests/main.nf.test b/subworkflows/local/quality_control/tests/main.nf.test deleted file mode 100644 index 79afe34..0000000 --- a/subworkflows/local/quality_control/tests/main.nf.test +++ /dev/null @@ -1,36 +0,0 @@ -nextflow_workflow { - - name "Test Subworkflow QUALITY_CONTROL" - script "../main.nf" - workflow "QUALITY_CONTROL" - - test("test profile") { - when { - workflow { - """ - input[0] = Channel.of( - [ - file(params.pipelines_testdata_base_path + 'nanostring/RCC_files/salmon_01_01.RCC', checkIfExists: true), - file(params.pipelines_testdata_base_path + 'nanostring/RCC_files/salmon_02_02.RCC', checkIfExists: true), - file(params.pipelines_testdata_base_path + 'nanostring/RCC_files/salmon_03_03.RCC', checkIfExists: true), - file(params.pipelines_testdata_base_path + 'nanostring/RCC_files/salmon_04_04.RCC', checkIfExists: true) - ] - ) - input[1] = file(params.pipelines_testdata_base_path + 'nanostring/samplesheets/samplesheet_test.csv', checkIfExists: true) - """ - } - } - - then { - assertAll( - { assert workflow.success}, - { assert snapshot( - workflow.out.nacho_qc_multiqc_metrics[0].collect { file(it).name }, //undeterministic .png mqc files - workflow.out.nacho_qc_multiqc_metrics[0].findAll { file(it).name.endsWith('.txt') }, //stable .txt mqc files - workflow.out.versions - ).match() - } - ) - } - } -} diff --git a/subworkflows/local/quality_control/tests/main.nf.test.snap b/subworkflows/local/quality_control/tests/main.nf.test.snap deleted file mode 100644 index d63a871..0000000 --- a/subworkflows/local/quality_control/tests/main.nf.test.snap +++ /dev/null @@ -1,38 +0,0 @@ -{ - "test profile": { - "content": [ - [ - "AVG_vs_BD_mqc.png", - "AVG_vs_MED_mqc.png", - "BD_mqc.png", - "FOV_mqc.png", - "HKF_mqc.png", - "HK_mqc.png", - "LOD_mqc.png", - "Neg_mqc.png", - "PCA1_vs_PCA2_mqc.png", - "PCA_mqc.png", - "PCAi_mqc.png", - "POSF_vs_NEGF_mqc.png", - "Pos_mqc.png", - "Pos_vs_neg_mqc.png", - "Posctrl_linearity_mqc.png", - "hk_detected_mqc.txt", - "normalized_qc_mqc.txt", - "plot_normf_mqc.png" - ], - [ - "hk_detected_mqc.txt:md5,61209383acc2abf6fc3ea309b5a5e094", - "normalized_qc_mqc.txt:md5,9a0b015a28094a17331b12b08898da8e" - ], - [ - "versions.yml:md5,70a6cd228c2f2620a4484f46566b82d8" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.10.0" - }, - "timestamp": "2024-11-14T23:23:53.609217672" - } -} \ No newline at end of file diff --git a/workflows/nanostring.nf b/workflows/nanostring.nf index 6fde1be..aa20258 100644 --- a/workflows/nanostring.nf +++ b/workflows/nanostring.nf @@ -17,8 +17,6 @@ ch_heatmap_genes_to_filter = params.heatmap_genes_to_filter ? Channel.fromPat // SUBWORKFLOWS: Consisting of a mix of local and nf-core/modules // include { methodsDescriptionText } from '../subworkflows/local/utils_nfcore_nanostring_pipeline' -include { QUALITY_CONTROL } from '../subworkflows/local/quality_control' -include { NORMALIZE } from '../subworkflows/local/normalize' include { COMPUTE_GENE_SCORES_HEATMAP } from '../subworkflows/local/compute_gene_scores_heatmap' // @@ -36,12 +34,15 @@ include { CREATE_ANNOTATED_TABLES } from '../modules/local/create_annotated_tabl // MODULE: Installed directly from nf-core/modules // include { MULTIQC } from '../modules/nf-core/multiqc/main' +include { NACHO_NORMALIZE } from '../modules/nf-core/nacho/normalize/main' +include { NACHO_QC } from '../modules/nf-core/nacho/qc/main' include { paramsSummaryMap } from 'plugin/nf-schema' include { paramsSummaryMultiqc } from '../subworkflows/nf-core/utils_nfcore_pipeline' include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ RUN MAIN WORKFLOW @@ -73,23 +74,24 @@ workflow NANOSTRING { // // SUBWORKFLOW: Quality control of input files // - QUALITY_CONTROL ( + NACHO_QC ( rcc_files, samplesheet_path.first() ) - ch_versions = ch_versions.mix(QUALITY_CONTROL.out.versions) - ch_multiqc_files = ch_multiqc_files.mix(QUALITY_CONTROL.out.nacho_qc_multiqc_metrics.collect()) + ch_versions = ch_versions.mix(NACHO_QC.out.versions) + nacho_qc_multiqc_metrics = NACHO_QC.out.nacho_qc_png.map{it[1]}.mix(NACHO_QC.out.nacho_qc_txt.map{it[1]}) + ch_multiqc_files = ch_multiqc_files.mix(nacho_qc_multiqc_metrics.collect()) // // SUBWORKFLOW: Normalize data // - NORMALIZE ( + NACHO_NORMALIZE ( rcc_files, samplesheet_path.first() ) - ch_versions = ch_versions.mix(NORMALIZE.out.versions) - ch_normalized = NORMALIZE.out.normalized_counts - ch_normalized_wo_hk = NORMALIZE.out.normalized_counts_wo_HK + ch_versions = ch_versions.mix(NACHO_NORMALIZE.out.versions) + ch_normalized = NACHO_NORMALIZE.out.normalized_counts + ch_normalized_wo_hk = NACHO_NORMALIZE.out.normalized_counts_wo_HK // // MODULE: Annotate normalized counts with metadata from the samplesheet From a196e34560e5ae41b424986b577e2c917f35b957 Mon Sep 17 00:00:00 2001 From: JeronimoVazquez <96156227+JeronimoVazquez@users.noreply.github.com> Date: Thu, 8 May 2025 18:39:45 +0000 Subject: [PATCH 2/4] Update CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21acff4..4ac795a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Fixed` +### `Changed` + +- [#136](https://github.com/nf-core/nanostring/pull/136) - Replaced `NORMALIZE` and `QUALITY_CONTROL` for its modules. + ### `Dependencies` | Dependency | Old version | New version | From 47d1818fdc319ca91186d3f4259552983dfe7a0e Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 14 May 2025 10:33:24 +0200 Subject: [PATCH 3/4] Update workflows/nanostring.nf Co-authored-by: Gregor Sturm --- workflows/nanostring.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/nanostring.nf b/workflows/nanostring.nf index aa20258..0bbeb59 100644 --- a/workflows/nanostring.nf +++ b/workflows/nanostring.nf @@ -79,7 +79,7 @@ workflow NANOSTRING { samplesheet_path.first() ) ch_versions = ch_versions.mix(NACHO_QC.out.versions) - nacho_qc_multiqc_metrics = NACHO_QC.out.nacho_qc_png.map{it[1]}.mix(NACHO_QC.out.nacho_qc_txt.map{it[1]}) + ch_nacho_qc_multiqc_metrics = NACHO_QC.out.nacho_qc_png.map{it[1]}.mix(NACHO_QC.out.nacho_qc_txt.map{it[1]}) ch_multiqc_files = ch_multiqc_files.mix(nacho_qc_multiqc_metrics.collect()) // From a98a98dbe23697334ae7176e9784fd480151d2ef Mon Sep 17 00:00:00 2001 From: delfiterradas Date: Mon, 5 Jan 2026 20:02:02 +0100 Subject: [PATCH 4/4] Bug fix --- tests/test_samples.nf.test.snap | 6 +++--- workflows/nanostring.nf | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_samples.nf.test.snap b/tests/test_samples.nf.test.snap index f1ccc60..8726c5c 100644 --- a/tests/test_samples.nf.test.snap +++ b/tests/test_samples.nf.test.snap @@ -134,9 +134,9 @@ ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.10.3" + "nf-test": "0.9.3", + "nextflow": "25.04.2" }, - "timestamp": "2025-01-27T12:57:15.638133" + "timestamp": "2026-01-05T19:56:33.487873526" } } \ No newline at end of file diff --git a/workflows/nanostring.nf b/workflows/nanostring.nf index 0bbeb59..d7267cb 100644 --- a/workflows/nanostring.nf +++ b/workflows/nanostring.nf @@ -80,7 +80,7 @@ workflow NANOSTRING { ) ch_versions = ch_versions.mix(NACHO_QC.out.versions) ch_nacho_qc_multiqc_metrics = NACHO_QC.out.nacho_qc_png.map{it[1]}.mix(NACHO_QC.out.nacho_qc_txt.map{it[1]}) - ch_multiqc_files = ch_multiqc_files.mix(nacho_qc_multiqc_metrics.collect()) + ch_multiqc_files = ch_multiqc_files.mix(ch_nacho_qc_multiqc_metrics.collect()) // // SUBWORKFLOW: Normalize data