Fork
A choice between running particular parts of an analysis can be offered by including one or more Fork () elements in a workflow.
Including Fork elements in workflows can also help decrease the number of workflows that need to be maintained, as multiple analysis paths can be included in a single workflow, with only one or some of those paths being taken when the workflow is run.
For example, when the workflow shown in figure 14.62 is launched, a choice between "Quality" and "Quality and Vector" is offered in the launch wizard. Choosing "Quality" means the data will flow down the path containing the "Trim on Quality" element, while choosing "Quality and Vector" means the data will flow down the path containing the "Trim Vector and on Quality" element.
Figure 14.62: A simple workflow with a Fork element. When launched, a choice is offered in the launch wizard for which path the the analysis should follow.
Configuring Fork elements
The configuration of Fork elements determines what is shown in the "Specify workflow paths" launch wizard step (figure 14.63 and figure 14.64). Specifically:
- The name of the Fork element The element name is used in the launch wizard to describe the choice being made.
- The configurable fields in the Fork element The configurable fields are used to define the available options and, if desired, specify a default:
- Path names The list of choices of downstream paths from this Fork element, entered as a comma delimited, text list. These are presented in a drop-down list in the launch wizard. An output channel is added to the Fork element for each path name.
- Selected path One of the configured path names, which then will be used as the default. If this field is left blank, the first of the paths in the "Path names" list will be pre-selected in the wizard when launching the workflow from a CLC Workbench.
Renaming and configuring workflow elements is described in Basic configuration of workflow elements.
Figure 14.63: A Fork element renamed as "Trim for" is open for configuration. The wizard step seen when launching a workflow with this Fork element is shown in figure 14.64.
Figure 14.64: This workflow has a single Fork element, renamed as "Trim for". The path names, "Quality" and "Quality and Vector", (see figure14.63) are listed in the "Specify workflow path" launch wizard step (top right)
Flexibility potential using Fork elements
Fork elements provide a great deal of flexibility in the types of choices that can be offered when launching workflows. Examples include:
- Providing the choice of following one of several possible analysis paths (figure 14.64).
- Providing the choice of following one of several possible analysis paths or following multiple analysis paths (figure 14.65).
- Providing the choice of whether or not to run a particular part of the analysis (figure 14.66).
When a workflow contains multiple Fork elements, all the corresponding choices are presented in a single "Specify workflow paths" launch wizard step (figure 14.66).
Figure 14.65: When launching this workflow, the choice can be made to trim sequences based on quality, trim for vector sequence, or trim for both.
Figure 14.66: There are two Fork elements in this workflow, and thus two choices will need to be made when launching it. Both are presented in the "Specify workflow path" launch wizard step. The Yes/No choice for the "Generate sequence statistics" option determines whether or not the Create Sequence Statistics analysis will be run.