Skip to content

Instantly share code, notes, and snippets.

@pditommaso
Created March 23, 2018 14:07
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 pditommaso/ff13c333f461ca0d9b839d9e3416b376 to your computer and use it in GitHub Desktop.
Save pditommaso/ff13c333f461ca0d9b839d9e3416b376 to your computer and use it in GitHub Desktop.
Nextflow optional input
params.filter_seqs = 'NO_FILTER'
filter_file = file(params.filter_seqs)
process foo {
input:
file filter_file
script:
def filter_argument = filter_file.name != 'NO_FILTER' ? "--filter ${params.filter_seqs}" : ''
"""
echo $filter_argument
"""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment