Batch Rename

With the Batch Rename tool it is possible to rename your data in a batch fashion.

To run the batch rename tool:

        Toolbox | Utilities (Image utilities_closed_16_n_p) | Batch Rename (Image rename_16_n_p)

This will open the dialog shown in figure 24.1 where you can select the input data.

Image batch_rename_step1
Figure 24.1: Selecting the data you want to rename.

Click on the button labeled Next to go to the next dialog (see figure 24.2).

Here, one can choose to include or exclude only some of the datat previously selected to work on. For small numbers of data elements, this would not usually be necessary. However, if many data objects were selected at the previous step (to save time when choosing many data elements) you could use the include or exclude functionality at this point so that only certain data elements will be be acted on by the batch rename tool.

Image batch_rename_step2
Figure 24.2: Select how to filter the input data.

The Include and Exclude filters take the text entered into the respective fields and search for matches in the names of the data elements selected in the first wizard step. Thus, you could enter the full names of particular data elements, or just partial names. Any elements where a match is found to the term or terms in the Include field will have the batch renaming applied to them. Any elements where a match is found to the term or terms in the Exclude field will not have the batch renaming applied to them.

For both filters, if you wish to filter on more than one term at the time, the individual terms must be separated with a comma - and without using a space after the comma. An example is shown in figure 24.3.

Image batch_rename_step2_exclude
Figure 24.3: Items remaining after filtering away items with a Q or an O in their name.

In the "Select Target type" step, you can specify at which level you wish to perform the renaming. For a single sequence - as in the example shown in figure 24.4 - this is straightforward because it has just one name, and you would use the Rename elements option. But if you have a sequence list, for example, you could choose either to rename the list (using Rename elements) or the sequences in the list (using Rename sequences in sequence lists). The same goes for alignments (using Rename sequences in alignments) and read mappings (using Rename reads in mappings). For read mappings, there is also an option to Rename reference sequence in mappings.

Image batch_rename_step3
Figure 24.4: In this example, as we only have one category represented, the other target type options are disabled.

Click on the button labeled Next to open the last dialog (see figure 24.5). For each text field, you can press Shift+F1 (Shift + Fn + F1 on Mac) to get a drop-down list of advanced placeholder options.

Image batch_rename_step4
Figure 24.5: Rename options. At this step you can choose whether you wish to add text to the existing name, replace some of the name, or replace the entire name.

At this step you can select between three different renaming options.

Image batch_rename_full_name
Figure 24.8: The entire name is removed from the primer names and is replaced with "Today's date" (#BR-D#), the userdefined text: RNA-Seq, and the addition of consecutive numbers (#BR-E#). In this case we have inserted a space between the date, the user-defined text and the added number. If commas were inserted instead, the commas would be part of the new name as everything that is typed into the text field will be used in the new name when renaming the entire name.

Click Finish to start renaming. Please note that the rename cannot be undone and that it does not show up in the History (Image history_16_n_p).