IARCbioinfo / platypus-nf

Platypus germline variant calling with nextflow
GNU General Public License v3.0
0 stars 0 forks source link

--region parameter must be complete path #15

Closed tdelhomme closed 6 years ago

tdelhomme commented 6 years ago

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:

valleem commented 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.

tdelhomme commented 6 years ago

@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...

valleem commented 6 years ago

@tdelhomme Like this : https://gist.github.com/pditommaso/ff13c333f461ca0d9b839d9e3416b376 ?

tdelhomme commented 6 years ago

Yes it seems! I am ashamed to do not have googled correctly... thanks @valleem!

mfoll commented 6 years ago

Actually the trick is that nextflow doesn't complain when you declare as an input a file that doesn't exist.

tdelhomme commented 6 years ago

:+1:

tdelhomme commented 6 years ago

I think a better way is to use the file in the argument (in the gist it is the path that is used, so not very different than the proposition from @valleem), see my commit.