From 1656b7362220229dbad5f70e5048caa743e7a0b3 Mon Sep 17 00:00:00 2001 From: Christian Diener Date: Fri, 17 May 2024 09:07:06 +0200 Subject: [PATCH] simplify script syntax --- main.nf | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/main.nf b/main.nf index b88b715..5610c0b 100644 --- a/main.nf +++ b/main.nf @@ -8,10 +8,10 @@ process countThings { time "1m" input: - path(txt_file) + path txt_file output: - path("*.counts") + path "*.counts" """ wc -${params.what[0]} ${txt_file} > ${txt_file}.counts @@ -25,10 +25,10 @@ process average { publishDir "${launchDir}" input: - path(counts) + path counts output: - path("average.txt") + path "average.txt" """ #!/usr/bin/env python3 @@ -47,9 +47,7 @@ process average { } workflow { - Channel - .fromPath("${launchDir}/shakespeare/*.txt") - .set{texts} + texts = Channel.fromPath("${launchDir}/shakespeare/*.txt") countThings(texts) average(countThings.out.collect())