Skip to content

Instantly share code, notes, and snippets.

@robsyme
Created March 28, 2024 22:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robsyme/c8db2f63ef4c045e95d032e36f95a0b0 to your computer and use it in GitHub Desktop.
Save robsyme/c8db2f63ef4c045e95d032e36f95a0b0 to your computer and use it in GitHub Desktop.
Publishing oddities
#!/usr/bin/env nextflow
params.outdir = 'results'
params.all = false
workflow {
First()
First.out.value | Second
Second.out.value | Third
}
process First {
publishDir params.outdir
container 'quay.io/nextflow/bash'
output:
val(1), emit: value
path('out'), emit: files
script:
"""
mkdir -p out/first/{1,2,3}/{1,2,3}
echo foo | tee out/first/{1,2,3}/{1,2,3}/{1,2,3}.txt
"""
}
process Second {
publishDir params.outdir
container 'quay.io/nextflow/bash'
input:
val(x)
output:
val(x), emit: value
path('out'), emit: files
script:
"""
mkdir -p out/second/{1,2,3}/{1,2,3}
echo foo | tee out/second/{1,2,3}/{1,2,3}/{1,2,3}.txt
"""
}
process Third {
publishDir params.outdir
container 'quay.io/nextflow/bash'
input:
val(x)
output:
path('out')
script:
"""
mkdir -p out/third/{1,2,3}/{1,2,3}
echo foo | tee out/third/{1,2,3}/{1,2,3}/{1,2,3}.txt
"""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment