Skip to content
Discussion options

You must be logged in to vote

If you want to provide several values to a parameter in Nextflow, you can either wrap them with quotes or concatenate them with a comma. See the examples below:

example.nf

println params.example

You can run this Nextflow script in the two ways below to get all values:

nextflow run example.nf --example test1,test2,test3
# OR
nextflow run example.nf --example "test1 test2 test3"

Output:

➜  ~ nextflow run example.nf --example "test test2 test3"
N E X T F L O W  ~  version 22.10.4
Launching `ex.nf` [scruffy_payne] DSL2 - revision: a982a55670
test test2 test3

Or

➜  ~ nextflow run example.nf --example test,test2,test3
N E X T F L O W  ~  version 22.10.4
Launching `ex.nf` [tender_heyrovsky] D…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@pditommaso
Comment options

@mribeirodantas
Comment options

@pditommaso
Comment options

@mribeirodantas
Comment options

Answer selected by yamaura
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
3 participants