Configuring input and output elements
Configuring Workflow Input elements
Workflow Input elements and NGS Import elements are the two element types that bring data into a workflow. At least one such element must be present in a workflow. When a workflow is launched, the wizard will prompt for data needed by these elements.
Like other workflow elements, Workflow Input elements can be configured by double clicking on the element, or by right-clicking on the element name and selecting the option Configure....
If left unconfigured, you will be prompted for the data when launching the workflow. It is thus usually best to leave Input elements connected to a primary input channel unconfigured, as generally, primary data would be selected when launching the workflow.
It can, however, be beneficial to configure Input elements connected to a parameter input channel so that the same data, usually reference data, is used each time the workflow is run. To configure a Workflow Input element connected to a parameter input channel, double click on the element name to open the configuration wizard, and then:
- Configure the data element to be used by filling in the Workflow input field when running the workflow without a Reference Data Set, or when running it with one that does not have a data element assigned a relevant workflow role (figure reffig:inputelementconfig.
Figure 11.24: Each parameter can be configured. An unlocked symbol beside the parameter indicates that the option will be shown and be configurable in the wizard when launching the workflow. - Configure the Workflow role field when using a Reference Data Set. The element of the Reference Data Set with a matching role will be used when the workflow is run. You can either type in a role name of your choice, or choose one from the drop down list, as long as there will be a reference data set with a matching role.
Figure 11.25: A reference data role can be selected in the configuration of relevant workflow elements. Here, the wizard would then include a step where a relevant reference data set could be selected.
By locking the parameters after configuring them, the data configured will be the same for each workflow run, and cannot be changed when launching the workflow (see Locking and unlocking parameters).
Configuring Workflow Output and Export elements
Results generated by a workflow are only saved if the relevant output channel of a workflow element is connected to a Workflow Output element or an Export element. Data sent to output channels without an Output or Export element attached are not saved.
Terminal workflow elements with output channels must have at least one Workflow Output element or Export element connected. |
The naming pattern for workflow outputs and exports can be specified by configuring Workflow Output element and Export elements respectively.
To do this, double click on a Workflow Output or Export element, or right-click and select the option Configure....
The rest of this section is about configuring Workflow Output elements. Configuration of Export elements is the same as for export tools and is described in Specifying the exported file name(s).
By default, a placeholder is used to specify the name of an output, as seen in figure 11.26. Placeholders specify a type of information to include in the output name, and are a convenient way to apply a consistent naming pattern. They are replaced by the relevant information when the output is created.
The placeholders available are listed below. If you hover the mouse cursor over the Custom output name field in the configuration dialog, a tooltip with a list of these will be shown. Text-based forms of the placeholders are not case specific.
- {name} or {1} - default name for the tool's output
- {input} or {2} - the name of the first workflow input (and not the input to a particular tool within a workflow). To include additional input names, use for example {2:1,2,3}. In this case, the workflow output will be a concatenation of the three first inputs (see Ordering inputs to learn more about input order).
- {user} - name of the user who launched the job
- {host} - name of the machine the job is run on
- {year}, {month}, {day}, {hour}, {minute}, and {second} - timestamp information based on the time an output is created. Using these placeholders, items generated by a workflow at different times can have different filenames.
You can choose any combination of the placeholders and text, including punctuation, when configuring output names. For example, {input}({day}-{month}-{year})
, or {2} variant track
as shown in figure 11.27. In the latter case, if the workflow input was named Sample 1
, the name of the output generated would be "Sample 1 variant track".
Figure 11.26: The names that outputs are given can configured. The default naming uses the placeholder {1}, which is a synonym for the placeholder {name}.
Figure 11.27: Providing a custom name for the result.
It is also possible to save workflow outputs into subfolders by using a forward slash character /
at the start of the output name definition. For example the custom output name /variants/{name}
refers to a folder "variants" that would lie under the location selected for storing the workflow outputs. When defining subfolders for outputs, all later forward slash characters in the configuration, except the last one, will be interpreted as further levels of subfolders. For example, a name like /variants/level2/level3/myoutput
would put the data item called myoutput
into a folder called level3
within a folder called level2
, which itself is inside a folder called variants
. The variants
folder would be placed under the location selected for storing the workflow outputs. If the folders specified in the configuration do not already exist, they are created.
Note:Outputs from workflow element output channels without a Workflow Output element or an Export element connected may be generated during a workflow run. Such intermediate results are deleted automatically after the workflow fun completes. If a problem arises such that the workflow does not complete normally, intermediate results are not deleted and will be in a folder named after the workflow with the word "intermediate" in its name.
Configuring Workflow Export elements
The placeholders available for exports elements are different to those described here and are described in Data export. In addition, Export elements do not support the configuration of subfolders as part of the output name configuration. If a forward slash is included in the Custom file name field of an export element, all text before and including the final slash character is ignored.