From 08672c8413b45612b4823aac89412fe037d2b1f3 Mon Sep 17 00:00:00 2001 From: Emilio Palumbo Date: Mon, 20 Feb 2017 11:44:42 +0100 Subject: [PATCH] Fix issue with item order in mix --- chipseq-pipeline.nf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chipseq-pipeline.nf b/chipseq-pipeline.nf index b0f8469..66eb888 100755 --- a/chipseq-pipeline.nf +++ b/chipseq-pipeline.nf @@ -267,8 +267,10 @@ originalBams.cross(bamsReads) it.value[0] break case 2: - def fragLen = it.value[0][1].text.split()[2].split(',')[0] as Integer - it.value[1][0..-4] + [fragLen] + it.value[1][-2..-1] + def bams = it.value.find { it[1] =~ /bam/ } + def paramFile = it.value.find { it[1] =~ /params/ }[1] + def fragLen = paramFile.text.split()[2].split(',')[0] as Integer + bams[0..-4] + [fragLen] + bams[-2..-1] break } }.tap{ allBams }