Splitting paths in a workflow

Different samples can be processed differently, either by following a different path, or playing a particular role in a downstream element of the same workflow. This can be achieved by configuring the Collect and Distribute element with multiple outputs.

To configure a Collect and Distribute element, double-click on it in the workflow, and enter the names of the outputs, separated by commas (figure 11.50). Inputs to the Collect and Distribute element are split into as many groups as there are output channels, and each of those groups can then be sent to different input channels of downstream elements. These can be different input channels of the same workflow element, or to different workflow elements.

Important note: the Collect and Distribute element always ends the ongoing iteration. To continue an iteration on a path after the data have been split, place a new Iterate element directly after the Collect and Distribute element.

In figure 11.50, a configured Collect and Distribute element splits the samples into cases and controls. Subsequently, each case sample is individually analyzed against all of the control samples. Note that one path from the Collect and Distribute element (the cases) continues the iteration, whereas the other path (the controls) does not.

Image configure_collect_and_group
Figure 11.50: Double-click the Collect and Distribute element to configure its outputs.

For this workflow, the groupings for the Collect and Distribute element must be specified in addition to specifying the iteration units. The groupings are coupled to the metadata table chosen for the corresponding Iterate element when defining the batch units. It is possible to group using a different column of the metadata table than that specified for the iteration units, as long as the groupings are compatible. For example, when running the workflow in figure 11.51, it is possible to select a metadata column called "Type" to split the samples into cases and controls, even though the iteration was over the "ID" column in the same metadata table (figure 11.52).

Image cnv_case_control
Figure 11.51: In this workflow, each case sample is analyzed against all of the control samples.

Image cnv_case_control_wizard
Figure 11.52: It is possible to select the metadata column "Type" to split the samples into cases and controls, even though the iteration was over the "ID" column in the same metadata table.

Control flow elements are described in more detail in Workflow control flow elements.