Skip to content

Instantly share code, notes, and snippets.

@rob-p
Created June 24, 2021 00:38
Show Gist options
  • Save rob-p/11e1d0d9b76f28816a9fc89224835d68 to your computer and use it in GitHub Desktop.
Save rob-p/11e1d0d9b76f28816a9fc89224835d68 to your computer and use it in GitHub Desktop.
nextflow MWE 2177
nextflow.enable.dsl=2
process foo {
publishDir "output"
input:
val(prefix)
output:
path "${prefix}_foo"
path "${prefix}_foo/bar.txt"
stub:
"""
mkdir -p ${prefix}_foo
echo "contents" >> ${prefix}_foo/bar.txt
"""
}
workflow foowf {
take:
prefix
main:
foo(prefix)
}
workflow {
ip = Channel.fromList([1,2,3,4,5,6,7,8,9,10])
foowf(ip)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment