add nextflow d30e48d
This commit is contained in:
36
nextflow/tests/nullable-path.nf
Normal file
36
nextflow/tests/nullable-path.nf
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/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()
|
||||
}
|
||||
Reference in New Issue
Block a user