These are chat archives for nextflow-io/nextflow

5th
Jul 2016
Rickard Hammarén
@Hammarn
Jul 05 2016 12:48
Hi! I have a question about deciding when to execute processes. I have a version of our Pipeline with some Debugging code in it here: https://github.com/Hammarn/NGI-RNAseq/blob/master/main.nf
What I'm trying to achieve is to have the Sample correlation process be skipped if there are less then 3 successful samples in the run or if the user specifies it on the command line. The problem I'm having with my current "solution" is that the check
if (!params.sampleLevel) { Seems to be checked as the pipeline starts and not at the end (I.e. after the decision has been made). What's the proper way of doing this? is it possible to have check logic in the process?
Paolo Di Tommaso
@pditommaso
Jul 05 2016 13:29
You cannot do in that way because processed and operators are evaluated on an asynchronous manner
You may try having the bam_count value as an input in the optional process using a when clause
Rickard Hammarén
@Hammarn
Jul 05 2016 14:44
Thanks! makes sense. That's what I had in mind initially =)
Paolo Di Tommaso
@pditommaso
Jul 05 2016 14:45
:+1: