From 50b1ba596f8b724506a78277622b7b4b5fe7af06 Mon Sep 17 00:00:00 2001 From: glichtenstein Date: Mon, 22 Jan 2024 15:30:21 -0500 Subject: [PATCH] rm duplication --- subworkflows/nf-core/bcl_demultiplex/main.nf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subworkflows/nf-core/bcl_demultiplex/main.nf b/subworkflows/nf-core/bcl_demultiplex/main.nf index 7349ff33..bd7d8300 100644 --- a/subworkflows/nf-core/bcl_demultiplex/main.nf +++ b/subworkflows/nf-core/bcl_demultiplex/main.nf @@ -59,7 +59,7 @@ workflow BCL_DEMULTIPLEX { } // Generate meta for each fastq - ch_fastq_with_meta = generate_fastq_meta(ch_fastq) + ch_fastq_with_meta = generate_fastq_meta(ch_fastq, logFile) emit: fastq = ch_fastq_with_meta @@ -76,7 +76,7 @@ workflow BCL_DEMULTIPLEX { def logFile = new File('/cromwell_wd/invalid_fastqs.log') // This method ensures the file is created if it doesn't exist and appends the text -def appendToLogFile(String text) { +def appendToLogFile(String text, File logFile) { if (!logFile.exists()) { logFile.createNewFile() } @@ -84,7 +84,7 @@ def appendToLogFile(String text) { } // Add meta values to fastq channel and skip invalid FASTQ files -def generate_fastq_meta(ch_reads) { +def generate_fastq_meta(ch_reads, logFile) { ch_reads.transpose().map { fc_meta, fastq -> // Check if the FASTQ file is empty or has invalid content def isValid = fastq.withInputStream { is ->