Batch Rename

This tool has been deprecated and will be retired in a future version of the software. It has been moved to the Legacy Tools (Image legacy_tools) folder of the Toolbox, and its name has "(legacy)" appended to it. The functionality of this tool has been replaced by two new tools, Rename Elements, for renaming data elements (Rename Elements), and Rename Sequences in Lists for renaming sequences within sequence lists (Rename Sequences in Lists). We recommend using these new tools instead of Batch Rename (legacy).

To run the Batch Rename (legacy) tool:

        Toolbox | Legacy Tools (Image legacy_tools) | Batch Rename (legacy) (Image rename_16_n_p)

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

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

Click Next to go to the next dialog (see figure 36.2).

Here, one can choose to include or exclude only some of the data 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 acted upon.

Image batch_rename_step2
Figure 36.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 36.3.

Image batch_rename_step2_exclude
Figure 36.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 this is straightforward because it has just one name, and you would use the Rename elements option. But if you have a sequence list - as in the example shown in figure 36.4 - 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 36.4: In this example, as we only have one category represented, the other target type options are disabled.

Click Next to open the last dialog (see figure 36.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 36.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 36.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).