From aa4efb448831ac8265654f975e7af6f66e99932c Mon Sep 17 00:00:00 2001 From: Kevin Trogant Date: Sun, 3 May 2026 18:35:17 +0200 Subject: [PATCH] feat: simple test workflow --- test/main.nf | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 test/main.nf diff --git a/test/main.nf b/test/main.nf new file mode 100644 index 0000000..32bf937 --- /dev/null +++ b/test/main.nf @@ -0,0 +1,52 @@ +params.str = "Hello, world!" + +process split { + publishDir "results/lower" + + input: + val x + + output: + path 'chunk_*' + + script: + """ + printf '${x}' | split -b 6 - chunk_ + """ +} + +process to_upper { + tag "$y" + + input: + path y + + output: + path 'upper_*' + + script: + """ + cat $y | tr '[a-z]' '[A-Z]' > upper_${y} + """ +} + +workflow { + main: + ch_str = channel.of(params.str) + ch_chunks = split(ch_str) + ch_upper = to_upper(ch_chunks.flatten()) + + publish: + lower = ch_chunks.flatten() + upper = ch_upper +} + +output { + lower { + path 'lower' + } + + upper { + path 'upper' + } +}