Compare a workflow.out with a value #2937
-
Hi everyone, First, thank a lot for the development of Nextflow, this is a great software. I want to test if an output from a workflow have an excepted value to run another conditionnal workflow. main.nf
check.nf
../modules/local/labfile_check'
The process is working but I don't manage to be able to compare the output value emitted by a workflow. Any advices ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is a common stumbling block when learning to code in a "reactive" or "functional" way. Basically, you should never try to "check" the value of a channel, instead you should use channel operators to process channel outputs as they are emitted. In this case, I would use the branch operator to pipe outputs from |
Beta Was this translation helpful? Give feedback.
This is a common stumbling block when learning to code in a "reactive" or "functional" way. Basically, you should never try to "check" the value of a channel, instead you should use channel operators to process channel outputs as they are emitted.
In this case, I would use the branch operator to pipe outputs from
CHECKLABFILE
into a "valid" channel or "faulty" channel depending on the output value. Then you can pipe the valid channel into the next workflow and the faulty channel into the void (or whatever).