[RFC] No more need for `first` operation to access singleton channels

20 views
Skip to first unread message

Paolo Di Tommaso

unread,
Mar 8, 2017, 9:33:22 AM3/8/17
to Nextflow
TLDR. 

I've just uploaded a new snapshot including an useful enhancement that simplifies the use of outputs of singleton processes i.e. output produced by a process that is expected to be executed only once. 

In a common usage scenario it is necessary to apply the `first` operator to get such value and to avoid the unexpected termination of a downstream process. See here for an example

This is a behaviour quite tricky to explain and inelegant to implement. 

From the next release a process that is expected to be executed only once will implicitly create outputs as dataflow values (singleton channels ie. that can be multiple times returning always the same value). In this way those outputs will be accessible by one or more downstream processes w/o the need to duplicate them or use the `first` operator. 

Read more at this link.   



You can try it by downloading the latest snapshot using the following command: 

NXF_VER=0.24.0-SNAPSHOT CAPSULE_RESET=1 nextflow info

Make sure it prints: 

Version: 0.24.0-SNAPSHOT build 4193
Modified: 08-03-2017 13:26 UTC (14:26 CEST)

Then you case use as shown below: 

NXF_VER=0.24.0-SNAPSHOT nextflow run .. etc


Feedback is welcome (here). 


Cheers,
Paolo
Reply all
Reply to author
Forward
0 new messages