feat: simpler test workflow with configuration

This commit is contained in:
2026-05-18 21:06:30 +02:00
parent ad0d91aee0
commit 0ec084b720
8 changed files with 87 additions and 54 deletions

View File

@@ -1,52 +1,18 @@
params.str = "Hello, world!"
nextflow.enable.dsl = 2
process split {
publishDir "results/lower"
input:
val x
process hello {
container 'ubuntu:22.04'
output:
path 'chunk_*'
path 'hello.txt'
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}
echo "Hello, from kubernetes" > hello.txt
hostname >> hello.txt
"""
}
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'
}
hello()
}