feat: simple test workflow

This commit is contained in:
2026-05-03 18:35:17 +02:00
parent 6e2e42cbbe
commit aa4efb4488

52
test/main.nf Normal file
View File

@@ -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'
}
}