From 3cf74222a252a16a385f23d970e67cb74a31dc16 Mon Sep 17 00:00:00 2001 From: nservant <nicolas.servant@curie.fr> Date: Mon, 30 Nov 2020 18:30:02 +0100 Subject: [PATCH] [MODIF] update test profile --- main.nf | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/main.nf b/main.nf index d5c43a2..ef10335 100644 --- a/main.nf +++ b/main.nf @@ -153,11 +153,18 @@ if (params.input_paths){ raw_reads = Channel.create() raw_reads_2 = Channel.create() - Channel - .from( params.input_paths ) - .map { row -> [ row[0], [file(row[1][0]), file(row[1][1])]] } - .separate( raw_reads, raw_reads_2 ) { a -> [tuple(a[0], a[1][0]), tuple(a[0], a[1][1])] } - + if ( params.split_fastq ){ + Channel + .from( params.input_paths ) + .map { row -> [ row[0], [file(row[1][0]), file(row[1][1])]] } + .splitFastq( by: params.fastq_chunks_size, pe:true, file: true, compress:true) + .separate( raw_reads, raw_reads_2 ) { a -> [tuple(a[0], a[1]), tuple(a[0], a[1])] } + }else{ + Channel + .from( params.input_paths ) + .map { row -> [ row[0], [file(row[1][0]), file(row[1][1])]] } + .separate( raw_reads, raw_reads_2 ) { a -> [tuple(a[0] + "_R1", a[1][0]), tuple(a[0] + "_R2", a[1][1])] } + } }else{ raw_reads = Channel.create() raw_reads_2 = Channel.create() -- GitLab