add nextflow d30e48d
This commit is contained in:
53
nextflow/tests/topic-channel-typed.nf
Normal file
53
nextflow/tests/topic-channel-typed.nf
Normal file
@@ -0,0 +1,53 @@
|
||||
|
||||
nextflow.enable.types = true
|
||||
|
||||
process foo {
|
||||
input:
|
||||
index: Integer
|
||||
|
||||
topic:
|
||||
record(name: 'foo', version: stdout()) >> 'versions'
|
||||
|
||||
script:
|
||||
"""
|
||||
printf '0.1.0'
|
||||
"""
|
||||
}
|
||||
|
||||
process bar {
|
||||
input:
|
||||
index: Integer
|
||||
|
||||
topic:
|
||||
record(name: 'bar', version: stdout()) >> 'versions'
|
||||
|
||||
script:
|
||||
"""
|
||||
printf '0.9.0'
|
||||
"""
|
||||
}
|
||||
|
||||
workflow {
|
||||
main:
|
||||
ch_inputs = channel.of( 1..3 )
|
||||
foo( ch_inputs )
|
||||
bar( ch_inputs )
|
||||
|
||||
ch_versions = channel.topic('versions')
|
||||
.unique()
|
||||
.collect()
|
||||
.flatMap { rows ->
|
||||
rows.toSorted { r -> r.name }
|
||||
}
|
||||
|
||||
publish:
|
||||
versions = ch_versions
|
||||
}
|
||||
|
||||
output {
|
||||
versions {
|
||||
index {
|
||||
path 'versions.csv'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user