From 8f97ac60ace22f3c7bf60dc58f264747ef7dba45 Mon Sep 17 00:00:00 2001 From: Ben Sherman Date: Wed, 4 Dec 2024 18:53:35 -0600 Subject: [PATCH] minor edits Signed-off-by: Ben Sherman --- workflows/sra/main.nf | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/workflows/sra/main.nf b/workflows/sra/main.nf index 03aa2743..f0046c5a 100644 --- a/workflows/sra/main.nf +++ b/workflows/sra/main.nf @@ -62,7 +62,6 @@ workflow SRA { .unique() .set { ch_sra_metadata } - ch_samples = Channel.empty() if (!skip_fastq_download) { ch_sra_metadata @@ -124,17 +123,19 @@ workflow SRA { .map { meta, fastq, md5 -> def reads = fastq instanceof List ? fastq.flatten() : [ fastq ] - def meta_clone = meta.clone() - - meta_clone.fastq_1 = reads[0] - meta_clone.fastq_2 = reads[1] && !meta.single_end ? reads[1] : null - - meta_clone.md5_1 = md5[0] - meta_clone.md5_2 = md5[1] && !meta.single_end ? md5[1] : null - - return meta_clone + def meta_clone = meta + [ + fastq_1: reads[0], + fastq_2: reads[1] && !meta.single_end ? reads[1] : null, + md5_1: md5[0], + md5_2: md5[1] && !meta.single_end ? md5[1] : null, + ] + + return [ meta_clone, reads, md5 ] } } + else { + ch_samples = Channel.empty() + } emit: samples = ch_samples