From 7b0aa220176cc4eed35a2fec622ed821632ab7b1 Mon Sep 17 00:00:00 2001 From: zxBIB Schcolnicov Date: Tue, 29 Oct 2024 16:33:15 +0100 Subject: [PATCH 1/6] Started fixing fastq naming --- conf/modules.config | 2 +- modules/local/fastq_to_samplesheet/main.nf | 7 +++++-- workflows/demultiplex.nf | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index a9093c16..080d6005 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -97,7 +97,7 @@ process { path: { "${params.outdir}/${meta.id}/" }, mode: params.publish_dir_mode, pattern: "output/Samples/**/*.{json,fastq.gz}", - saveAs: { filename -> filename.minus("output/") } + saveAs: { filename -> filename.split("/")[-1] } ], [ path: { "${params.outdir}/${meta.id}/" }, diff --git a/modules/local/fastq_to_samplesheet/main.nf b/modules/local/fastq_to_samplesheet/main.nf index 92429d51..5d6fb458 100644 --- a/modules/local/fastq_to_samplesheet/main.nf +++ b/modules/local/fastq_to_samplesheet/main.nf @@ -10,12 +10,12 @@ process FASTQ_TO_SAMPLESHEET { val strandedness output: - tuple val(meta), path("*samplesheet.csv"), emit: samplesheet + tuple val(meta_clone), path("*samplesheet.csv"), emit: 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}" + def outputDir = meta.publish_dir // Add relevant fields to the map def pipeline_map = [ @@ -45,4 +45,7 @@ process FASTQ_TO_SAMPLESHEET { def samplesheet_file = task.workDir.resolve("${meta.id}.samplesheet.csv") samplesheet_file.text = samplesheet + meta_clone = meta.clone() + meta_clone.remove('publishdir') + } diff --git a/workflows/demultiplex.nf b/workflows/demultiplex.nf index 84fd1693..3f4867da 100644 --- a/workflows/demultiplex.nf +++ b/workflows/demultiplex.nf @@ -270,12 +270,12 @@ workflow DEMULTIPLEX { // Prepare metamap with fastq info ch_meta_fastq = ch_raw_fastq.map { meta, fastq_files -> // Determine the publish directory based on the lane information - def publish_dir = meta.lane ? "${params.outdir}/${meta.id}/L00${meta.lane}" : "${params.outdir}/${meta.id}" - meta.fastq_1 = "${publish_dir}/${fastq_files[0].getName()}" + meta.publish_dir = publish_dir = meta.lane ? "${params.outdir}/${meta.fcid}/L00${meta.lane}" : "${params.outdir}/${meta.fcid}" //Must be fcid because id gets modified + meta.fastq_1 = "${meta.publish_dir}/${fastq_files[0].getName()}" // Add full path for fastq_2 to the metadata if the sample is not single-end if (!meta.single_end) { - meta.fastq_2 = "${publish_dir}/${fastq_files[1].getName()}" + meta.fastq_2 = "${meta.publish_dir}/${fastq_files[1].getName()}" } return meta } From 3ae0048dfbc04fd4cc9c4e3feb95acc2dd332ba8 Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Tue, 29 Oct 2024 17:06:29 +0000 Subject: [PATCH 2/6] Fixed samplesheet paths --- conf/modules.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 080d6005..de264c67 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -163,7 +163,7 @@ process { [ path: { meta.lane ? "${params.outdir}/${meta.id}/L00${meta.lane}" : "${params.outdir}/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "output/*.{tsv, fastq.gz}", + pattern: "output/*.{tsv,fastq.gz}", saveAs: { filename -> filename.minus("output/") } ], ] @@ -174,7 +174,7 @@ process { [ path: { "${params.outdir}/${meta.id}/" }, mode: params.publish_dir_mode, - pattern: "output/*.{txt, fq.gz}", + pattern: "output/*.{txt,fq.gz}", saveAs: { filename -> filename.minus("output/") } ], ] From 0e2af23afedda16475a216c5744b3f77c413e578 Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Tue, 29 Oct 2024 17:53:40 +0000 Subject: [PATCH 3/6] Updated snaps and nftignore --- tests/.nftignore | 3 +- tests/bases2fastq.nf.test.snap | 15 ++--- tests/fqtk.nf.test.snap | 102 ++++++++++++++++++++++++++++++++- tests/sgdemux.nf.test.snap | 52 ++++++++++++++++- 4 files changed, 160 insertions(+), 12 deletions(-) diff --git a/tests/.nftignore b/tests/.nftignore index 5b668254..934a94ce 100644 --- a/tests/.nftignore +++ b/tests/.nftignore @@ -29,6 +29,7 @@ sim-data/*.fastp.fastq.gz.md5 sim-data/*.fastp.fastq.gz_fastqc_data.txt sim-data/*.fastp.fastq.gz_fastqc_report.html sim-data/*.fastp.fastq.gz_summary.txt +sim-data/{Undetermined,s}*L001*.fastq.gz sim-data/RunStats.json -sim-data/Samples/DefaultProject/DefaultSample/DefaultSample_stats.json +sim-data/DefaultSample_stats.json sim-data/most_frequent_unmatched.tsv diff --git a/tests/bases2fastq.nf.test.snap b/tests/bases2fastq.nf.test.snap index 7a8c9b96..230a60e8 100644 --- a/tests/bases2fastq.nf.test.snap +++ b/tests/bases2fastq.nf.test.snap @@ -166,15 +166,12 @@ "sim-data/DefaultSample_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/DefaultSample_2.fastp.fastq.gz_fastqc_report.html", "sim-data/DefaultSample_2.fastp.fastq.gz_summary.txt", + "sim-data/DefaultSample_R1.fastq.gz", + "sim-data/DefaultSample_R2.fastq.gz", + "sim-data/DefaultSample_stats.json", "sim-data/Metrics.csv", "sim-data/RunManifest.json", "sim-data/RunStats.json", - "sim-data/Samples", - "sim-data/Samples/DefaultProject", - "sim-data/Samples/DefaultProject/DefaultSample", - "sim-data/Samples/DefaultProject/DefaultSample/DefaultSample_R1.fastq.gz", - "sim-data/Samples/DefaultProject/DefaultSample/DefaultSample_R2.fastq.gz", - "sim-data/Samples/DefaultProject/DefaultSample/DefaultSample_stats.json", "sim-data/UnassignedSequences.csv" ], [ @@ -203,10 +200,10 @@ "multiqc_citations.txt:md5,d35df50e9903a96a2b3bce3c1fbc8ad2", "sim-data.csv:md5,1d1dab697bd88c411fff89c102024295", "DefaultSample.fastp.json:md5,9c10bbfbc4beb9523ca3a114f95709db", - "Metrics.csv:md5,ad7af77573845924062e2554cc641b16", - "RunManifest.json:md5,cdb8051690645d0f070191286323f1c8", "DefaultSample_R1.fastq.gz:md5,6c73b924e4eb53b716614aa6fd8b791a", "DefaultSample_R2.fastq.gz:md5,54e2c0894844e42605b7cd567b1c7dbe", + "Metrics.csv:md5,ad7af77573845924062e2554cc641b16", + "RunManifest.json:md5,cdb8051690645d0f070191286323f1c8", "UnassignedSequences.csv:md5,11c1693830ce941b8cfb8d2431a59097" ] ], @@ -214,6 +211,6 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-17T23:29:10.785062467" + "timestamp": "2024-10-29T17:48:00.306378134" } } \ No newline at end of file diff --git a/tests/fqtk.nf.test.snap b/tests/fqtk.nf.test.snap index 24a3644f..13c7507d 100644 --- a/tests/fqtk.nf.test.snap +++ b/tests/fqtk.nf.test.snap @@ -175,8 +175,12 @@ "test", "test.csv", "test/demux-metrics.txt", + "test/s1.R1.fq.gz", + "test/s1.R2.fq.gz", "test/s1.fastp.html", "test/s1.fastp.json", + "test/s10.R1.fq.gz", + "test/s10.R2.fq.gz", "test/s10.fastp.html", "test/s10.fastp.json", "test/s10_1.fastp.fastq.gz", @@ -189,6 +193,8 @@ "test/s10_2.fastp.fastq.gz_fastqc_data.txt", "test/s10_2.fastp.fastq.gz_fastqc_report.html", "test/s10_2.fastp.fastq.gz_summary.txt", + "test/s11.R1.fq.gz", + "test/s11.R2.fq.gz", "test/s11.fastp.html", "test/s11.fastp.json", "test/s11_1.fastp.fastq.gz", @@ -201,6 +207,8 @@ "test/s11_2.fastp.fastq.gz_fastqc_data.txt", "test/s11_2.fastp.fastq.gz_fastqc_report.html", "test/s11_2.fastp.fastq.gz_summary.txt", + "test/s12.R1.fq.gz", + "test/s12.R2.fq.gz", "test/s12.fastp.html", "test/s12.fastp.json", "test/s12_1.fastp.fastq.gz", @@ -213,6 +221,8 @@ "test/s12_2.fastp.fastq.gz_fastqc_data.txt", "test/s12_2.fastp.fastq.gz_fastqc_report.html", "test/s12_2.fastp.fastq.gz_summary.txt", + "test/s13.R1.fq.gz", + "test/s13.R2.fq.gz", "test/s13.fastp.html", "test/s13.fastp.json", "test/s13_1.fastp.fastq.gz", @@ -225,6 +235,8 @@ "test/s13_2.fastp.fastq.gz_fastqc_data.txt", "test/s13_2.fastp.fastq.gz_fastqc_report.html", "test/s13_2.fastp.fastq.gz_summary.txt", + "test/s14.R1.fq.gz", + "test/s14.R2.fq.gz", "test/s14.fastp.html", "test/s14.fastp.json", "test/s14_1.fastp.fastq.gz", @@ -237,6 +249,8 @@ "test/s14_2.fastp.fastq.gz_fastqc_data.txt", "test/s14_2.fastp.fastq.gz_fastqc_report.html", "test/s14_2.fastp.fastq.gz_summary.txt", + "test/s15.R1.fq.gz", + "test/s15.R2.fq.gz", "test/s15.fastp.html", "test/s15.fastp.json", "test/s15_1.fastp.fastq.gz", @@ -249,6 +263,8 @@ "test/s15_2.fastp.fastq.gz_fastqc_data.txt", "test/s15_2.fastp.fastq.gz_fastqc_report.html", "test/s15_2.fastp.fastq.gz_summary.txt", + "test/s16.R1.fq.gz", + "test/s16.R2.fq.gz", "test/s16.fastp.html", "test/s16.fastp.json", "test/s16_1.fastp.fastq.gz", @@ -261,6 +277,8 @@ "test/s16_2.fastp.fastq.gz_fastqc_data.txt", "test/s16_2.fastp.fastq.gz_fastqc_report.html", "test/s16_2.fastp.fastq.gz_summary.txt", + "test/s17.R1.fq.gz", + "test/s17.R2.fq.gz", "test/s17.fastp.html", "test/s17.fastp.json", "test/s17_1.fastp.fastq.gz", @@ -273,6 +291,8 @@ "test/s17_2.fastp.fastq.gz_fastqc_data.txt", "test/s17_2.fastp.fastq.gz_fastqc_report.html", "test/s17_2.fastp.fastq.gz_summary.txt", + "test/s18.R1.fq.gz", + "test/s18.R2.fq.gz", "test/s18.fastp.html", "test/s18.fastp.json", "test/s18_1.fastp.fastq.gz", @@ -285,6 +305,8 @@ "test/s18_2.fastp.fastq.gz_fastqc_data.txt", "test/s18_2.fastp.fastq.gz_fastqc_report.html", "test/s18_2.fastp.fastq.gz_summary.txt", + "test/s19.R1.fq.gz", + "test/s19.R2.fq.gz", "test/s19.fastp.html", "test/s19.fastp.json", "test/s19_1.fastp.fastq.gz", @@ -307,8 +329,12 @@ "test/s1_2.fastp.fastq.gz_fastqc_data.txt", "test/s1_2.fastp.fastq.gz_fastqc_report.html", "test/s1_2.fastp.fastq.gz_summary.txt", + "test/s2.R1.fq.gz", + "test/s2.R2.fq.gz", "test/s2.fastp.html", "test/s2.fastp.json", + "test/s20.R1.fq.gz", + "test/s20.R2.fq.gz", "test/s20.fastp.html", "test/s20.fastp.json", "test/s20_1.fastp.fastq.gz", @@ -321,6 +347,8 @@ "test/s20_2.fastp.fastq.gz_fastqc_data.txt", "test/s20_2.fastp.fastq.gz_fastqc_report.html", "test/s20_2.fastp.fastq.gz_summary.txt", + "test/s21.R1.fq.gz", + "test/s21.R2.fq.gz", "test/s21.fastp.html", "test/s21.fastp.json", "test/s21_1.fastp.fastq.gz", @@ -333,6 +361,8 @@ "test/s21_2.fastp.fastq.gz_fastqc_data.txt", "test/s21_2.fastp.fastq.gz_fastqc_report.html", "test/s21_2.fastp.fastq.gz_summary.txt", + "test/s22.R1.fq.gz", + "test/s22.R2.fq.gz", "test/s22.fastp.html", "test/s22.fastp.json", "test/s22_1.fastp.fastq.gz", @@ -345,6 +375,8 @@ "test/s22_2.fastp.fastq.gz_fastqc_data.txt", "test/s22_2.fastp.fastq.gz_fastqc_report.html", "test/s22_2.fastp.fastq.gz_summary.txt", + "test/s23.R1.fq.gz", + "test/s23.R2.fq.gz", "test/s23.fastp.html", "test/s23.fastp.json", "test/s23_1.fastp.fastq.gz", @@ -357,6 +389,8 @@ "test/s23_2.fastp.fastq.gz_fastqc_data.txt", "test/s23_2.fastp.fastq.gz_fastqc_report.html", "test/s23_2.fastp.fastq.gz_summary.txt", + "test/s24.R1.fq.gz", + "test/s24.R2.fq.gz", "test/s24.fastp.html", "test/s24.fastp.json", "test/s24_1.fastp.fastq.gz", @@ -379,6 +413,8 @@ "test/s2_2.fastp.fastq.gz_fastqc_data.txt", "test/s2_2.fastp.fastq.gz_fastqc_report.html", "test/s2_2.fastp.fastq.gz_summary.txt", + "test/s3.R1.fq.gz", + "test/s3.R2.fq.gz", "test/s3.fastp.html", "test/s3.fastp.json", "test/s3_1.fastp.fastq.gz", @@ -391,6 +427,8 @@ "test/s3_2.fastp.fastq.gz_fastqc_data.txt", "test/s3_2.fastp.fastq.gz_fastqc_report.html", "test/s3_2.fastp.fastq.gz_summary.txt", + "test/s4.R1.fq.gz", + "test/s4.R2.fq.gz", "test/s4.fastp.html", "test/s4.fastp.json", "test/s4_1.fastp.fastq.gz", @@ -403,6 +441,8 @@ "test/s4_2.fastp.fastq.gz_fastqc_data.txt", "test/s4_2.fastp.fastq.gz_fastqc_report.html", "test/s4_2.fastp.fastq.gz_summary.txt", + "test/s5.R1.fq.gz", + "test/s5.R2.fq.gz", "test/s5.fastp.html", "test/s5.fastp.json", "test/s5_1.fastp.fastq.gz", @@ -415,6 +455,8 @@ "test/s5_2.fastp.fastq.gz_fastqc_data.txt", "test/s5_2.fastp.fastq.gz_fastqc_report.html", "test/s5_2.fastp.fastq.gz_summary.txt", + "test/s6.R1.fq.gz", + "test/s6.R2.fq.gz", "test/s6.fastp.html", "test/s6.fastp.json", "test/s6_1.fastp.fastq.gz", @@ -427,6 +469,8 @@ "test/s6_2.fastp.fastq.gz_fastqc_data.txt", "test/s6_2.fastp.fastq.gz_fastqc_report.html", "test/s6_2.fastp.fastq.gz_summary.txt", + "test/s7.R1.fq.gz", + "test/s7.R2.fq.gz", "test/s7.fastp.html", "test/s7.fastp.json", "test/s7_1.fastp.fastq.gz", @@ -439,6 +483,8 @@ "test/s7_2.fastp.fastq.gz_fastqc_data.txt", "test/s7_2.fastp.fastq.gz_fastqc_report.html", "test/s7_2.fastp.fastq.gz_summary.txt", + "test/s8.R1.fq.gz", + "test/s8.R2.fq.gz", "test/s8.fastp.html", "test/s8.fastp.json", "test/s8_1.fastp.fastq.gz", @@ -451,6 +497,8 @@ "test/s8_2.fastp.fastq.gz_fastqc_data.txt", "test/s8_2.fastp.fastq.gz_fastqc_report.html", "test/s8_2.fastp.fastq.gz_summary.txt", + "test/s9.R1.fq.gz", + "test/s9.R2.fq.gz", "test/s9.fastp.html", "test/s9.fastp.json", "test/s9_1.fastp.fastq.gz", @@ -463,6 +511,8 @@ "test/s9_2.fastp.fastq.gz_fastqc_data.txt", "test/s9_2.fastp.fastq.gz_fastqc_report.html", "test/s9_2.fastp.fastq.gz_summary.txt", + "test/unmatched.R1.fq.gz", + "test/unmatched.R2.fq.gz", "test/unmatched.fastp.html", "test/unmatched.fastp.json", "test/unmatched_1.fastp.fastq.gz", @@ -501,7 +551,11 @@ "multiqc_citations.txt:md5,d35df50e9903a96a2b3bce3c1fbc8ad2", "test.csv:md5,c01a880241575a67e3eb5dc461a4972c", "demux-metrics.txt:md5,1d587fa959f9129155314cf531103347", + "s1.R1.fq.gz:md5,1eadc3622432e260b2d1c43d669b621a", + "s1.R2.fq.gz:md5,fe11bc516e32e2ee6c3064dd7d157bc8", "s1.fastp.json:md5,be9a4b1838890e0ef5c586a3dc83b728", + "s10.R1.fq.gz:md5,68d72892789df70b17b8886d6a616999", + "s10.R2.fq.gz:md5,abe44a80eebd1a4a7ec432ee3142f599", "s10.fastp.json:md5,4a9489b26bda96e3b589d54df90ff063", "s10_1.fastp.fastq.gz:md5,68d72892789df70b17b8886d6a616999", "s10_1.fastp.fastq.gz.md5:md5,8db05dbfa024326847b7dcbf5f9bc5ee", @@ -511,6 +565,8 @@ "s10_2.fastp.fastq.gz.md5:md5,5cbb47118bc5c1fec6b6e08a1f1c30a6", "s10_2.fastp.fastq.gz_fastqc_data.txt:md5,42f985dc5d6e23ab745c90cd8bf0889b", "s10_2.fastp.fastq.gz_summary.txt:md5,cf832ac3f3e9bf35bcfaa9768e2dcc20", + "s11.R1.fq.gz:md5,1e63515691b7694b3237f69e95dacdd7", + "s11.R2.fq.gz:md5,3431b7a6d5840afb4460529a6f9611e3", "s11.fastp.json:md5,3ddede2a5cb7c7b5567390d3d39a5dc5", "s11_1.fastp.fastq.gz:md5,1e63515691b7694b3237f69e95dacdd7", "s11_1.fastp.fastq.gz.md5:md5,8d33a1fe56fb44826cb377daa5b730ed", @@ -520,6 +576,8 @@ "s11_2.fastp.fastq.gz.md5:md5,93334c959bd78786b274cc05db184e14", "s11_2.fastp.fastq.gz_fastqc_data.txt:md5,427934d28e9bc0987889cafc3d58647d", "s11_2.fastp.fastq.gz_summary.txt:md5,a09abb540a0e59bd43be621c7ff10a3e", + "s12.R1.fq.gz:md5,a27e66093a904a269bfcc3c3f98a1238", + "s12.R2.fq.gz:md5,25b5b8ced9353f202880077aabd2a721", "s12.fastp.json:md5,f2183e56c353c842179e3a9c9961ae92", "s12_1.fastp.fastq.gz:md5,a27e66093a904a269bfcc3c3f98a1238", "s12_1.fastp.fastq.gz.md5:md5,e68abcbca9161b0a02def11aaf3ba9d1", @@ -529,6 +587,8 @@ "s12_2.fastp.fastq.gz.md5:md5,977807b9ef4f4327d2b54ac9e1497437", "s12_2.fastp.fastq.gz_fastqc_data.txt:md5,63b15e0b2a65e69d125a8012bf50d9d9", "s12_2.fastp.fastq.gz_summary.txt:md5,05cf105e959da1c76b1d6724b12b9a66", + "s13.R1.fq.gz:md5,353b2cbd1394d0e1c03cd3a4a7f4f623", + "s13.R2.fq.gz:md5,3e3c6ed5933d864759cceee197f8fa64", "s13.fastp.json:md5,6a61f4bf86a107a8090ed7c8fe60670c", "s13_1.fastp.fastq.gz:md5,353b2cbd1394d0e1c03cd3a4a7f4f623", "s13_1.fastp.fastq.gz.md5:md5,c8717d66778eb444f03bb4ba2b42a419", @@ -538,6 +598,8 @@ "s13_2.fastp.fastq.gz.md5:md5,4a2737d6b404afa20e57a25e3e16c357", "s13_2.fastp.fastq.gz_fastqc_data.txt:md5,0f37812e627b4c608dc1254aff903f11", "s13_2.fastp.fastq.gz_summary.txt:md5,213304b4943eabe32b43abe315a99a72", + "s14.R1.fq.gz:md5,83744d94d2f5d3722c960566b7a5267e", + "s14.R2.fq.gz:md5,1aecf34deb4bc27069f4ff83a0fb9f5d", "s14.fastp.json:md5,dea1c5d8dd7311ee10a1663c62b755e5", "s14_1.fastp.fastq.gz:md5,83744d94d2f5d3722c960566b7a5267e", "s14_1.fastp.fastq.gz.md5:md5,1ed08db7b3ee59699c69f8f6802eea1b", @@ -547,6 +609,8 @@ "s14_2.fastp.fastq.gz.md5:md5,8331df306ee370dc1eab5333f9f984b5", "s14_2.fastp.fastq.gz_fastqc_data.txt:md5,f3397fb39b7d261ef30a531b9defd7af", "s14_2.fastp.fastq.gz_summary.txt:md5,795fe9cba1265989811625916f65fd8a", + "s15.R1.fq.gz:md5,ea1f11b52fc604e4aa168a78bf086892", + "s15.R2.fq.gz:md5,f059ac2b1125d364570be8a5010e94d8", "s15.fastp.json:md5,5271bdbbdf1c2c3c1e5a1ea541b39d9b", "s15_1.fastp.fastq.gz:md5,ea1f11b52fc604e4aa168a78bf086892", "s15_1.fastp.fastq.gz.md5:md5,dcc9a9feac74537abbf110a050634f16", @@ -556,6 +620,8 @@ "s15_2.fastp.fastq.gz.md5:md5,eac53af81c90e12babd1868ba63250d7", "s15_2.fastp.fastq.gz_fastqc_data.txt:md5,8fcbf9893d145fb7ba5828ee587219b1", "s15_2.fastp.fastq.gz_summary.txt:md5,d879805b86fd51404213146167de0bb8", + "s16.R1.fq.gz:md5,150db1d3462b6cdd8022011b462d190d", + "s16.R2.fq.gz:md5,a939a31d634df5a6c5741a79ad84fea5", "s16.fastp.json:md5,178faff96bfe299eeda69bc42cf5969c", "s16_1.fastp.fastq.gz:md5,150db1d3462b6cdd8022011b462d190d", "s16_1.fastp.fastq.gz.md5:md5,f7dff2b49d590f7357e69eafb61b17f8", @@ -565,6 +631,8 @@ "s16_2.fastp.fastq.gz.md5:md5,1edbe71af9b9461671c8b6a88e8c1b2d", "s16_2.fastp.fastq.gz_fastqc_data.txt:md5,6e67cf4be9cbb06fa589ffb2a252eba2", "s16_2.fastp.fastq.gz_summary.txt:md5,77184c2c0a60f6150a2741c526d292b1", + "s17.R1.fq.gz:md5,eb2a43e737d5bc941866957d878f52cb", + "s17.R2.fq.gz:md5,affeeeb95f4ab3eb73ff3fd49d62a460", "s17.fastp.json:md5,22592f57012a71239e4571b4ee81f68e", "s17_1.fastp.fastq.gz:md5,eb2a43e737d5bc941866957d878f52cb", "s17_1.fastp.fastq.gz.md5:md5,8a78a67904f87e1d7f7b0bdadf4fd358", @@ -574,6 +642,8 @@ "s17_2.fastp.fastq.gz.md5:md5,4afdddaae7c346c587bd6611da6f8340", "s17_2.fastp.fastq.gz_fastqc_data.txt:md5,d5c62b1c0d48ca2d5b66187294574bee", "s17_2.fastp.fastq.gz_summary.txt:md5,f5322e243e01c8da1e497773bb691d5b", + "s18.R1.fq.gz:md5,413c245496557c3973bcb2c8fd738fed", + "s18.R2.fq.gz:md5,50d854cd559fb641967e8eda19006f8f", "s18.fastp.json:md5,d7877e69b0f42df112a1aa7e4a4f2b3b", "s18_1.fastp.fastq.gz:md5,413c245496557c3973bcb2c8fd738fed", "s18_1.fastp.fastq.gz.md5:md5,9097ef96f51fce62a56b2b15321552c9", @@ -583,6 +653,8 @@ "s18_2.fastp.fastq.gz.md5:md5,b27dbe25fc37de3cd294200e5733d725", "s18_2.fastp.fastq.gz_fastqc_data.txt:md5,93a87272a4b3baf54adbd7d6db4a1e18", "s18_2.fastp.fastq.gz_summary.txt:md5,8208a75cb7c51db537b893061f1f47bf", + "s19.R1.fq.gz:md5,9581c36425dd36b1bf4a844d4c3fd434", + "s19.R2.fq.gz:md5,13e966cdfcf3fd272a1d739dbe82e05c", "s19.fastp.json:md5,1992210c2eed2fb36c04b656f5f50ff6", "s19_1.fastp.fastq.gz:md5,9581c36425dd36b1bf4a844d4c3fd434", "s19_1.fastp.fastq.gz.md5:md5,57cf0a82a1cbc6f81dd3af344769c067", @@ -600,7 +672,11 @@ "s1_2.fastp.fastq.gz.md5:md5,fda56aa2d1c15cb762abf59a4f64e1bb", "s1_2.fastp.fastq.gz_fastqc_data.txt:md5,0d8aedb8f157166910a984e01c8cffed", "s1_2.fastp.fastq.gz_summary.txt:md5,6ea5d63f4d9ad9db3d9a489e31ff13ad", + "s2.R1.fq.gz:md5,e5a9598bef0d53087aa25530667ccf79", + "s2.R2.fq.gz:md5,7cbede4e3e641207da50ebb96653d0df", "s2.fastp.json:md5,5b7111c2b812648a6df3241ee1a3a807", + "s20.R1.fq.gz:md5,32144c46d24d5c264d98be49b8d8fb1d", + "s20.R2.fq.gz:md5,585a1ff0e75a693c7464f6d0966c5fb9", "s20.fastp.json:md5,98f0d732c90f5108d96bd3d690b55691", "s20_1.fastp.fastq.gz:md5,32144c46d24d5c264d98be49b8d8fb1d", "s20_1.fastp.fastq.gz.md5:md5,4dc0f3e4498df3c04d47574134acee60", @@ -610,6 +686,8 @@ "s20_2.fastp.fastq.gz.md5:md5,777e375cbdfc81d449cb9d09574ab16a", "s20_2.fastp.fastq.gz_fastqc_data.txt:md5,352c6eba7490dbeadd2e8bb528959e00", "s20_2.fastp.fastq.gz_summary.txt:md5,0adc9b32fab9218bb96503ca98974579", + "s21.R1.fq.gz:md5,1e92094589206300ef884273ee9ee265", + "s21.R2.fq.gz:md5,9f9278e60ba2dd2c5bb14d021268c613", "s21.fastp.json:md5,e718ebf18e43b2701cd41ff12590efac", "s21_1.fastp.fastq.gz:md5,1e92094589206300ef884273ee9ee265", "s21_1.fastp.fastq.gz.md5:md5,271cbfb8258b802dff135d0134f08896", @@ -619,6 +697,8 @@ "s21_2.fastp.fastq.gz.md5:md5,bb1d568adb5761fbe58e7042753f7e6b", "s21_2.fastp.fastq.gz_fastqc_data.txt:md5,4220408a8a49188293008705d99797d7", "s21_2.fastp.fastq.gz_summary.txt:md5,9cac4c355b24c72774be49dc72b910c5", + "s22.R1.fq.gz:md5,5abfd96f6a1eb0391208fe7f4dcecade", + "s22.R2.fq.gz:md5,868ef4eb6ca676ed93d2389188ed3d81", "s22.fastp.json:md5,8487379d87e761dad734a69cab1cfce9", "s22_1.fastp.fastq.gz:md5,5abfd96f6a1eb0391208fe7f4dcecade", "s22_1.fastp.fastq.gz.md5:md5,2545a5e84d10f130551c45ea29154dde", @@ -628,6 +708,8 @@ "s22_2.fastp.fastq.gz.md5:md5,58ca118289a9f7836b4b7780099fb803", "s22_2.fastp.fastq.gz_fastqc_data.txt:md5,6aa91feefd6ded02d5158132482f6f75", "s22_2.fastp.fastq.gz_summary.txt:md5,7704ed026dbaf60ccb8426b5d122c53d", + "s23.R1.fq.gz:md5,0d0ec11e03749ac7a48d00a46781a74f", + "s23.R2.fq.gz:md5,3ca8a6141f9e4f9595a90075ac390e7f", "s23.fastp.json:md5,8e007318d9f605f36a23f78b862e8e65", "s23_1.fastp.fastq.gz:md5,0d0ec11e03749ac7a48d00a46781a74f", "s23_1.fastp.fastq.gz.md5:md5,0aa820c87fa31d216678ad1e0a959351", @@ -637,6 +719,8 @@ "s23_2.fastp.fastq.gz.md5:md5,81b8b9414e34771045a38dd2f09fe1a1", "s23_2.fastp.fastq.gz_fastqc_data.txt:md5,03581c6566f47f1d942e578f03f520ba", "s23_2.fastp.fastq.gz_summary.txt:md5,15ddeefe82e3af35daf5254322c9abc6", + "s24.R1.fq.gz:md5,9af8ba800a69fc8637cfe864870bade7", + "s24.R2.fq.gz:md5,1e988f6a217b67271801f2041be5c66b", "s24.fastp.json:md5,0dab2f8c10346eb08a11b8e201663cbb", "s24_1.fastp.fastq.gz:md5,9af8ba800a69fc8637cfe864870bade7", "s24_1.fastp.fastq.gz.md5:md5,cd24734dc26c7ea8ea3c21bdc77ff9c4", @@ -654,6 +738,8 @@ "s2_2.fastp.fastq.gz.md5:md5,376b241d56d27365a559e1c3ca3bdacb", "s2_2.fastp.fastq.gz_fastqc_data.txt:md5,1815381c120dc27aa1cce557405b0375", "s2_2.fastp.fastq.gz_summary.txt:md5,3abb4bf4dac99a045470c9fef3186bd7", + "s3.R1.fq.gz:md5,aa1fe4107eb39313f97c1c045a3a15ed", + "s3.R2.fq.gz:md5,22332ab06eed7ff915ec1ffba0100610", "s3.fastp.json:md5,042a8f6af4755d36c35b5c1fc7311772", "s3_1.fastp.fastq.gz:md5,aa1fe4107eb39313f97c1c045a3a15ed", "s3_1.fastp.fastq.gz.md5:md5,f3deafacc172d00bfb62fddbd0eb17c3", @@ -663,6 +749,8 @@ "s3_2.fastp.fastq.gz.md5:md5,b06cc80886e7c21e9acbff3be7b20c06", "s3_2.fastp.fastq.gz_fastqc_data.txt:md5,b3cb5076eb6e22780051e66367f80469", "s3_2.fastp.fastq.gz_summary.txt:md5,d2f5f7caf04eba3fa1a72dfc620b7324", + "s4.R1.fq.gz:md5,f6818e27d3118f66168b8af2f155f4b0", + "s4.R2.fq.gz:md5,c489acd3fd4775cb9a69053d4b26250f", "s4.fastp.json:md5,6ddbd1bcbdfbd78abdfd01120938cccf", "s4_1.fastp.fastq.gz:md5,f6818e27d3118f66168b8af2f155f4b0", "s4_1.fastp.fastq.gz.md5:md5,a51cb41091933d7ea537e4eca66ee583", @@ -672,6 +760,8 @@ "s4_2.fastp.fastq.gz.md5:md5,5913f5cf971d04484e0473fc03e78a31", "s4_2.fastp.fastq.gz_fastqc_data.txt:md5,c062a41b9578769e063655ee0410179d", "s4_2.fastp.fastq.gz_summary.txt:md5,61f3820bf97c6b358d9e039266ac7691", + "s5.R1.fq.gz:md5,2c111ddbdc64a9f4a9fc7a27f2e2aaea", + "s5.R2.fq.gz:md5,6ae8e46cf5fa66f6998a72f15caa9c58", "s5.fastp.json:md5,8826756e18132471c33d5d0ba3f6b17f", "s5_1.fastp.fastq.gz:md5,2c111ddbdc64a9f4a9fc7a27f2e2aaea", "s5_1.fastp.fastq.gz.md5:md5,7fffdc9a1785f132cf56800a269aa20d", @@ -681,6 +771,8 @@ "s5_2.fastp.fastq.gz.md5:md5,bb1dfb34b2cfb26b5dbef8493eb4fdfe", "s5_2.fastp.fastq.gz_fastqc_data.txt:md5,9df4fa82eb11393fb57d7c029c7ae327", "s5_2.fastp.fastq.gz_summary.txt:md5,2fe1f212327441aa271f7f308270f3d2", + "s6.R1.fq.gz:md5,cc6c0fb00166827307c846c8e9661c47", + "s6.R2.fq.gz:md5,6d5556ca178aab7202cf860fff94f574", "s6.fastp.json:md5,6a0c0339fed4eb4f7e5780b7fef079d2", "s6_1.fastp.fastq.gz:md5,cc6c0fb00166827307c846c8e9661c47", "s6_1.fastp.fastq.gz.md5:md5,81910b3afe48abf930d7623f94adf9f6", @@ -690,6 +782,8 @@ "s6_2.fastp.fastq.gz.md5:md5,2417e2f3c914fa8f032afd8676b2d43d", "s6_2.fastp.fastq.gz_fastqc_data.txt:md5,a0cfd6e5c6d000b54798aa7967b654d5", "s6_2.fastp.fastq.gz_summary.txt:md5,1afa3915b57e51d56eb998af0c2121a8", + "s7.R1.fq.gz:md5,36ab856e02e7d1c17c3a122ec9179cbb", + "s7.R2.fq.gz:md5,0764aae83716030f4ea05cca5d4511a4", "s7.fastp.json:md5,19d4c1d93cfddfe31c5be76dc0e1b50a", "s7_1.fastp.fastq.gz:md5,36ab856e02e7d1c17c3a122ec9179cbb", "s7_1.fastp.fastq.gz.md5:md5,6942c45c37a57407853cfcbef1a7576e", @@ -699,6 +793,8 @@ "s7_2.fastp.fastq.gz.md5:md5,08bbbd69fc3ee7df14b33947f3265790", "s7_2.fastp.fastq.gz_fastqc_data.txt:md5,4eda9a3f2a829184adbb61fcea58f6b4", "s7_2.fastp.fastq.gz_summary.txt:md5,5d47846f21b5fe4e8b05cdd054f6a91b", + "s8.R1.fq.gz:md5,f37f97582eafb96aae79a1d635e4585e", + "s8.R2.fq.gz:md5,b5e48a29663e3e92354794290e2ba419", "s8.fastp.json:md5,bad705ea8bbd9957d3a1bb831b2966c2", "s8_1.fastp.fastq.gz:md5,f37f97582eafb96aae79a1d635e4585e", "s8_1.fastp.fastq.gz.md5:md5,530292bf972cf1b4b234fc40ae40e402", @@ -708,6 +804,8 @@ "s8_2.fastp.fastq.gz.md5:md5,ec862cc5d2cc18be996a8a38b4052d87", "s8_2.fastp.fastq.gz_fastqc_data.txt:md5,065d4208b7d2c0162b71e47a673b6cd7", "s8_2.fastp.fastq.gz_summary.txt:md5,821bbcf71f1e5e568aee2e8ac5788305", + "s9.R1.fq.gz:md5,42e79f8a4e8db043b76782538982d1ea", + "s9.R2.fq.gz:md5,d3af5fce6432934a479770f16c8f50b1", "s9.fastp.json:md5,a961c9be7ef88ae4bc188809d6383842", "s9_1.fastp.fastq.gz:md5,42e79f8a4e8db043b76782538982d1ea", "s9_1.fastp.fastq.gz.md5:md5,9ba7d8112363ed1de4e542e458ad02fa", @@ -717,6 +815,8 @@ "s9_2.fastp.fastq.gz.md5:md5,35b322363f80b060c3c79b6d21448661", "s9_2.fastp.fastq.gz_fastqc_data.txt:md5,44ac3768c508a14eea3756ed88271d96", "s9_2.fastp.fastq.gz_summary.txt:md5,d6c912c1a073a7b0df9c1c3e00b1b814", + "unmatched.R1.fq.gz:md5,8f77e8d5adc4b16dd499fe3bd092f66d", + "unmatched.R2.fq.gz:md5,a2c623dcaa11fe3faaecc563c376f24b", "unmatched.fastp.json:md5,4f4f375bc6fef5880d843df77ae2d5f1", "unmatched_1.fastp.fastq.gz:md5,8f77e8d5adc4b16dd499fe3bd092f66d", "unmatched_1.fastp.fastq.gz.md5:md5,5b5876132b859c7dc6558bc63b24f8bf", @@ -732,6 +832,6 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-17T23:37:31.252912431" + "timestamp": "2024-10-29T17:33:21.811056238" } } \ No newline at end of file diff --git a/tests/sgdemux.nf.test.snap b/tests/sgdemux.nf.test.snap index 285d4c9c..941e5242 100644 --- a/tests/sgdemux.nf.test.snap +++ b/tests/sgdemux.nf.test.snap @@ -221,6 +221,8 @@ "sim-data/Undetermined_S25_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/Undetermined_S25_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/Undetermined_S25_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/Undetermined_S25_L001_R1_001.fastq.gz", + "sim-data/Undetermined_S25_L001_R2_001.fastq.gz", "sim-data/metrics.tsv", "sim-data/most_frequent_unmatched.tsv", "sim-data/per_project_metrics.tsv", @@ -237,6 +239,8 @@ "sim-data/s10_S10_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s10_S10_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s10_S10_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s10_S10_L001_R1_001.fastq.gz", + "sim-data/s10_S10_L001_R2_001.fastq.gz", "sim-data/s11_S11_L001.fastp.html", "sim-data/s11_S11_L001.fastp.json", "sim-data/s11_S11_L001_1.fastp.fastq.gz", @@ -249,6 +253,8 @@ "sim-data/s11_S11_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s11_S11_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s11_S11_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s11_S11_L001_R1_001.fastq.gz", + "sim-data/s11_S11_L001_R2_001.fastq.gz", "sim-data/s12_S12_L001.fastp.html", "sim-data/s12_S12_L001.fastp.json", "sim-data/s12_S12_L001_1.fastp.fastq.gz", @@ -261,6 +267,8 @@ "sim-data/s12_S12_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s12_S12_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s12_S12_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s12_S12_L001_R1_001.fastq.gz", + "sim-data/s12_S12_L001_R2_001.fastq.gz", "sim-data/s13_S13_L001.fastp.html", "sim-data/s13_S13_L001.fastp.json", "sim-data/s13_S13_L001_1.fastp.fastq.gz", @@ -273,6 +281,8 @@ "sim-data/s13_S13_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s13_S13_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s13_S13_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s13_S13_L001_R1_001.fastq.gz", + "sim-data/s13_S13_L001_R2_001.fastq.gz", "sim-data/s14_S14_L001.fastp.html", "sim-data/s14_S14_L001.fastp.json", "sim-data/s14_S14_L001_1.fastp.fastq.gz", @@ -285,6 +295,8 @@ "sim-data/s14_S14_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s14_S14_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s14_S14_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s14_S14_L001_R1_001.fastq.gz", + "sim-data/s14_S14_L001_R2_001.fastq.gz", "sim-data/s15_S15_L001.fastp.html", "sim-data/s15_S15_L001.fastp.json", "sim-data/s15_S15_L001_1.fastp.fastq.gz", @@ -297,6 +309,8 @@ "sim-data/s15_S15_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s15_S15_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s15_S15_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s15_S15_L001_R1_001.fastq.gz", + "sim-data/s15_S15_L001_R2_001.fastq.gz", "sim-data/s16_S16_L001.fastp.html", "sim-data/s16_S16_L001.fastp.json", "sim-data/s16_S16_L001_1.fastp.fastq.gz", @@ -309,6 +323,8 @@ "sim-data/s16_S16_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s16_S16_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s16_S16_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s16_S16_L001_R1_001.fastq.gz", + "sim-data/s16_S16_L001_R2_001.fastq.gz", "sim-data/s17_S17_L001.fastp.html", "sim-data/s17_S17_L001.fastp.json", "sim-data/s17_S17_L001_1.fastp.fastq.gz", @@ -321,6 +337,8 @@ "sim-data/s17_S17_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s17_S17_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s17_S17_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s17_S17_L001_R1_001.fastq.gz", + "sim-data/s17_S17_L001_R2_001.fastq.gz", "sim-data/s18_S18_L001.fastp.html", "sim-data/s18_S18_L001.fastp.json", "sim-data/s18_S18_L001_1.fastp.fastq.gz", @@ -333,6 +351,8 @@ "sim-data/s18_S18_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s18_S18_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s18_S18_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s18_S18_L001_R1_001.fastq.gz", + "sim-data/s18_S18_L001_R2_001.fastq.gz", "sim-data/s19_S19_L001.fastp.html", "sim-data/s19_S19_L001.fastp.json", "sim-data/s19_S19_L001_1.fastp.fastq.gz", @@ -345,6 +365,8 @@ "sim-data/s19_S19_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s19_S19_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s19_S19_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s19_S19_L001_R1_001.fastq.gz", + "sim-data/s19_S19_L001_R2_001.fastq.gz", "sim-data/s1_S1_L001.fastp.html", "sim-data/s1_S1_L001.fastp.json", "sim-data/s1_S1_L001_1.fastp.fastq.gz", @@ -357,6 +379,8 @@ "sim-data/s1_S1_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s1_S1_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s1_S1_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s1_S1_L001_R1_001.fastq.gz", + "sim-data/s1_S1_L001_R2_001.fastq.gz", "sim-data/s20_S20_L001.fastp.html", "sim-data/s20_S20_L001.fastp.json", "sim-data/s20_S20_L001_1.fastp.fastq.gz", @@ -369,6 +393,8 @@ "sim-data/s20_S20_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s20_S20_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s20_S20_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s20_S20_L001_R1_001.fastq.gz", + "sim-data/s20_S20_L001_R2_001.fastq.gz", "sim-data/s21_S21_L001.fastp.html", "sim-data/s21_S21_L001.fastp.json", "sim-data/s21_S21_L001_1.fastp.fastq.gz", @@ -381,6 +407,8 @@ "sim-data/s21_S21_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s21_S21_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s21_S21_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s21_S21_L001_R1_001.fastq.gz", + "sim-data/s21_S21_L001_R2_001.fastq.gz", "sim-data/s22_S22_L001.fastp.html", "sim-data/s22_S22_L001.fastp.json", "sim-data/s22_S22_L001_1.fastp.fastq.gz", @@ -393,6 +421,8 @@ "sim-data/s22_S22_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s22_S22_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s22_S22_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s22_S22_L001_R1_001.fastq.gz", + "sim-data/s22_S22_L001_R2_001.fastq.gz", "sim-data/s23_S23_L001.fastp.html", "sim-data/s23_S23_L001.fastp.json", "sim-data/s23_S23_L001_1.fastp.fastq.gz", @@ -405,6 +435,8 @@ "sim-data/s23_S23_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s23_S23_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s23_S23_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s23_S23_L001_R1_001.fastq.gz", + "sim-data/s23_S23_L001_R2_001.fastq.gz", "sim-data/s24_S24_L001.fastp.html", "sim-data/s24_S24_L001.fastp.json", "sim-data/s24_S24_L001_1.fastp.fastq.gz", @@ -417,6 +449,8 @@ "sim-data/s24_S24_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s24_S24_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s24_S24_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s24_S24_L001_R1_001.fastq.gz", + "sim-data/s24_S24_L001_R2_001.fastq.gz", "sim-data/s2_S2_L001.fastp.html", "sim-data/s2_S2_L001.fastp.json", "sim-data/s2_S2_L001_1.fastp.fastq.gz", @@ -429,6 +463,8 @@ "sim-data/s2_S2_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s2_S2_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s2_S2_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s2_S2_L001_R1_001.fastq.gz", + "sim-data/s2_S2_L001_R2_001.fastq.gz", "sim-data/s3_S3_L001.fastp.html", "sim-data/s3_S3_L001.fastp.json", "sim-data/s3_S3_L001_1.fastp.fastq.gz", @@ -441,6 +477,8 @@ "sim-data/s3_S3_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s3_S3_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s3_S3_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s3_S3_L001_R1_001.fastq.gz", + "sim-data/s3_S3_L001_R2_001.fastq.gz", "sim-data/s4_S4_L001.fastp.html", "sim-data/s4_S4_L001.fastp.json", "sim-data/s4_S4_L001_1.fastp.fastq.gz", @@ -453,6 +491,8 @@ "sim-data/s4_S4_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s4_S4_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s4_S4_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s4_S4_L001_R1_001.fastq.gz", + "sim-data/s4_S4_L001_R2_001.fastq.gz", "sim-data/s5_S5_L001.fastp.html", "sim-data/s5_S5_L001.fastp.json", "sim-data/s5_S5_L001_1.fastp.fastq.gz", @@ -465,6 +505,8 @@ "sim-data/s5_S5_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s5_S5_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s5_S5_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s5_S5_L001_R1_001.fastq.gz", + "sim-data/s5_S5_L001_R2_001.fastq.gz", "sim-data/s6_S6_L001.fastp.html", "sim-data/s6_S6_L001.fastp.json", "sim-data/s6_S6_L001_1.fastp.fastq.gz", @@ -477,6 +519,8 @@ "sim-data/s6_S6_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s6_S6_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s6_S6_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s6_S6_L001_R1_001.fastq.gz", + "sim-data/s6_S6_L001_R2_001.fastq.gz", "sim-data/s7_S7_L001.fastp.html", "sim-data/s7_S7_L001.fastp.json", "sim-data/s7_S7_L001_1.fastp.fastq.gz", @@ -489,6 +533,8 @@ "sim-data/s7_S7_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s7_S7_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s7_S7_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s7_S7_L001_R1_001.fastq.gz", + "sim-data/s7_S7_L001_R2_001.fastq.gz", "sim-data/s8_S8_L001.fastp.html", "sim-data/s8_S8_L001.fastp.json", "sim-data/s8_S8_L001_1.fastp.fastq.gz", @@ -501,6 +547,8 @@ "sim-data/s8_S8_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s8_S8_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s8_S8_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s8_S8_L001_R1_001.fastq.gz", + "sim-data/s8_S8_L001_R2_001.fastq.gz", "sim-data/s9_S9_L001.fastp.html", "sim-data/s9_S9_L001.fastp.json", "sim-data/s9_S9_L001_1.fastp.fastq.gz", @@ -513,6 +561,8 @@ "sim-data/s9_S9_L001_2.fastp.fastq.gz_fastqc_data.txt", "sim-data/s9_S9_L001_2.fastp.fastq.gz_fastqc_report.html", "sim-data/s9_S9_L001_2.fastp.fastq.gz_summary.txt", + "sim-data/s9_S9_L001_R1_001.fastq.gz", + "sim-data/s9_S9_L001_R2_001.fastq.gz", "sim-data/sample_barcode_hop_metrics.tsv" ], [ @@ -582,6 +632,6 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-18T00:54:45.989490742" + "timestamp": "2024-10-29T17:49:16.207647882" } } \ No newline at end of file From 833edde476d516a662a801388cd2cb8e78a3f581 Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Tue, 29 Oct 2024 17:56:19 +0000 Subject: [PATCH 4/6] Updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12fc7b06..6336efd8 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `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. +- [#282](https://github.com/nf-core/demultiplex/pull/282) Fixed downstream samplesheet paths and `publishDir` config. ## 1.5.2 - 2024-10-07 From c53abeedd2e4831f43dbb5e9aa2f5255dfbb516a Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Wed, 30 Oct 2024 16:05:51 +0000 Subject: [PATCH 5/6] Fixes in samplesheet generator script and snap updates --- conf/modules.config | 9 +++ modules/local/fastq_to_samplesheet/main.nf | 78 +++++++++++++++------- tests/bases2fastq.nf.test | 5 +- tests/bases2fastq.nf.test.snap | 34 +++++++++- tests/bcl2fastq.nf.test | 5 +- tests/bcl2fastq.nf.test.snap | 34 +++++++++- tests/bclconvert.nf.test | 5 +- tests/bclconvert.nf.test.snap | 34 +++++++++- tests/bclconvert_mini.nf.test | 5 +- tests/bclconvert_mini.nf.test.snap | 41 +++++++++--- tests/fqtk.nf.test | 5 +- tests/fqtk.nf.test.snap | 60 +++++++++-------- tests/kraken.nf.test | 5 +- tests/kraken.nf.test.snap | 34 +++++++++- tests/lib/UTILS.groovy | 54 +++++++++++++++ tests/mkfastq.nf.test | 5 +- tests/mkfastq.nf.test.snap | 37 ++++++++-- tests/sgdemux.nf.test | 5 +- tests/sgdemux.nf.test.snap | 60 +++++++++-------- tests/skip_tools.nf.test | 5 +- tests/skip_tools.nf.test.snap | 50 +++++++++----- tests/test_pe.nf.test | 5 +- tests/test_pe.nf.test.snap | 34 +++++++++- workflows/demultiplex.nf | 25 +------ 24 files changed, 477 insertions(+), 157 deletions(-) create mode 100644 tests/lib/UTILS.groovy diff --git a/conf/modules.config b/conf/modules.config index de264c67..7dc14397 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -215,6 +215,7 @@ process { ] ] } + withName: 'MULTIQC' { cache = false ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' } @@ -231,6 +232,7 @@ process { mode: params.publish_dir_mode ] } + withName: SAMSHEE { ext.args = [ params.json_schema_validator ? "--schema '${params.json_schema_validator}'" : "", @@ -244,5 +246,12 @@ process { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } + + withName: 'FASTQ_TO_SAMPLESHEET*' { + publishDir = [ + path: { "${params.outdir}/samplesheet/" }, + mode: params.publish_dir_mode, + ] + } } diff --git a/modules/local/fastq_to_samplesheet/main.nf b/modules/local/fastq_to_samplesheet/main.nf index 5d6fb458..ef54bc65 100644 --- a/modules/local/fastq_to_samplesheet/main.nf +++ b/modules/local/fastq_to_samplesheet/main.nf @@ -5,7 +5,7 @@ process FASTQ_TO_SAMPLESHEET { memory 100.MB input: - val meta + val meta // Expecting a list of items val pipeline val strandedness @@ -13,39 +13,67 @@ process FASTQ_TO_SAMPLESHEET { tuple val(meta_clone), path("*samplesheet.csv"), emit: samplesheet exec: + // Initialize the samplesheet content + def samplesheetHeader = [] + def samplesheetRows = [] - // Calculate the dynamic output directory based on meta.lane - def outputDir = meta.publish_dir + // Sort meta by item.id + def sortedMeta = meta.sort { it.id } - // Add relevant fields to the map - def pipeline_map = [ - sample : meta.samplename, - fastq_1 : outputDir + '/' + file(meta.fastq_1).fileName - ] + // Collect all unique columns from all items and create rows + def allColumns = new LinkedHashSet() - // Add fastq_2 if it's a paired-end sample - if (!meta.single_end) { - pipeline_map.fastq_2 = outputDir + '/' + file(meta.fastq_2).fileName - } + sortedMeta.each { item -> + // Check for required keys in each item + if (!item.samplename) { + error "Item with id ${item.id} is missing the 'samplename' key." + } + if (!item.fastq_1) { + error "Item with id ${item.id} is missing the 'fastq_1' key." + } + + def pipeline_map = [:] // Initialize as an empty map + + // Prepare sample information + pipeline_map.sample = item.samplename + pipeline_map.fastq_1 = item.publish_dir + '/' + file(item.fastq_1).fileName + + // Add fastq_2 if it's a paired-end sample + if (!item.single_end && item.fastq_2) { + pipeline_map.fastq_2 = item.publish_dir + '/' + file(item.fastq_2).fileName ?: '' + } - // Add pipeline-specific entries - if (pipeline == 'rnaseq') { - pipeline_map << [ strandedness: strandedness ] - } else if (pipeline == 'atacseq') { - pipeline_map << [ replicate: 1 ] - } else if (pipeline == 'taxprofiler') { - pipeline_map << [ fasta: '' ] + // Add pipeline-specific entries + if (pipeline == 'rnaseq') { + pipeline_map.strandedness = strandedness ?: '' + } else if (pipeline == 'atacseq') { + pipeline_map.replicate = 1 + } else if (pipeline == 'taxprofiler') { + pipeline_map.fasta = '' + } + + // Add all keys to the set of unique columns + allColumns.addAll(pipeline_map.keySet()) + + // Prepare a row for the samplesheet, filling in missing values with empty strings + def rowValues = allColumns.collect { key -> + pipeline_map.containsKey(key) ? '"' + pipeline_map[key] + '"' : '""' + } + samplesheetRows << rowValues.join(",") } - // Create the samplesheet content - def samplesheet = pipeline_map.keySet().collect { '"' + it + '"' }.join(",") + '\n' - samplesheet += pipeline_map.values().collect { '"' + it + '"' }.join(",") + // Create a sorted list of headers + samplesheetHeader = allColumns.collect { '"' + it + '"' } + + // Create the complete samplesheet content + def samplesheet = samplesheetHeader.join(",") + '\n' + samplesheetRows.join("\n") // Write samplesheet to file - def samplesheet_file = task.workDir.resolve("${meta.id}.samplesheet.csv") + def samplesheet_file = task.workDir.resolve("${pipeline}_samplesheet.csv") samplesheet_file.text = samplesheet - meta_clone = meta.clone() - meta_clone.remove('publishdir') + // Clone the first item in meta for output + meta_clone = meta.first().clone() + meta_clone.remove('publish_dir') // Removing the publish_dir just in case, although output channel is not used by other process } diff --git a/tests/bases2fastq.nf.test b/tests/bases2fastq.nf.test index 71de1afb..e917f639 100644 --- a/tests/bases2fastq.nf.test +++ b/tests/bases2fastq.nf.test @@ -30,7 +30,10 @@ nextflow_pipeline { stable_name, // All files with stable contents stable_path - ).match() } + ).match() }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/atacseq_samplesheet.csv")).match("atacseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/rnaseq_samplesheet.csv")).match("rnaseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/taxprofiler_samplesheet.csv")).match("taxprofiler_samplesheet") } ) } } diff --git a/tests/bases2fastq.nf.test.snap b/tests/bases2fastq.nf.test.snap index 230a60e8..89f094eb 100644 --- a/tests/bases2fastq.nf.test.snap +++ b/tests/bases2fastq.nf.test.snap @@ -23,8 +23,6 @@ } }, [ - "fastq", - "fastq/DefaultSample.samplesheet.csv", "multiqc", "multiqc/multiqc_data", "multiqc/multiqc_data/fastp-insert-size-plot.txt", @@ -211,6 +209,36 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-29T17:48:00.306378134" + "timestamp": "2024-10-30T15:25:52.803280321" + }, + "rnaseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:25:55.693738747" + }, + "atacseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:25:54.286158931" + }, + "taxprofiler_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:25:57.12531458" } } \ No newline at end of file diff --git a/tests/bcl2fastq.nf.test b/tests/bcl2fastq.nf.test index ef69097b..cedbdedd 100644 --- a/tests/bcl2fastq.nf.test +++ b/tests/bcl2fastq.nf.test @@ -30,7 +30,10 @@ nextflow_pipeline { stable_name, // All files with stable contents stable_path - ).match() } + ).match() }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/atacseq_samplesheet.csv")).match("atacseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/rnaseq_samplesheet.csv")).match("rnaseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/taxprofiler_samplesheet.csv")).match("taxprofiler_samplesheet") } ) } } diff --git a/tests/bcl2fastq.nf.test.snap b/tests/bcl2fastq.nf.test.snap index cdda06ef..a83672b1 100644 --- a/tests/bcl2fastq.nf.test.snap +++ b/tests/bcl2fastq.nf.test.snap @@ -1,4 +1,24 @@ { + "rnaseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:27:18.557192574" + }, + "atacseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:27:13.631683141" + }, "Bcl2Fastq": { "content": [ 8, @@ -71,8 +91,6 @@ "220422_M11111_0222_000000000-K9H97/L001/Stats/DemuxSummaryF1L1.txt", "220422_M11111_0222_000000000-K9H97/L001/Stats/FastqSummaryF1L1.txt", "220422_M11111_0222_000000000-K9H97/L001/Stats/Stats.json", - "fastq", - "fastq/Sample1_S1_L001.samplesheet.csv", "multiqc", "multiqc/multiqc_data", "multiqc/multiqc_data/bcl2fastq-lane-stats-table.txt", @@ -241,6 +259,16 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-17T23:30:33.296858681" + "timestamp": "2024-10-30T15:27:08.66031858" + }, + "taxprofiler_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:27:23.563785123" } } \ No newline at end of file diff --git a/tests/bclconvert.nf.test b/tests/bclconvert.nf.test index efdc72c1..0400e16e 100644 --- a/tests/bclconvert.nf.test +++ b/tests/bclconvert.nf.test @@ -30,7 +30,10 @@ nextflow_pipeline { stable_name, // All files with stable contents stable_path - ).match() } + ).match() }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/atacseq_samplesheet.csv")).match("atacseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/rnaseq_samplesheet.csv")).match("rnaseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/taxprofiler_samplesheet.csv")).match("taxprofiler_samplesheet") } ) } } diff --git a/tests/bclconvert.nf.test.snap b/tests/bclconvert.nf.test.snap index 1339d5e3..bca8dab2 100644 --- a/tests/bclconvert.nf.test.snap +++ b/tests/bclconvert.nf.test.snap @@ -1,4 +1,14 @@ { + "rnaseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:28:48.222041833" + }, "BCL-CONVERT": { "content": [ 8, @@ -53,8 +63,6 @@ "220422_M11111_0222_000000000-K9H97/L001/Sample1_S1_L001_report.html", "220422_M11111_0222_000000000-K9H97/L001/Sample1_S1_L001_summary.txt", "220422_M11111_0222_000000000-K9H97/L001/Undetermined_S0_L001_R1_001.fastq.gz", - "fastq", - "fastq/Sample1_S1_L001.samplesheet.csv", "multiqc", "multiqc/multiqc_data", "multiqc/multiqc_data/bclconvert-lane-stats-table.txt", @@ -237,6 +245,26 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-17T23:31:58.719385372" + "timestamp": "2024-10-30T15:28:38.170386268" + }, + "atacseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:28:43.215827644" + }, + "taxprofiler_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:28:53.253703589" } } \ No newline at end of file diff --git a/tests/bclconvert_mini.nf.test b/tests/bclconvert_mini.nf.test index 19f24167..076d6a54 100644 --- a/tests/bclconvert_mini.nf.test +++ b/tests/bclconvert_mini.nf.test @@ -30,7 +30,10 @@ nextflow_pipeline { stable_name, // All files with stable contents stable_path - ).match() } + ).match() }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/atacseq_samplesheet.csv")).match("atacseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/rnaseq_samplesheet.csv")).match("rnaseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/taxprofiler_samplesheet.csv")).match("taxprofiler_samplesheet") } ) } } diff --git a/tests/bclconvert_mini.nf.test.snap b/tests/bclconvert_mini.nf.test.snap index 8bdd4e5c..00e80ff4 100644 --- a/tests/bclconvert_mini.nf.test.snap +++ b/tests/bclconvert_mini.nf.test.snap @@ -1,7 +1,17 @@ { + "rnaseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:33:18.621857802" + }, "BCL-CONVERT-mini": { "content": [ - 38, + 23, { "BCLCONVERT": { "bclconvert": "4.3.6" @@ -20,13 +30,6 @@ } }, [ - "fastq", - "fastq/HBRR1_S1_L001.samplesheet.csv", - "fastq/HBRR2_S2_L001.samplesheet.csv", - "fastq/HBRR3_S3_L001.samplesheet.csv", - "fastq/UHRR1_S4_L001.samplesheet.csv", - "fastq/UHRR2_S5_L001.samplesheet.csv", - "fastq/UHRR3_S6_L001.samplesheet.csv", "miniseq_truseq_smrna", "miniseq_truseq_smrna/HBRR1_S1_L001.fastp.fastq.gz", "miniseq_truseq_smrna/HBRR1_S1_L001.fastp.fastq.gz.md5", @@ -350,6 +353,26 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-17T23:34:50.670465424" + "timestamp": "2024-10-30T15:30:52.179362614" + }, + "atacseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:32:05.328537478" + }, + "taxprofiler_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:34:31.69965379" } } \ No newline at end of file diff --git a/tests/fqtk.nf.test b/tests/fqtk.nf.test index cd1841a1..9f41e885 100644 --- a/tests/fqtk.nf.test +++ b/tests/fqtk.nf.test @@ -30,7 +30,10 @@ nextflow_pipeline { stable_name, // All files with stable contents stable_path - ).match() } + ).match() }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/atacseq_samplesheet.csv")).match("atacseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/rnaseq_samplesheet.csv")).match("rnaseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/taxprofiler_samplesheet.csv")).match("taxprofiler_samplesheet") } ) } } diff --git a/tests/fqtk.nf.test.snap b/tests/fqtk.nf.test.snap index 13c7507d..c4a582aa 100644 --- a/tests/fqtk.nf.test.snap +++ b/tests/fqtk.nf.test.snap @@ -1,7 +1,7 @@ { "FQTK": { "content": [ - 179, + 107, { "CSV2TSV": { "sed": 4.8 @@ -28,32 +28,6 @@ [ "csv2tsv", "csv2tsv/samplesheet.tsv", - "fastq", - "fastq/s1.samplesheet.csv", - "fastq/s10.samplesheet.csv", - "fastq/s11.samplesheet.csv", - "fastq/s12.samplesheet.csv", - "fastq/s13.samplesheet.csv", - "fastq/s14.samplesheet.csv", - "fastq/s15.samplesheet.csv", - "fastq/s16.samplesheet.csv", - "fastq/s17.samplesheet.csv", - "fastq/s18.samplesheet.csv", - "fastq/s19.samplesheet.csv", - "fastq/s2.samplesheet.csv", - "fastq/s20.samplesheet.csv", - "fastq/s21.samplesheet.csv", - "fastq/s22.samplesheet.csv", - "fastq/s23.samplesheet.csv", - "fastq/s24.samplesheet.csv", - "fastq/s3.samplesheet.csv", - "fastq/s4.samplesheet.csv", - "fastq/s5.samplesheet.csv", - "fastq/s6.samplesheet.csv", - "fastq/s7.samplesheet.csv", - "fastq/s8.samplesheet.csv", - "fastq/s9.samplesheet.csv", - "fastq/unmatched.samplesheet.csv", "multiqc", "multiqc/multiqc_data", "multiqc/multiqc_data/fastp-seq-content-gc-plot_Read_1_After_filtering.txt", @@ -832,6 +806,36 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-29T17:33:21.811056238" + "timestamp": "2024-10-30T15:37:06.039601101" + }, + "rnaseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:37:09.37721135" + }, + "atacseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:37:07.737922949" + }, + "taxprofiler_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:37:11.05337654" } } \ No newline at end of file diff --git a/tests/kraken.nf.test b/tests/kraken.nf.test index ec4cead7..763df39b 100644 --- a/tests/kraken.nf.test +++ b/tests/kraken.nf.test @@ -36,7 +36,10 @@ nextflow_pipeline { stable_name, // All files with stable contents stable_path - ).match() } + ).match() }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/atacseq_samplesheet.csv")).match("atacseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/rnaseq_samplesheet.csv")).match("rnaseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/taxprofiler_samplesheet.csv")).match("taxprofiler_samplesheet") } ) } } diff --git a/tests/kraken.nf.test.snap b/tests/kraken.nf.test.snap index 7cdd3b53..f11ad54d 100644 --- a/tests/kraken.nf.test.snap +++ b/tests/kraken.nf.test.snap @@ -1,4 +1,14 @@ { + "rnaseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:38:36.921696486" + }, "kraken2": { "content": [ 11, @@ -77,8 +87,6 @@ "220422_M11111_0222_000000000-K9H97/L001/Stats/DemuxSummaryF1L1.txt", "220422_M11111_0222_000000000-K9H97/L001/Stats/FastqSummaryF1L1.txt", "220422_M11111_0222_000000000-K9H97/L001/Stats/Stats.json", - "fastq", - "fastq/Sample1_S1_L001.samplesheet.csv", "multiqc", "multiqc/multiqc_data", "multiqc/multiqc_data/bcl2fastq-lane-stats-table.txt", @@ -259,6 +267,26 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-17T23:39:05.363547947" + "timestamp": "2024-10-30T15:38:26.292866996" + }, + "atacseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:38:31.625158785" + }, + "taxprofiler_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:38:42.216897057" } } \ No newline at end of file diff --git a/tests/lib/UTILS.groovy b/tests/lib/UTILS.groovy new file mode 100644 index 00000000..2e31d28e --- /dev/null +++ b/tests/lib/UTILS.groovy @@ -0,0 +1,54 @@ +// Function to verify paths in downstream samplesheets + +import java.nio.file.* + + +class UTILS{ + public static boolean validateFastqPaths(Object csvFilePath) { + String path = csvFilePath.toString() // Convert GString or any other type to String + def csvFile = new File(path) + + if (!csvFile.exists()) { + throw new FileNotFoundException("CSV file not found at: $path") + } + + // Define allowed column names + def allowedColumns = ["sample", "fastq_1", "fastq_2", "strandedness", "replicate","fasta"] + + csvFile.withReader { reader -> + // Read the header and trim quotes + def header = reader.readLine().split(",").collect { it.replaceAll('"', '').trim() } + def fastq1Index = header.indexOf("fastq_1") + def fastq2Index = header.indexOf("fastq_2") + + // Check for the presence of 'fastq_1' column + if (fastq1Index == -1) { + throw new IllegalArgumentException("CSV file '$csvFile.name' does not contain a 'fastq_1' column.") + } + + // Check for valid column names + header.each { column -> + if (!allowedColumns.contains(column)) { + throw new IllegalArgumentException("Invalid column name: '$column' in downstream samplesheet file '$csvFile.name'. Allowed columns are: ${allowedColumns.join(', ')}.") + } + } + + reader.eachLine { line -> + def columns = line.split(",").collect { it.replaceAll('"', '').trim() } + def fastq1Path = columns[fastq1Index] + def fastq2Path = fastq2Index != -1 ? columns[fastq2Index] : null // Use null if fastq_2 is not present + + // Check if fastq_1 path is valid + if (!Files.exists(Paths.get(fastq1Path))) { + throw new FileNotFoundException("Incorrect R1 fastq file path: '$fastq1Path' in downstream samplesheet file '$csvFile.name'") // Raise error for fastq_1 + } + + // Check if fastq_2 path is valid if it exists + if (fastq2Path && !Files.exists(Paths.get(fastq2Path))) { + throw new FileNotFoundException("Incorrect R2 fastq file path: '$fastq2Path' in downstream samplesheet file '$csvFile.name'") // Raise error for fastq_2 + } + } + } + return true // All paths are valid if we reach this point + } +} diff --git a/tests/mkfastq.nf.test b/tests/mkfastq.nf.test index a9378098..9e94f851 100644 --- a/tests/mkfastq.nf.test +++ b/tests/mkfastq.nf.test @@ -30,7 +30,10 @@ nextflow_pipeline { stable_name, // All files with stable contents stable_path - ).match() } + ).match() }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/atacseq_samplesheet.csv")).match("atacseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/rnaseq_samplesheet.csv")).match("rnaseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/taxprofiler_samplesheet.csv")).match("taxprofiler_samplesheet") } ) } } diff --git a/tests/mkfastq.nf.test.snap b/tests/mkfastq.nf.test.snap index 155a792f..0314b3dc 100644 --- a/tests/mkfastq.nf.test.snap +++ b/tests/mkfastq.nf.test.snap @@ -1,7 +1,7 @@ { "MKFASTQ": { "content": [ - 14, + 11, { "CELLRANGER_MKFASTQ": { "cellranger": "8.0.0" @@ -83,9 +83,6 @@ "cellranger-tiny-bcl-simple/L001/undetermined/Undetermined_S0_L001_I1_001.fastq.gz", "cellranger-tiny-bcl-simple/L001/undetermined/Undetermined_S0_L001_R1_001.fastq.gz", "cellranger-tiny-bcl-simple/L001/undetermined/Undetermined_S0_L001_R2_001.fastq.gz", - "fastq", - "fastq/test_sample_S1_L001.samplesheet.csv", - "fastq/test_sample_S1_L001_I1_001.samplesheet.csv", "multiqc", "multiqc/multiqc_data", "multiqc/multiqc_data/fastp-seq-content-gc-plot_Read_1_After_filtering.txt", @@ -204,6 +201,36 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-17T23:40:20.21203835" + "timestamp": "2024-10-30T15:39:40.224337223" + }, + "rnaseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:40:09.552438955" + }, + "atacseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:39:54.928437506" + }, + "taxprofiler_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:40:24.166541035" } } \ No newline at end of file diff --git a/tests/sgdemux.nf.test b/tests/sgdemux.nf.test index 7fa83e77..fdb03a0c 100644 --- a/tests/sgdemux.nf.test +++ b/tests/sgdemux.nf.test @@ -30,7 +30,10 @@ nextflow_pipeline { stable_name, // All files with stable contents stable_path - ).match() } + ).match() }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/atacseq_samplesheet.csv")).match("atacseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/rnaseq_samplesheet.csv")).match("rnaseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/taxprofiler_samplesheet.csv")).match("taxprofiler_samplesheet") } ) } } diff --git a/tests/sgdemux.nf.test.snap b/tests/sgdemux.nf.test.snap index 941e5242..48fe96c9 100644 --- a/tests/sgdemux.nf.test.snap +++ b/tests/sgdemux.nf.test.snap @@ -1,7 +1,17 @@ { + "rnaseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:42:08.871060618" + }, "SGDEMUX": { "content": [ - 178, + 106, { "FALCO": { "falco": "1.2.1" @@ -23,32 +33,6 @@ } }, [ - "fastq", - "fastq/Undetermined_S25_L001.samplesheet.csv", - "fastq/s10_S10_L001.samplesheet.csv", - "fastq/s11_S11_L001.samplesheet.csv", - "fastq/s12_S12_L001.samplesheet.csv", - "fastq/s13_S13_L001.samplesheet.csv", - "fastq/s14_S14_L001.samplesheet.csv", - "fastq/s15_S15_L001.samplesheet.csv", - "fastq/s16_S16_L001.samplesheet.csv", - "fastq/s17_S17_L001.samplesheet.csv", - "fastq/s18_S18_L001.samplesheet.csv", - "fastq/s19_S19_L001.samplesheet.csv", - "fastq/s1_S1_L001.samplesheet.csv", - "fastq/s20_S20_L001.samplesheet.csv", - "fastq/s21_S21_L001.samplesheet.csv", - "fastq/s22_S22_L001.samplesheet.csv", - "fastq/s23_S23_L001.samplesheet.csv", - "fastq/s24_S24_L001.samplesheet.csv", - "fastq/s2_S2_L001.samplesheet.csv", - "fastq/s3_S3_L001.samplesheet.csv", - "fastq/s4_S4_L001.samplesheet.csv", - "fastq/s5_S5_L001.samplesheet.csv", - "fastq/s6_S6_L001.samplesheet.csv", - "fastq/s7_S7_L001.samplesheet.csv", - "fastq/s8_S8_L001.samplesheet.csv", - "fastq/s9_S9_L001.samplesheet.csv", "multiqc", "multiqc/multiqc_data", "multiqc/multiqc_data/fastp-seq-content-gc-plot_Read_1_After_filtering.txt", @@ -632,6 +616,26 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-29T17:49:16.207647882" + "timestamp": "2024-10-30T15:42:08.793174743" + }, + "atacseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:42:08.83444814" + }, + "taxprofiler_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:42:08.908513986" } } \ No newline at end of file diff --git a/tests/skip_tools.nf.test b/tests/skip_tools.nf.test index 938abc67..61cb4f9d 100644 --- a/tests/skip_tools.nf.test +++ b/tests/skip_tools.nf.test @@ -34,7 +34,10 @@ nextflow_pipeline { stable_name, // All files with stable contents stable_path - ).match() } + ).match() }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/atacseq_samplesheet.csv")).match("atacseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/rnaseq_samplesheet.csv")).match("rnaseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/taxprofiler_samplesheet.csv")).match("taxprofiler_samplesheet") } ) } } diff --git a/tests/skip_tools.nf.test.snap b/tests/skip_tools.nf.test.snap index 4a414e55..134ac029 100644 --- a/tests/skip_tools.nf.test.snap +++ b/tests/skip_tools.nf.test.snap @@ -47,8 +47,6 @@ "220422_M11111_0222_000000000-K9H97/L001/Sample1_S1_L001_report.html", "220422_M11111_0222_000000000-K9H97/L001/Sample1_S1_L001_summary.txt", "220422_M11111_0222_000000000-K9H97/L001/Undetermined_S0_L001_R1_001.fastq.gz", - "fastq", - "fastq/Sample1_S1_L001.samplesheet.csv", "multiqc", "multiqc/multiqc_data", "multiqc/multiqc_data/bclconvert-lane-stats-table.txt", @@ -190,7 +188,17 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-18T00:25:42.942384924" + "timestamp": "2024-10-30T16:00:27.087776653" + }, + "rnaseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:59:48.514552807" }, "Skip Trimming": { "content": [ @@ -245,8 +253,6 @@ "220422_M11111_0222_000000000-K9H97/L001/Sample1_S1_L001_report.html", "220422_M11111_0222_000000000-K9H97/L001/Sample1_S1_L001_summary.txt", "220422_M11111_0222_000000000-K9H97/L001/Undetermined_S0_L001_R1_001.fastq.gz", - "fastq", - "fastq/Sample1_S1_L001.samplesheet.csv", "multiqc", "multiqc/multiqc_data", "multiqc/multiqc_data/bclconvert-lane-stats-table.txt", @@ -428,7 +434,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-18T00:24:59.739085162" + "timestamp": "2024-10-30T15:59:43.275844831" }, "Skip MultiQC": { "content": [ @@ -484,8 +490,6 @@ "220422_M11111_0222_000000000-K9H97/L001/Sample1_S1_L001_report.html", "220422_M11111_0222_000000000-K9H97/L001/Sample1_S1_L001_summary.txt", "220422_M11111_0222_000000000-K9H97/L001/Undetermined_S0_L001_R1_001.fastq.gz", - "fastq", - "fastq/Sample1_S1_L001.samplesheet.csv", "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", "samplesheet", @@ -527,7 +531,17 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-18T00:29:21.376431772" + "timestamp": "2024-10-30T16:03:37.651038824" + }, + "atacseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:59:45.903610848" }, "Skip Fastp & Fastqc": { "content": [ @@ -577,8 +591,6 @@ "220422_M11111_0222_000000000-K9H97/L001/Sample1_S1_L001_report.html", "220422_M11111_0222_000000000-K9H97/L001/Sample1_S1_L001_summary.txt", "220422_M11111_0222_000000000-K9H97/L001/Undetermined_S0_L001_R1_001.fastq.gz", - "fastq", - "fastq/Sample1_S1_L001.samplesheet.csv", "multiqc", "multiqc/multiqc_data", "multiqc/multiqc_data/bclconvert-lane-stats-table.txt", @@ -720,7 +732,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-18T00:28:05.245862992" + "timestamp": "2024-10-30T16:02:29.281437154" }, "Skip Fastqc": { "content": [ @@ -776,8 +788,6 @@ "220422_M11111_0222_000000000-K9H97/L001/Sample1_S1_L001_report.html", "220422_M11111_0222_000000000-K9H97/L001/Sample1_S1_L001_summary.txt", "220422_M11111_0222_000000000-K9H97/L001/Undetermined_S0_L001_R1_001.fastq.gz", - "fastq", - "fastq/Sample1_S1_L001.samplesheet.csv", "multiqc", "multiqc/multiqc_data", "multiqc/multiqc_data/bclconvert-lane-stats-table.txt", @@ -960,6 +970,16 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-18T00:27:11.29098668" + "timestamp": "2024-10-30T16:01:45.089730924" + }, + "taxprofiler_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:59:51.098330417" } } \ No newline at end of file diff --git a/tests/test_pe.nf.test b/tests/test_pe.nf.test index 9382ea56..48c9d4d3 100644 --- a/tests/test_pe.nf.test +++ b/tests/test_pe.nf.test @@ -30,7 +30,10 @@ nextflow_pipeline { stable_name, // All files with stable contents stable_path - ).match() } + ).match() }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/atacseq_samplesheet.csv")).match("atacseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/rnaseq_samplesheet.csv")).match("rnaseq_samplesheet") }, + { assert snapshot(UTILS.validateFastqPaths("$outputDir/samplesheet/taxprofiler_samplesheet.csv")).match("taxprofiler_samplesheet") } ) } } diff --git a/tests/test_pe.nf.test.snap b/tests/test_pe.nf.test.snap index eaebb98b..f72e90a4 100644 --- a/tests/test_pe.nf.test.snap +++ b/tests/test_pe.nf.test.snap @@ -1,4 +1,24 @@ { + "rnaseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:49:50.982685279" + }, + "atacseq_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:49:40.878739318" + }, "Bcl2Fastq_pe": { "content": [ 9, @@ -71,8 +91,6 @@ "PE_Sample/L001/Stats/DemuxSummaryF1L1.txt", "PE_Sample/L001/Stats/FastqSummaryF1L1.txt", "PE_Sample/L001/Stats/Stats.json", - "fastq", - "fastq/Sample1_S1_L001.samplesheet.csv", "multiqc", "multiqc/multiqc_data", "multiqc/multiqc_data/bcl2fastq-lane-stats-table.txt", @@ -324,6 +342,16 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-18T00:32:00.49132579" + "timestamp": "2024-10-30T15:49:30.696307692" + }, + "taxprofiler_samplesheet": { + "content": [ + true + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-30T15:50:01.08084426" } } \ No newline at end of file diff --git a/workflows/demultiplex.nf b/workflows/demultiplex.nf index 3f4867da..0631ba67 100644 --- a/workflows/demultiplex.nf +++ b/workflows/demultiplex.nf @@ -282,32 +282,13 @@ workflow DEMULTIPLEX { // Module: FASTQ to samplesheet 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 } + FASTQ_TO_SAMPLESHEET_RNASEQ(ch_meta_fastq_rnaseq.collect(), "rnaseq", strandedness) 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_ATACSEQ(ch_meta_fastq_atacseq.collect(), "atacseq", strandedness) 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_taxprofiler_samplesheet.csv', newLine: true, keepHeader: true, sort: { it.baseName }) - .map { it.text.tokenize('\n').join('\n') } - .collectFile(name:'taxprofiler_samplesheet.csv', storeDir: "${params.outdir}/samplesheet") - .set { ch_samplesheet } - + FASTQ_TO_SAMPLESHEET_TAXPROFILER(ch_meta_fastq_taxprofiler.collect(), "taxprofiler", strandedness) // // Collate and save software versions // From 1df1a08efe8003a04c08b2393412e783ab062dd2 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Thu, 31 Oct 2024 10:04:51 +0100 Subject: [PATCH 6/6] Update workflows/demultiplex.nf Co-authored-by: Gregor Sturm --- workflows/demultiplex.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/demultiplex.nf b/workflows/demultiplex.nf index 0631ba67..cc22534d 100644 --- a/workflows/demultiplex.nf +++ b/workflows/demultiplex.nf @@ -270,7 +270,7 @@ workflow DEMULTIPLEX { // Prepare metamap with fastq info ch_meta_fastq = ch_raw_fastq.map { meta, fastq_files -> // Determine the publish directory based on the lane information - meta.publish_dir = publish_dir = meta.lane ? "${params.outdir}/${meta.fcid}/L00${meta.lane}" : "${params.outdir}/${meta.fcid}" //Must be fcid because id gets modified + meta.publish_dir = meta.lane ? "${params.outdir}/${meta.fcid}/L00${meta.lane}" : "${params.outdir}/${meta.fcid}" //Must be fcid because id gets modified meta.fastq_1 = "${meta.publish_dir}/${fastq_files[0].getName()}" // Add full path for fastq_2 to the metadata if the sample is not single-end