diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6fef5f23..df00beb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: matrix: NXF_VER: - "24.04.2" - - "latest-everything" + - "latest-stable" profile: - "docker" - "singularity" @@ -102,8 +102,6 @@ jobs: - name: Run Tests (Shard ${{ matrix.shard }}/6) run: | nf-test test \ - --debug \ - --verbose \ --ci \ --shard ${{ matrix.shard }}/6 \ --changed-since HEAD^ \ diff --git a/CHANGELOG.md b/CHANGELOG.md index 184a9c34..392f7718 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## dev +## 1.5.2dev - (UNRELEASED) + +### `Added` + +### `Changed` + +- [#276](https://github.com/nf-core/demultiplex/pull/276) Template update for nf-core/tools v3.0.2 + +### `Fixed` + +- [#277](https://github.com/nf-core/demultiplex/pull/277) Improved samplesheet generation to always produce all types of samplesheets, added the ability to explicitly set strandedness, and fixed output paths to correctly reflect the `publishDir` subdirectory structure. ## 1.5.2 - 2024-10-07 diff --git a/modules/local/fastq_to_samplesheet/main.nf b/modules/local/fastq_to_samplesheet/main.nf index f79cabcf..92429d51 100644 --- a/modules/local/fastq_to_samplesheet/main.nf +++ b/modules/local/fastq_to_samplesheet/main.nf @@ -14,15 +14,18 @@ process FASTQ_TO_SAMPLESHEET { exec: + // Calculate the dynamic output directory based on meta.lane + def outputDir = meta.lane ? "${params.outdir}/${meta.id}/L00${meta.lane}" : "${params.outdir}/${meta.id}" + // Add relevant fields to the map def pipeline_map = [ sample : meta.samplename, - fastq_1 : meta.fastq_1 + fastq_1 : outputDir + '/' + file(meta.fastq_1).fileName ] // Add fastq_2 if it's a paired-end sample if (!meta.single_end) { - pipeline_map.fastq_2 = meta.fastq_2 + pipeline_map.fastq_2 = outputDir + '/' + file(meta.fastq_2).fileName } // Add pipeline-specific entries diff --git a/nextflow.config b/nextflow.config index df00afee..8d9a6b81 100755 --- a/nextflow.config +++ b/nextflow.config @@ -27,7 +27,7 @@ params { kraken_db = null // file .tar.gz // Downstream Nextflow pipeline - downstream_pipeline = "default" // enum string [rnaseq, atacseq, taxprofiler, default] + strandedness = "auto" // enum string [auto, reverse, forward, unstranded] // Options: CheckQC checkqc_config = [] // file .yaml diff --git a/nextflow_schema.json b/nextflow_schema.json index 9857da5d..bddff01c 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -35,12 +35,6 @@ "type": "string", "format": "file-path", "description": "Path to Illumina v2 samplesheet validator .json file" - }, - "downstream_pipeline": { - "type": "string", - "description": "Name of downstream nf-core pipeline (one of: rnaseq, atacseq, taxprofiler or default). Used to produce the input samplesheet for that pipeline.", - "default": "default", - "enum": ["rnaseq", "atacseq", "taxprofiler", "default"] } } }, @@ -276,5 +270,11 @@ { "$ref": "#/$defs/generic_options" } - ] + ], + "properties": { + "strandedness": { + "type": "string", + "default": "auto" + } + } } diff --git a/tests/.nftignore b/tests/.nftignore index 2c7e41e2..5b668254 100644 --- a/tests/.nftignore +++ b/tests/.nftignore @@ -22,7 +22,7 @@ multiqc/multiqc_data/multiqc_sources.txt multiqc/multiqc_plots/{svg,pdf,png}/*.{svg,pdf,png} multiqc/multiqc_report.html pipeline_info/*.{html,json,txt,yml} -samplesheet/samplesheet.csv +samplesheet/*.csv sim-data/*-Bases2Fastq-Sim_QC.html sim-data/*.fastp.fastq.gz sim-data/*.fastp.fastq.gz.md5 diff --git a/tests/bases2fastq.nf.test.snap b/tests/bases2fastq.nf.test.snap index 317657ae..7a8c9b96 100644 --- a/tests/bases2fastq.nf.test.snap +++ b/tests/bases2fastq.nf.test.snap @@ -1,7 +1,7 @@ { "Bases2Fastq": { "content": [ - 8, + 10, { "BASES2FASTQ": { "bases2fastq": "1.8.0.1260801529, use subject to license available at elementbiosciences.com" @@ -23,7 +23,7 @@ } }, [ - "fastq", + "fastq", "fastq/DefaultSample.samplesheet.csv", "multiqc", "multiqc/multiqc_data", @@ -148,7 +148,9 @@ "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", "samplesheet", - "samplesheet/samplesheet.csv", + "samplesheet/atacseq_samplesheet.csv", + "samplesheet/rnaseq_samplesheet.csv", + "samplesheet/taxprofiler_samplesheet.csv", "sim-data", "sim-data.csv", "sim-data/20230404-Bases2Fastq-Sim_QC.html", @@ -210,8 +212,8 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.09.2" + "nextflow": "24.04.4" }, - "timestamp": "2024-10-15T16:37:55.855747" + "timestamp": "2024-10-17T23:29:10.785062467" } -} +} \ No newline at end of file diff --git a/tests/bcl2fastq.nf.test.snap b/tests/bcl2fastq.nf.test.snap index 7fb8ea17..cdda06ef 100644 --- a/tests/bcl2fastq.nf.test.snap +++ b/tests/bcl2fastq.nf.test.snap @@ -1,7 +1,7 @@ { "Bcl2Fastq": { "content": [ - 6, + 8, { "BCL2FASTQ": { "bcl2fastq": "2.20.0.422" @@ -191,7 +191,9 @@ "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", "samplesheet", - "samplesheet/samplesheet.csv" + "samplesheet/atacseq_samplesheet.csv", + "samplesheet/rnaseq_samplesheet.csv", + "samplesheet/taxprofiler_samplesheet.csv" ], [ "220422_M11111_0222_000000000-K9H97.lane1_no_adapters.csv:md5,ee5db2e12754e069998b0a96e535238c", @@ -237,8 +239,8 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.09.2" + "nextflow": "24.04.4" }, - "timestamp": "2024-10-15T16:39:25.304794" + "timestamp": "2024-10-17T23:30:33.296858681" } -} +} \ No newline at end of file diff --git a/tests/bclconvert.nf.test.snap b/tests/bclconvert.nf.test.snap index f064c458..1339d5e3 100644 --- a/tests/bclconvert.nf.test.snap +++ b/tests/bclconvert.nf.test.snap @@ -1,7 +1,7 @@ { "BCL-CONVERT": { "content": [ - 6, + 8, { "BCLCONVERT": { "bclconvert": "4.3.6" @@ -177,7 +177,9 @@ "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", "samplesheet", - "samplesheet/samplesheet.csv" + "samplesheet/atacseq_samplesheet.csv", + "samplesheet/rnaseq_samplesheet.csv", + "samplesheet/taxprofiler_samplesheet.csv" ], [ "220422_M11111_0222_000000000-K9H97.lane1_no_adapters.csv:md5,ee5db2e12754e069998b0a96e535238c", @@ -233,8 +235,8 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.09.2" + "nextflow": "24.04.4" }, - "timestamp": "2024-10-15T16:41:01.01928" + "timestamp": "2024-10-17T23:31:58.719385372" } -} +} \ No newline at end of file diff --git a/tests/bclconvert_mini.nf.test.snap b/tests/bclconvert_mini.nf.test.snap index 77ba8a65..8bdd4e5c 100644 --- a/tests/bclconvert_mini.nf.test.snap +++ b/tests/bclconvert_mini.nf.test.snap @@ -1,7 +1,7 @@ { "BCL-CONVERT-mini": { "content": [ - 26, + 38, { "BCLCONVERT": { "bclconvert": "4.3.6" @@ -248,7 +248,9 @@ "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", "samplesheet", - "samplesheet/samplesheet.csv" + "samplesheet/atacseq_samplesheet.csv", + "samplesheet/rnaseq_samplesheet.csv", + "samplesheet/taxprofiler_samplesheet.csv" ], [ "HBRR1_S1_L001.fastp.fastq.gz:md5,451657490d4816dd5ff904e34ecc7fdf", @@ -346,8 +348,8 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.09.2" + "nextflow": "24.04.4" }, - "timestamp": "2024-10-16T10:59:08.175426" + "timestamp": "2024-10-17T23:34:50.670465424" } -} +} \ No newline at end of file diff --git a/tests/fqtk.nf.test b/tests/fqtk.nf.test index 3dea13d8..cd1841a1 100644 --- a/tests/fqtk.nf.test +++ b/tests/fqtk.nf.test @@ -4,6 +4,7 @@ nextflow_pipeline { script "../main.nf" profile "test_fqtk" tag "fqtk" + tag "pipeline" test("FQTK") { diff --git a/tests/fqtk.nf.test.snap b/tests/fqtk.nf.test.snap index c5cbb5ec..24a3644f 100644 --- a/tests/fqtk.nf.test.snap +++ b/tests/fqtk.nf.test.snap @@ -1,7 +1,7 @@ { "FQTK": { "content": [ - 129, + 179, { "CSV2TSV": { "sed": 4.8 @@ -169,7 +169,9 @@ "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", "samplesheet", - "samplesheet/samplesheet.csv", + "samplesheet/atacseq_samplesheet.csv", + "samplesheet/rnaseq_samplesheet.csv", + "samplesheet/taxprofiler_samplesheet.csv", "test", "test.csv", "test/demux-metrics.txt", @@ -728,8 +730,8 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.09.2" + "nextflow": "24.04.4" }, - "timestamp": "2024-10-15T16:56:01.494868" + "timestamp": "2024-10-17T23:37:31.252912431" } -} +} \ No newline at end of file diff --git a/tests/kraken.nf.test.snap b/tests/kraken.nf.test.snap index 36a6b165..7cdd3b53 100644 --- a/tests/kraken.nf.test.snap +++ b/tests/kraken.nf.test.snap @@ -1,7 +1,7 @@ { "kraken2": { "content": [ - 9, + 11, { "BCL2FASTQ": { "bcl2fastq": "2.20.0.422" @@ -205,7 +205,9 @@ "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", "samplesheet", - "samplesheet/samplesheet.csv" + "samplesheet/atacseq_samplesheet.csv", + "samplesheet/rnaseq_samplesheet.csv", + "samplesheet/taxprofiler_samplesheet.csv" ], [ "220422_M11111_0222_000000000-K9H97.lane1_no_adapters.csv:md5,ee5db2e12754e069998b0a96e535238c", @@ -255,8 +257,8 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.09.2" + "nextflow": "24.04.4" }, - "timestamp": "2024-10-15T16:57:22.70902" + "timestamp": "2024-10-17T23:39:05.363547947" } -} +} \ No newline at end of file diff --git a/tests/mkfastq.nf.test.snap b/tests/mkfastq.nf.test.snap index c95a793e..155a792f 100644 --- a/tests/mkfastq.nf.test.snap +++ b/tests/mkfastq.nf.test.snap @@ -1,7 +1,7 @@ { "MKFASTQ": { "content": [ - 10, + 14, { "CELLRANGER_MKFASTQ": { "cellranger": "8.0.0" @@ -161,7 +161,9 @@ "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", "samplesheet", - "samplesheet/samplesheet.csv" + "samplesheet/atacseq_samplesheet.csv", + "samplesheet/rnaseq_samplesheet.csv", + "samplesheet/taxprofiler_samplesheet.csv" ], [ "cellranger-tiny-bcl-simple.lane1_no_adapters.csv:md5,86a945ab9d579c7bc98d43f76a07118b", @@ -200,8 +202,8 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.09.2" + "nextflow": "24.04.4" }, - "timestamp": "2024-10-15T14:34:23.682439" + "timestamp": "2024-10-17T23:40:20.21203835" } -} +} \ No newline at end of file diff --git a/tests/sgdemux.nf.test.snap b/tests/sgdemux.nf.test.snap index e11ba9ee..285d4c9c 100644 --- a/tests/sgdemux.nf.test.snap +++ b/tests/sgdemux.nf.test.snap @@ -1,7 +1,7 @@ { "SGDEMUX": { "content": [ - 128, + 178, { "FALCO": { "falco": "1.2.1" @@ -204,7 +204,9 @@ "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", "samplesheet", - "samplesheet/samplesheet.csv", + "samplesheet/atacseq_samplesheet.csv", + "samplesheet/rnaseq_samplesheet.csv", + "samplesheet/taxprofiler_samplesheet.csv", "sim-data", "sim-data.csv", "sim-data/Undetermined_S25_L001.fastp.html", @@ -580,6 +582,6 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-15T16:07:45.042862" + "timestamp": "2024-10-18T00:54:45.989490742" } -} +} \ No newline at end of file diff --git a/tests/skip_tools.nf.test.snap b/tests/skip_tools.nf.test.snap index a7b0d626..4a414e55 100644 --- a/tests/skip_tools.nf.test.snap +++ b/tests/skip_tools.nf.test.snap @@ -1,7 +1,7 @@ { "Skip Fastp": { "content": [ - 5, + 7, { "BCLCONVERT": { "bclconvert": "4.3.6" @@ -139,7 +139,9 @@ "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", "samplesheet", - "samplesheet/samplesheet.csv" + "samplesheet/atacseq_samplesheet.csv", + "samplesheet/rnaseq_samplesheet.csv", + "samplesheet/taxprofiler_samplesheet.csv" ], [ "220422_M11111_0222_000000000-K9H97.lane1_no_adapters.csv:md5,ee5db2e12754e069998b0a96e535238c", @@ -186,13 +188,13 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.09.2" + "nextflow": "24.04.4" }, - "timestamp": "2024-10-15T11:16:29.215413" + "timestamp": "2024-10-18T00:25:42.942384924" }, "Skip Trimming": { "content": [ - 6, + 8, { "BCLCONVERT": { "bclconvert": "4.3.6" @@ -367,7 +369,9 @@ "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", "samplesheet", - "samplesheet/samplesheet.csv" + "samplesheet/atacseq_samplesheet.csv", + "samplesheet/rnaseq_samplesheet.csv", + "samplesheet/taxprofiler_samplesheet.csv" ], [ "220422_M11111_0222_000000000-K9H97.lane1_no_adapters.csv:md5,ee5db2e12754e069998b0a96e535238c", @@ -422,13 +426,13 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.09.2" + "nextflow": "24.04.4" }, - "timestamp": "2024-10-15T14:36:31.319794" + "timestamp": "2024-10-18T00:24:59.739085162" }, "Skip MultiQC": { "content": [ - 5, + 7, { "BCLCONVERT": { "bclconvert": "4.3.6" @@ -485,7 +489,9 @@ "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", "samplesheet", - "samplesheet/samplesheet.csv" + "samplesheet/atacseq_samplesheet.csv", + "samplesheet/rnaseq_samplesheet.csv", + "samplesheet/taxprofiler_samplesheet.csv" ], [ "220422_M11111_0222_000000000-K9H97.lane1_no_adapters.csv:md5,ee5db2e12754e069998b0a96e535238c", @@ -519,13 +525,13 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.09.2" + "nextflow": "24.04.4" }, - "timestamp": "2024-10-15T11:20:29.598072" + "timestamp": "2024-10-18T00:29:21.376431772" }, "Skip Fastp & Fastqc": { "content": [ - 5, + 7, { "BCLCONVERT": { "bclconvert": "4.3.6" @@ -663,7 +669,9 @@ "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", "samplesheet", - "samplesheet/samplesheet.csv" + "samplesheet/atacseq_samplesheet.csv", + "samplesheet/rnaseq_samplesheet.csv", + "samplesheet/taxprofiler_samplesheet.csv" ], [ "220422_M11111_0222_000000000-K9H97.lane1_no_adapters.csv:md5,ee5db2e12754e069998b0a96e535238c", @@ -710,13 +718,13 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.09.2" + "nextflow": "24.04.4" }, - "timestamp": "2024-10-15T11:19:11.741332" + "timestamp": "2024-10-18T00:28:05.245862992" }, "Skip Fastqc": { "content": [ - 6, + 8, { "BCLCONVERT": { "bclconvert": "4.3.6" @@ -892,7 +900,9 @@ "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", "samplesheet", - "samplesheet/samplesheet.csv" + "samplesheet/atacseq_samplesheet.csv", + "samplesheet/rnaseq_samplesheet.csv", + "samplesheet/taxprofiler_samplesheet.csv" ], [ "220422_M11111_0222_000000000-K9H97.lane1_no_adapters.csv:md5,ee5db2e12754e069998b0a96e535238c", @@ -948,8 +958,8 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.09.2" + "nextflow": "24.04.4" }, - "timestamp": "2024-10-15T14:38:35.728344" + "timestamp": "2024-10-18T00:27:11.29098668" } -} +} \ No newline at end of file diff --git a/tests/test_pe.nf.test.snap b/tests/test_pe.nf.test.snap index 4e4248e6..eaebb98b 100644 --- a/tests/test_pe.nf.test.snap +++ b/tests/test_pe.nf.test.snap @@ -1,7 +1,7 @@ { "Bcl2Fastq_pe": { "content": [ - 7, + 9, { "BCL2FASTQ": { "bcl2fastq": "2.20.0.422" @@ -259,7 +259,9 @@ "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", "samplesheet", - "samplesheet/samplesheet.csv" + "samplesheet/atacseq_samplesheet.csv", + "samplesheet/rnaseq_samplesheet.csv", + "samplesheet/taxprofiler_samplesheet.csv" ], [ "PE_Sample.lane1_no_adapters.csv:md5,c31cca10b3a1aed8ec68daf779217d91", @@ -320,8 +322,8 @@ ], "meta": { "nf-test": "0.9.0", - "nextflow": "24.09.2" + "nextflow": "24.04.4" }, - "timestamp": "2024-10-15T14:42:45.369275" + "timestamp": "2024-10-18T00:32:00.49132579" } -} +} \ No newline at end of file diff --git a/workflows/demultiplex.nf b/workflows/demultiplex.nf index 7595afd1..bc960b7b 100644 --- a/workflows/demultiplex.nf +++ b/workflows/demultiplex.nf @@ -8,14 +8,16 @@ // SUBWORKFLOW: Consisting of a mix of local and nf-core/modules // -include { BCL_DEMULTIPLEX } from '../subworkflows/nf-core/bcl_demultiplex/main' -include { FASTQ_CONTAM_SEQTK_KRAKEN } from '../subworkflows/nf-core/fastq_contam_seqtk_kraken/main' -include { BASES_DEMULTIPLEX } from '../subworkflows/local/bases_demultiplex/main' -include { FQTK_DEMULTIPLEX } from '../subworkflows/local/fqtk_demultiplex/main' -include { MKFASTQ_DEMULTIPLEX } from '../subworkflows/local/mkfastq_demultiplex/main' -include { SINGULAR_DEMULTIPLEX } from '../subworkflows/local/singular_demultiplex/main' -include { RUNDIR_CHECKQC } from '../subworkflows/local/rundir_checkqc/main' -include { FASTQ_TO_SAMPLESHEET } from '../modules/local/fastq_to_samplesheet/main' +include { BCL_DEMULTIPLEX } from '../subworkflows/nf-core/bcl_demultiplex/main' +include { FASTQ_CONTAM_SEQTK_KRAKEN } from '../subworkflows/nf-core/fastq_contam_seqtk_kraken/main' +include { BASES_DEMULTIPLEX } from '../subworkflows/local/bases_demultiplex/main' +include { FQTK_DEMULTIPLEX } from '../subworkflows/local/fqtk_demultiplex/main' +include { MKFASTQ_DEMULTIPLEX } from '../subworkflows/local/mkfastq_demultiplex/main' +include { SINGULAR_DEMULTIPLEX } from '../subworkflows/local/singular_demultiplex/main' +include { RUNDIR_CHECKQC } from '../subworkflows/local/rundir_checkqc/main' +include { FASTQ_TO_SAMPLESHEET as FASTQ_TO_SAMPLESHEET_RNASEQ } from '../modules/local/fastq_to_samplesheet/main' +include { FASTQ_TO_SAMPLESHEET as FASTQ_TO_SAMPLESHEET_ATACSEQ } from '../modules/local/fastq_to_samplesheet/main' +include { FASTQ_TO_SAMPLESHEET as FASTQ_TO_SAMPLESHEET_TAXPROFILER } from '../modules/local/fastq_to_samplesheet/main' // // MODULE: Installed directly from nf-core/modules @@ -58,7 +60,7 @@ workflow DEMULTIPLEX { skip_tools = params.skip_tools ? params.skip_tools.split(',') : [] // list: [falco, fastp, multiqc] sample_size = params.sample_size // int kraken_db = params.kraken_db // path - downstream_pipeline = params.downstream_pipeline // string: rnaseq, atacseq, taxprofiler + strandedness = params.strandedness // string: auto, reverse, forward, unstranded // Channel inputs ch_versions = Channel.empty() @@ -280,13 +282,31 @@ workflow DEMULTIPLEX { } // Module: FASTQ to samplesheet - FASTQ_TO_SAMPLESHEET(ch_meta_fastq, downstream_pipeline, 'auto') + ch_meta_fastq_rnaseq = ch_meta_fastq + FASTQ_TO_SAMPLESHEET_RNASEQ(ch_meta_fastq_rnaseq, "rnaseq", strandedness) + FASTQ_TO_SAMPLESHEET_RNASEQ.out.samplesheet + .map { it[1] } + .collectFile(name:'tmp_rnaseq_samplesheet.csv', newLine: true, keepHeader: true, sort: { it.baseName }) + .map { it.text.tokenize('\n').join('\n') } + .collectFile(name:'rnaseq_samplesheet.csv', storeDir: "${params.outdir}/samplesheet") + .set { ch_samplesheet } + + ch_meta_fastq_atacseq = ch_meta_fastq + FASTQ_TO_SAMPLESHEET_ATACSEQ(ch_meta_fastq_atacseq, "atacseq", strandedness) + FASTQ_TO_SAMPLESHEET_ATACSEQ.out.samplesheet + .map { it[1] } + .collectFile(name:'tmp_atac_seq_samplesheet.csv', newLine: true, keepHeader: true, sort: { it.baseName }) + .map { it.text.tokenize('\n').join('\n') } + .collectFile(name:'atacseq_samplesheet.csv', storeDir: "${params.outdir}/samplesheet") + .set { ch_samplesheet } - FASTQ_TO_SAMPLESHEET.out.samplesheet + ch_meta_fastq_taxprofiler = ch_meta_fastq + FASTQ_TO_SAMPLESHEET_TAXPROFILER(ch_meta_fastq_taxprofiler, "taxprofiler", strandedness) + FASTQ_TO_SAMPLESHEET_TAXPROFILER.out.samplesheet .map { it[1] } - .collectFile(name:'tmp_samplesheet.csv', newLine: true, keepHeader: true, sort: { it.baseName }) + .collectFile(name:'tmp_taxprofiler_samplesheet.csv', newLine: true, keepHeader: true, sort: { it.baseName }) .map { it.text.tokenize('\n').join('\n') } - .collectFile(name:'samplesheet.csv', storeDir: "${params.outdir}/samplesheet") + .collectFile(name:'taxprofiler_samplesheet.csv', storeDir: "${params.outdir}/samplesheet") .set { ch_samplesheet } //