Skip to content
Discussion options

You must be logged in to vote

You could include the process from a module and overwrite the parameters.

FIles:

.
├── main.nf
└── module.nf

main.nf

params.publishDir="asdf"
include { p } from './module'
include { p as p2 } from './module' params(publishDir: "qwer")

def getPath(){
    "foobar"
}

include { p as p3 } from './module' params(publishDir: getPath())

workflow{
p()
println p.dump()
// > ... processName=p ... publishDir:[[path:asdf]]]...

p2()
println p2.dump()
// > ... processName=p2 ... publishDir:[[path:qwer]]]...

p3()
println p3.dump()
// > ... processName=p3 ... publishDir:[[path:foobar]]]...
}

module.nf

process p{
publishDir params.publishDir
"""
"""
}

Docs

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@hkaspersen
Comment options

@Kibubu
Comment options

@GordianDziwis
Comment options

Answer selected by hkaspersen
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants