37 lines
451 B
Plaintext
37 lines
451 B
Plaintext
#!/usr/bin/env nextflow
|
|
|
|
nextflow.enable.types = true
|
|
|
|
process foo {
|
|
input:
|
|
id: String
|
|
|
|
output:
|
|
file('output.txt', optional: true)
|
|
|
|
script:
|
|
"""
|
|
echo ${id}
|
|
"""
|
|
}
|
|
|
|
process bar {
|
|
input:
|
|
input: Path?
|
|
|
|
stage:
|
|
stageAs input, 'input.txt'
|
|
|
|
output:
|
|
stdout()
|
|
|
|
script:
|
|
'''
|
|
[[ -f input.txt ]] && cat input.txt || echo 'empty input'
|
|
'''
|
|
}
|
|
|
|
workflow {
|
|
bar(foo(channel.of('foo'))).view()
|
|
}
|