Specifying the exported file name(s)
The names to give exported files can be configured in the export wizard. Names can be specified directly or placeholders can be used. Placeholders specify particular types of information, and thus are a convenient way to apply a consistent naming pattern to many exports.
The default is to use the placeholders {input}
and {extension}
, as shown in figure 6.26. Using these, the original data element name is used as the basename of the exported file, and the file format is used as the suffix. The actual filename that would result is shown in the Output file name field for the first element being exported. Where multiple elements are exported to multiple files, hovering the mouse cursor over the Output file name field brings up a tooltip with the names of all files being exported, as shown in figure 6.27.
When deciding on an output name, you can choose any combination of the different placeholders, standard text characters and punctuation, as in {input}({day}-{month}-{year})
. As you add or remove text and terms in the Custom file name field, the text in the Output file name field will change so you can see what the result of your naming choice will be for your data.
When exporting a single file, the desired filename can just be typed in the Custom file name field. This should not be done when exporting to more than one file, as this would result in every exported file having an identical name.
Figure 6.26: The default placeholders, separate by a "." are being used here. The tooltip for the Custom file name field provides information about these and other available placeholders.
Figure 6.27: Three read mappings called myreadmapping, mysecondreadmapping and mythirdreadmapping are being exported to separate bam files. Hovering the mouse cursor over the Output file name field brings up a tooltip with the names of the 3 files data will be exported to.
The following placeholders are available:
- {input} or {1} - default name of the data element being exported
- {extension} or {2} - default extension for the chosen export format
- {counter} or {3} - a number that is incremented per file exported. i.e. If you export more than one file, counter is replaced with 1 for the first file, 2 for the next and so on.
- {host} - name of the machine the job is run on
- {user} - name of the user who launched the job
- {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.
An example where specific text instead of a placeholder might be preferred would be if the extension used for a particular format is not as desired. For example, the extension used for fasta files is .fa
. To use .fasta
instead, replace {extension}
with ".fasta
in the Custom file name field, as shown in figure 6.28.
Figure 6.28: The file name extension can be changed by typing in the preferred file name format.