Closed tdelhomme closed 6 years ago
I got a dirty if statement on my pipeline here, that creates a variable holding the -L
argument if needed. I do not know with Platypus, but with GATK it is robust.
@valleem actually I also use this "dirty" solution in some pipelines but here the case is slightly different, the variable is not a string but a file that I would like to have in input such as:
input:
file bed
which is declared like:
bed = file(params.bed)
but this input should be optional and this is my problem...
@tdelhomme Like this : https://gist.github.com/pditommaso/ff13c333f461ca0d9b839d9e3416b376 ?
Yes it seems! I am ashamed to do not have googled correctly... thanks @valleem!
Actually the trick is that nextflow doesn't complain when you declare as an input a file that doesn't exist.
:+1:
At the moment,
--region
parameters is passed to platypus as a string containing the complete path of the bed file (if file is provided and not a true region). see here. A correct code would take the file in input and pass this to the command line. But how do we manage when:--region
is not a file but a region (chr:start-end)--region
is provided (conditional input?)