From 3eb07cdee868184ddcbdf9184d630954f0f4c4e3 Mon Sep 17 00:00:00 2001 From: Dan Fornika Date: Wed, 9 Nov 2022 15:29:14 -0800 Subject: [PATCH] Split long read fastqs on underscores (#35) --- main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.nf b/main.nf index 6200d6f..a5771e8 100644 --- a/main.nf +++ b/main.nf @@ -49,7 +49,7 @@ workflow { if (params.hybrid) { ch_assembly_mode = Channel.of("hybrid") ch_short_reads = Channel.fromFilePairs( params.fastq_search_path, flat: true ).map{ it -> [it[0].split('_')[0], [it[1], it[2]]] }.unique{ it -> it[0] } - ch_long_reads = Channel.fromPath( params.long_reads_search_path ).map{ it -> [it.baseName.split("\\.")[0], [it]] } + ch_long_reads = Channel.fromPath( params.long_reads_search_path ).map{ it -> [it.baseName.split("_")[0], [it]] } ch_fastq = ch_short_reads.join(ch_long_reads).map{ it -> [it[0], it[1] + it[2]] } } else if (params.long_only) { ch_assembly_mode = Channel.of("long")