Input and output
Besides connecting the elements together, you have to decide what the input and the output of the workflow should be. We will first look at specification of the output, which is done by right-clicking the output box of any tool and selecting Use as Workflow Output as shown in figure 8.12.
Figure 8.12: Selecting a workflow output.
You can mark several outputs this way throughout the workflow. Note that no intermediate results are saved unless they are marked as workflow output8.1.
By double-clicking the output box, you can specify how the result should be named as shown in figure 8.13.
Figure 8.13: Specifying naming of a workflow output.
In this dialog you can enter a name for the output result, and you can make use of two dynamic placeholders for creating this name (press Shift + F1 to get assistance):
- {1} Represents the default name of the result. When running the tool outside of a workflow, this is the name given to the result.
- {2} Represents the name of the workflow input (not the input to this particular tool but the input to the entire workflow).
An example of a meaningful name to a variant track could be {2} variant track
as shown in figure 8.14. If your workflow input is named Sample 1
, the result would be Sample 1 variant track
.
Figure 8.14: Providing a custom name for the result.
In addition to output, you also have to specify where the data should go into the workflow by adding an element called Workflow Input. This can be done by:
- Right-clicking the input box of the first tool and choosing Connect to Workflow Input. By dragging from the workflow input box to other input boxes several tools can use the input data directly.
- Pressing the button labeled Add Element (or right-click somewhere in the workflow background area and select Add Element from the menu that appears). The input box must then be connected to the relevant tool(s) in the workflow by dragging from the Workflow Input box to the "input description" part of the relevant tool(s) in the workflow.
At this point you have only prepared the workflow for receiving input data, but not specified which data to use as input. To be able to do this you must first save the workflow. When this has been done, the button labeled Run is enabled which allows you to start executing the workflow. When you click on the button labeled Run you will be asked to provide the input data.
Multiple input files can be used when:
- Data is generated within the Workflow
- Data is held within the Workbench
- Data is a combination of the two situations above
It can be useful to rename input elements when working with multiple input files, so that it is easy to discriminate between them when they are shown during workflow execution.
Note: Once the multiple input feature is used in a workflow, it is not possible to run the workflow in batch mode.
You can choose the order in which inputs will be processed by an element by right clicking on the input parameter box at the top of the element and choosing the option Order Inputs. This is most relevant for elements involved in data visualization. The feature Order Inputs is enabled when there are at least two inputs connected to the element (see figure 8.15). A small window will open, in which you can indicate the preferred order of the inputs to that element by moving them up and down in the list (figure 8.16). From this point forward, the order of the inputs is displayed on the branches connecting the inputs to elements.
Figure 8.15: Right-click on the input parameter box to see the Order Inputs function.
Figure 8.16: Define the inputs order for the element.
The feature Order Workflow Inputs allows you to set the order that a user will be asked for each input when they run the workflow. This option is enabled as soon as the workflow has two or more inputs (figure 8.17). Right click on empty space in the Workflow editor to start this tool. A small window will open in which the different inputs can be moved up and down to indicate the desired order (figure 8.18).
Figure 8.17: Right click on empty space in the Workflow editor to open the Order Workflow Inputs tool.
Figure 8.18: Define the order of the inputs for the workflow.
The example in figure 8.19 shows how to generate a track list in a workflow. Any track based on a compatible genome can be added to the same track list. This includes reference tracks as well as track results generated by elements of that workflow. In the latter case, only those for which a workflow output element has been configured can be included in a track list.
Figure 8.19: Generation of a track list including data generated within the Workflow, as well as data held in the Workbench.
Footnotes
- ... output8.1
- When the workflow is executed, all the intermediate results are indeed saved temporarily but they are automatically deleted when the workflow is completed. If a part of the workflow fails, the intermediate results are not deleted.