diff --git a/CHANGELOG.md b/CHANGELOG.md index 842dc4f..8b086ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ Initial release of nf-core/nanostring, created with the [nf-core](https://nf-co. ### `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 | 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 7eb3ac2..0000000 --- a/subworkflows/local/normalize/tests/main.nf.test +++ /dev/null @@ -1,38 +0,0 @@ -nextflow_workflow { - - name "Test Subworkflow NORMALIZE" - script "../main.nf" - workflow "NORMALIZE" - - test("test profile") { - when { - workflow { - """ - // Input 0: counts channel with meta and RCC files - input[0] = Channel.of([ - [ id: 'test_sample' ], // meta map - [ - file('https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/nanostring/RCC_files/salmon_01_01.RCC', checkIfExists: true), - file('https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/nanostring/RCC_files/salmon_02_02.RCC', checkIfExists: true), - file('https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/nanostring/RCC_files/salmon_03_03.RCC', checkIfExists: true), - file('https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/nanostring/RCC_files/salmon_04_04.RCC', checkIfExists: true) - ] - ]) - - // Input 1: samplesheet channel with meta and file - input[1] = Channel.of([ - [ id: 'test_samplesheet' ], // meta map - file('https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/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 a5cbf78..0000000 --- a/subworkflows/local/normalize/tests/main.nf.test.snap +++ /dev/null @@ -1,51 +0,0 @@ -{ - "test profile": { - "content": [ - { - "0": [ - [ - { - "id": "test_sample" - }, - "normalized_counts.tsv:md5,a0124c7a24bd04296f441d9ade82a05f" - ] - ], - "1": [ - [ - { - "id": "test_sample" - }, - "normalized_counts_wo_HKnorm.tsv:md5,5a2ce112c24e1b0d0f4cf3392111ef9e" - ] - ], - "2": [ - "versions.yml:md5,8d505473166a2c4bac1c65a5475ae481" - ], - "normalized_counts": [ - [ - { - "id": "test_sample" - }, - "normalized_counts.tsv:md5,a0124c7a24bd04296f441d9ade82a05f" - ] - ], - "normalized_counts_wo_HK": [ - [ - { - "id": "test_sample" - }, - "normalized_counts_wo_HKnorm.tsv:md5,5a2ce112c24e1b0d0f4cf3392111ef9e" - ] - ], - "versions": [ - "versions.yml:md5,8d505473166a2c4bac1c65a5475ae481" - ] - } - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-08-27T16:47:34.392689745" - } -} \ 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 0c6cccf..0000000 --- a/subworkflows/local/quality_control/tests/main.nf.test +++ /dev/null @@ -1,43 +0,0 @@ -nextflow_workflow { - - name "Test Subworkflow QUALITY_CONTROL" - script "../main.nf" - workflow "QUALITY_CONTROL" - - test("test profile") { - when { - workflow { - """ - // Input 0: counts channel with meta and RCC files - input[0] = Channel.of([ - [ id: 'test_sample' ], // meta map - [ - file('https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/nanostring/RCC_files/salmon_01_01.RCC', checkIfExists: true), - file('https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/nanostring/RCC_files/salmon_02_02.RCC', checkIfExists: true), - file('https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/nanostring/RCC_files/salmon_03_03.RCC', checkIfExists: true), - file('https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/nanostring/RCC_files/salmon_04_04.RCC', checkIfExists: true) - ] - ]) - - // Input 1: samplesheet channel with meta and file - input[1] = Channel.of([ - [ id: 'test_samplesheet' ], // meta map - file('https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/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 5367589..0000000 --- a/subworkflows/local/quality_control/tests/main.nf.test.snap +++ /dev/null @@ -1,35 +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", - "plot_normf_mqc.png" - ], - [ - - ], - [ - "versions.yml:md5,d7bcd25bd728c155560d1a01bce761f8" - ] - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-08-27T17:35:49.835996165" - } -} \ No newline at end of file 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 6fde1be..d7267cb 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) + 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(ch_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